All apps · 0 apps
torrentng
Docker app from torrentng's Repository
Overview
TorrentNG is a modern torrent management stack for headless power-user seeding at 10k-100k+ torrents and 200-500+ TB. This template runs torrentngd, TorrentNG's own first-party Rust BitTorrent client daemon, with its built-in WebUI, REST/SSE API, and qBittorrent-compatible API (for Prowlarr/Sonarr/Radarr/autobrr/cross-seed) all in one container. torrentngd owns torrent state, peer traffic, tracker state, storage, rechecks, jobs, and metrics directly -- it does not run or depend on rTorrent.
Use this template if you want a single self-contained TorrentNG install with no external torrent client. If you already run rTorrent, qBittorrent, Transmission, or Deluge and just want TorrentNG's WebUI/API in front of it instead, use the "TorrentNG WebUI" template.
FIRST RUN: torrentngd reads its settings from a config.toml file, not environment variables (this is intentional -- see the project's deployment docs). Before starting the container for the first time:
- Create the appdata folder for Config below (e.g. /mnt/user/appdata/torrentng/config).
- Either leave it empty to run with the packaged defaults (0.0.0.0:8080 WebUI, port 44444 for peer traffic, DHT on), or copy in a customized config.toml -- see deploy/native/config.toml in the TorrentNG repository for every field.
- Set the "API Token" variable below to a random string; the container writes it to the path the packaged config already expects for authenticating the WebUI/API. Generate one with e.g.
openssl rand -hex 32on any Linux box, or the Unraid terminal. This template publishes on a public container bind, so first login uses the API Token in either the Username or Password field. To retrieve the active login in Unraid, open the Docker tab, click thetorrentngcontainer icon, choose Console, and runtorrentngd auth-tokenat the prompt. Use the printed WebUI username and password on TorrentNG's login page. Then open Settings -> Security to choose a username and password of at least 16 characters. The API token remains available for automation and can still be used in either login field. See the Unraid deployment README for details.
The image supports runtime PUID/PGID handling. This template defaults to Unraid's standard nobody:users identity, 99:100; the entrypoint prepares its small internal runtime directories and then drops to that non-root identity. Do not add an ExtraParams --user override: the entrypoint needs its short setup phase. Make sure the Data, Config, and State/DB appdata folders are owned by the selected PUID:PGID before first start. For the default paths shown below, use Unraid's Tools -> New Permissions on both /mnt/user/downloads/torrentng and /mnt/user/appdata/torrentng, or run from the Unraid terminal: chown -R 99:100 /mnt/user/downloads/torrentng /mnt/user/appdata/torrentng. The container never recursively chowns mounted download trees at startup.
RUNNING BEHIND A VPN: Runtime listen-port changes are supported through the authenticated native API and are persisted across restarts. For Gluetun, ProtonVPN NAT-PMP, and providers that assign a new forwarded port on reconnect, see the "Native torrentng behind Gluetun" section in the linked Unraid README or the deploy/native/compose.vpn.yml example. The native template can share an existing Gluetun namespace with Extra Parameters --network=container:gluetun; publish WebUI/API port 8080 on Gluetun, remove the fixed TorrentNG port mappings, and run the included vpn-port-sync.sh helper in that same network namespace using separate Gluetun and TorrentNG API keys.
Readme
View on GitHubUnraid deployment
Unraid Community Applications (CA) templates for TorrentNG. See deploy/README.md for the underlying Docker images and docs/DEPLOYMENT.md / docs/NATIVE_DEPLOYMENT.md for the non-Unraid deployment paths these templates wrap.
Which template
- Already running rTorrent, qBittorrent, Transmission, or Deluge (on this box or elsewhere on the network) and just want a modern replacement WebUI and a qBittorrent-compatible API for Prowlarr/Sonarr/Radarr/autobrr/ cross-seed? Use torrentng-webui.
- Want one box that does everything with no external client dependency? Use
torrentng (runs
torrentngd, TorrentNG's own first-party engine).
Both are documented in depth in their own <Overview> text, which Unraid
shows on the Add Container page.
WebUI login
TorrentNG has its own WebUI login. The qBittorrent, rTorrent, Transmission, or Deluge credentials entered in the template are only for TorrentNG to connect to that backend; they do not log you in to TorrentNG.
For the first sign-in, you can enter the template's API Token or API Tokens value in either TorrentNG login field. These tokens are separate from the backend client's username and password.
To display the active TorrentNG WebUI username and password:
In Unraid's web interface, open the Docker tab.
Find the TorrentNG container. Click its container icon and choose Console from the menu. This opens a terminal inside the running container.
At the prompt, run the command for the template you installed:
- torrentng-webui (connects to an existing client):
torrentng auth-token - torrentng (TorrentNG engine):
torrentngd auth-token
- torrentng-webui (connects to an existing client):
Use the printed WebUI username and WebUI password on the TorrentNG login page. Run the command in TorrentNG's interactive Console, not in the existing torrent client's console. It reports the active credentials, including values changed earlier in Settings -> Security.
Each install generates a unique WebUI password. After signing in, open Settings -> Security to choose a username and password of at least 16 characters. API tokens remain available for automation, and runtime changes persist in the profile's state directory. See the compatible-client README for the service-specific instructions.
Native torrentng behind Gluetun
The native daemon can share an existing Gluetun network namespace and follow the provider-assigned port after every VPN reconnect. Use the VPN Compose variant when managing the deployment with Compose. For the Community Applications template:
Configure Gluetun with
VPN_PORT_FORWARDING=onand its authenticated control server, for exampleHTTP_CONTROL_SERVER_AUTH_DEFAULT_ROLE={"auth":"apikey","apikey":"..."}. Publish the TorrentNG WebUI/API port (8080) on the Gluetun container; do not expose its control-server port to the host.In the
torrentngtemplate, set Docker Extra Parameters to--network=container:gluetunand remove the WebUI and peer-port mappings from the TorrentNG container. Its shared network is published through Gluetun.Start a port-sync helper in the same network namespace. The native image already contains the helper:
docker run -d --name=torrentng-vpn-port-sync \ --restart=unless-stopped \ --network=container:gluetun \ --user=99:100 \ -e GLUETUN_CONTROL_API_KEY='same-key-configured-in-gluetun' \ -e TORRENTNGD_API_TOKEN='same-token-configured-in-torrentng' \ --entrypoint=/usr/local/lib/torrentng/vpn-port-sync.sh \ ghcr.io/snapetech/torrentng/native:latest
The helper polls Gluetun's authenticated /v1/portforward endpoint and
updates TorrentNG's runtime API. The daemon rebinds TCP and enabled uTP, saves
the assigned port, and refreshes its tracker/DHT peer-port announcements.
Gluetun provides the WireGuard kill switch and provider NAT-PMP forwarding;
for ProtonVPN, enable NAT-PMP when generating the WireGuard profile. Use the
provider's supported port-forwarding setup and a separate key for Gluetun's
control server. Keep dht.port = 0 so DHT follows the runtime peer port; with
incoming uTP enabled, TorrentNG uses the adjacent UDP port for DHT. See
NATIVE_DEPLOYMENT.md for the complete
Compose example.
Manual template installation
For a manual installation, use the template for the mode you want:
- Docker tab -> Add Container.
- In the Template field at the top, paste the raw GitHub URL of the
template you want, e.g.
https://raw.githubusercontent.com/snapetech/TorrentNG/main/templates/torrentng-webui.xml. - The form populates from the template. Fill in the required fields
(Secret Key, API Tokens, and the backend URL/credentials for
torrentng-webui; the API Token and Config path fortorrentng) and Apply.
For the native engine, use
templates/torrentng.xml.
Storage and permissions
Both templates default to Unraid's nobody:users identity (PUID=99,
PGID=100). Set PUID and PGID to an identity that can read and write
its appdata and downloads. Preserve your existing download client's access
when sharing folders. Use these variables rather than a Docker --user
override, because the container entrypoint needs to prepare its runtime files
before dropping privileges.
For the WebUI template, configure the selected backend's URL and credentials. When using rTorrent, the SCGI address must be reachable before startup; the service exits if it cannot apply its tracker identity. Other supported backends report degraded health while reconnecting.
Support
Use the TorrentNG issue tracker for installation and runtime problems. Include your template choice, image version, selected backend, and relevant logs with credentials removed.
Requirements
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/snapetech/torrentng/native:latestRuntime arguments
- Web UI
http://[IP]:[PORT:8080]- Network
bridge- Shell
sh- Privileged
- false
Template configuration
TorrentNG WebUI, REST/SSE API, and qBittorrent-compatible API (used by Prowlarr/Sonarr/Radarr/autobrr/cross-seed).
- Target
- 8080
- Default
- 8080
Incoming BitTorrent peer connections for direct bridge networking. For VPN-assigned ports, follow the Gluetun instructions in the Overview and remove this fixed mapping.
- Target
- 44444
- Default
- 44444
Incoming BitTorrent peer connections (uTP/DHT) for direct bridge networking. For VPN-assigned ports, follow the Gluetun instructions in the Overview and remove this fixed mapping.
- Target
- 44444
- Default
- 44444
Non-root Linux UID for torrentngd. Defaults to Unraid's nobody UID 99. The entrypoint uses this value after its short setup phase; do not also set ExtraParams --user.
- Target
- PUID
- Default
- 99
Non-root Linux GID for torrentngd. Defaults to Unraid's users GID 100. Make the mounted Data, Config, and State paths accessible to this group.
- Target
- PGID
- Default
- 100
Downloaded/seeding file storage. torrentngd's userspace disk scheduler manages this directly.
- Target
- /data
- Default
- /mnt/user/downloads/torrentng
Optional config.toml goes here. Leave empty to run with the packaged defaults. See Overview / Requires before first start.
- Target
- /config
- Default
- /mnt/user/appdata/torrentng/config
Session state, SQLite database (state.db), and durability journals. Back this up like you would a database -- torrent history and resume state live here.
- Target
- /var/lib/torrentngd
- Default
- /mnt/user/appdata/torrentng/state
WebUI login token and bearer token for the REST/qBittorrent-compatible API. Enter this same value in either WebUI login field. Required on first start unless your mounted config.toml already sets auth.api_tokens/api_tokens_file itself. Generate with: openssl rand -hex 32
- Target
- TORRENTNGD_API_TOKEN
Rust tracing filter, e.g. info, debug, or torrentngd=debug,warn.
- Target
- RUST_LOG
- Default
- info