torrentng

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:

  1. Create the appdata folder for Config below (e.g. /mnt/user/appdata/torrentng/config).
  2. 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.
  3. 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 32 on 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 the torrentng container icon, choose Console, and run torrentngd auth-token at 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.

Unraid 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:

  1. In Unraid's web interface, open the Docker tab.

  2. Find the TorrentNG container. Click its container icon and choose Console from the menu. This opens a terminal inside the running container.

  3. 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
  4. 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:

  1. Configure Gluetun with VPN_PORT_FORWARDING=on and its authenticated control server, for example HTTP_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.

  2. In the torrentng template, set Docker Extra Parameters to --network=container:gluetun and remove the WebUI and peer-port mappings from the TorrentNG container. Its shared network is published through Gluetun.

  3. 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:

  1. Docker tab -> Add Container.
  2. 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.
  3. 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 for torrentng) 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

Create the config appdata folder (optionally with a config.toml inside) and set an API token before first start. The install generates a unique WebUI password. To retrieve the active login, open Unraid's Docker tab, click this container's icon, choose Console, and run `torrentngd auth-token`. On this template's public bind, use the API token in either login field for first sign-in, then set a username and password of at least 16 characters in Settings -> Security.

Categories

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/snapetech/torrentng/native:latest
Last Updated2026-10-14
First Seen2026-09-25

Runtime arguments

Web UI
http://[IP]:[PORT:8080]
Network
bridge
Shell
sh
Privileged
false

Template configuration

WebUI/API PortPorttcp

TorrentNG WebUI, REST/SSE API, and qBittorrent-compatible API (used by Prowlarr/Sonarr/Radarr/autobrr/cross-seed).

Target
8080
Default
8080
Peer Port TCPPorttcp

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
Peer Port UDPPortudp

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
Process UID (PUID)Variable

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
Process GID (PGID)Variable

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
DataPathrw

Downloaded/seeding file storage. torrentngd's userspace disk scheduler manages this directly.

Target
/data
Default
/mnt/user/downloads/torrentng
ConfigPathrw

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
State/DBPathrw

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
API TokenVariable

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
Log LevelVariable

Rust tracing filter, e.g. info, debug, or torrentngd=debug,warn.

Target
RUST_LOG
Default
info