Security model
Review how the container splits privileges, keeps each Transmission inside its selected tunnel, and protects the secrets and sessions it stores.
Why It's Built This Way
- Runs only the supervisor, the startup steps, and the VPN controllerThe only part allowed to bring tunnels up or down as root, so a flaw in the web interface or Transmission doesn't hand over network control.
- Gives each Transmission a fixed private address and a route through only its own tunnel, with the firewall as a second boundary.
- Encrypts VPN credentials, WireGuard keys, profiles, and notification secrets with a key unique to the installation, so a copied database alone doesn't reveal them.
- Keeps the native RPCEach Transmission's private RPC port, never published on the container's loopback address, so every outside request passes the control planeThe web interface and API; it stays up when the VPN is down's authentication first.
Privilege Separation
The control planeThe web interface and API; it stays up when the VPN is down reaches the VPN controllerThe only part allowed to bring tunnels up or down through two local sockets, both owned by root:PGID with mode 0660:
/run/transmission-vpn/controller.sock— Accepts only typed status, connect, restore, disconnect, and set-default commands./run/transmission-vpn/direct.sock— Opens one TCP connection outside the VPN for provider catalogs and notifications, and hands it back. It refuses loopback and slot addresses.
Nova runs every unprivileged app service as the same numeric PUID:PGID, so no service uses a different fixed image account. The controller stays root because it needs network administration. Its socket protocols accept only the typed operations above; the firewall still prevents an unprivileged process from marking a packet or opening a route outside the VPN.
The control plane reads /data only to send a finished torrent's files to a signed-in browser. It sends only the files Transmission reports as complete, opens them read-only, and refuses symbolic links anywhere on the path, as the folder browser does.
Network isolation
- Fixed source address — Each Transmission sends from
198.18.<slot>.1. Its route leads only to that connection's tunnel and fails inside the container while the tunnel is down. - Firewall — The firewall boundaryFirewall rules that drop anything not going through a VPN drops every new connection the container opens outside a VPN tunnel, from any account. Only packets the VPN controller marks leave over the normal network: its tunnels, its lookups for VPN servers, and the connections it opens for the control plane. Marking a packet takes root, which only the supervisor, the startup steps, and the VPN controller have.
- Fixed address boundary — Each fixed address passes only on its matching protected interface, and a backstop drops it everywhere else, loopback included, as covered in Leak protection.
- Private RPC — Every Transmission has a separate native RPCEach Transmission's private RPC port, never published listener on container loopback. These listeners are not published.
- Three ports — The image exposes port 22602 for the web interface and API, port 9091 for compatible RPC, and port 22605 for the opt-in web proxy.
- Web proxy limits — Only clients from
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,fc00::/7, andfe80::/10may connect. The proxy permits only public IPv4 destinations and refuses private, loopback, reserved, multicast, and IPv6 destinations. - Web proxy fail-closed path — HTTP clients receive
503and SOCKS5 clients receive a general failure when their selected connection is unavailable. The proxy binds every request to that connection's fixed address, which the firewall accepts only on the matching tunnel, so a request can't reach the container's own services either. - Blocklist fail-closed path — The Transmission runner downloads sources only when the default connection is protected. HTTPS and DNS sockets bind to that connection's fixed slot address, so the firewall and source-routing backstop prevent fallback through the container's ordinary interface.
- Blocklist ownership — The runner owns every daemon's
blocklistsfolder, writes one normalized file per usable source, removes other files and stale native indexes, and reloads running daemons. The control API never downloads a source itself. - Checked profiles — Profile normalizationStrips risky lines so an uploaded file can't escape rejects OpenVPN profiles with scripts, plugins, proxies, or route overrides, and WireGuard files with
PreUp,PostUp,PreDown,PostDown,Table, orFwMarklines. The VPN controllerThe only part allowed to bring tunnels up or down checks each profile again before it uses it. - No
wg-quick— The controller sets up WireGuard withwgalone, so no line in a WireGuard file can run a program.
Compatible RPC boundary
The optional compatible RPCMakes all connections look like one Transmission to apps route presents the torrents from every connection as one Transmission. Torrent commands are sent only to the daemon that owns each torrent.
Remote apps can remove only torrents in that merged list. Unknown IDs and hashes are ignored instead of being sent to every daemon.
The facade refuses torrent-set-location with Change the torrent's profile in the console to move it. The profile workflow keeps the torrent's folder and VPN connection under one control-plane decision.
session-set accepts a fixed set of settings. Their names may use kebab case, snake case, camel case, or different capitalization:
- Alternative speed limits and their schedule.
- Blocklist enabled, cache size, encryption, DHT, LPD, PEX, and uTP.
- Download and seed queue controls, stalled queue controls, and start-added behavior.
- Download, incomplete, speed, peer, idle-seeding, and seed-ratio settings.
- Partial-file renaming and original torrent-file cleanup.
Script settings, peer-port settings, random peer-port settings, and port-forwarding settings are refused. session-close and unknown methods are also refused.
blocklist-update is not forwarded to native daemons. It requests one runner merger update, waits for up to 60 seconds, and returns the total range count only after the merged attempt finishes.
Profile folders, incomplete folders, and folders supplied with torrent adds must stay inside /data.
Secrets
- Encryption — VPN credentials, WireGuard private keysYour WireGuard password; it never shows up in logs, profile contents, and notification secret fieldsA destination's token or password, sealed and never shown are stored in the database encrypted with AES-256-GCM, and each encrypted value is bound to its own record.
- Installation keyUnlocks your saved secrets; lose it and they're removed — The key is created on first start at
/config/keys/installation.keyUnlocks your saved secrets; lose it and they're removed. Its mode0600file contains 64 lowercase hexadecimal characters plus a newline inside a mode0700folder, all owned byPUID:PGID. A start without the file makes a new key and removes the secrets the old one encrypted, and a key file from another database stops startup, as covered in Updates and Backups. - No ordinary read-back — Settings and detail routes don't return stored VPN credentials, WireGuard keys, profile contents, or notification secrets. A freshly confirmed export is the explicit exception for the sections you select.
- Portable exports — A selected VPN connection or notification section is decrypted into plain text inside the export fileA portable JSON backup you can import anywhere, so the file must be protected like the credentials it contains. RPC passwords and API token values stay as digests, and an import seals plain-text secrets with the destination installation's key.
- OpenVPN credentials — OpenVPN reads the username and password from a temporary file with mode
0600under/run/transmission-vpn/openvpn/, removed when the connection stops, and never from command arguments or environment variables. - WireGuard keys —
wgreads the private key from a temporary file with mode0600under/run/transmission-vpn/wireguard/, removed as soon as it's read. Ordinary VPN pages and read routes don't return the key, and logs and error messages never repeat it. A freshly confirmed export can include it in plain text. - Logs — OpenVPN's output is logged with the VPN username and password replaced by
[redacted], andwireguard-go's output with the keys replaced the same way. - Digests — Claim codesThe code from the logs that creates your admin account, session tokens, API tokensA scoped key for scripts that call the API, RPC loginOne app's own username and password for RPC passwords, and recovery codes are stored only as SHA-256 digests.
- Web proxy password hashes — Each web proxy password is stored as an Argon2id hash and is never returned by a read route.
- Authenticator secret — The authenticator app's secret is encrypted with the installation keyUnlocks your saved secrets; lose it and they're removed, like VPN credentials. When a missing key removes it, the authenticator app is turned off instead of locking you out, so signing in with the password asks for no code until it's set up again.
- Password — The administrator password is hashed with Argon2id, using 64 MiB of memory, 3 passes, and 2 threads.
Accounts and sessions
- One account — The installation has a single administrator account, created through the claim codeThe code from the logs that creates your admin account. Its username matches without regard to letter case.
- Browser sessions — A session lasts 24 hours and uses the
tvpn_sessioncookie (HttpOnly) and thetvpn_csrfcookie, both withSameSite=Strict. - Change protection — Every change made from a browser must send an
X-CSRF-Tokenheader that matches thetvpn_csrfcookie. - Sign-in methods — A password, optionally followed by a 6-digit code from an authenticator app (TOTP) or a single-use recovery code. A passkey signs in on its own, without a code.
- Passkeys — Need https (or
localhost) and a domain name, and each passkey only works on the hostname it was added on. - Password changes — Changing the password signs out every other browser session.
- Username changes — Sign-in and security changes the username after asking for the password. Browser sessions stay signed in and show the new name.
- Password checks — Setting up or turning off the authenticator app, making new recovery codes, and adding or removing a passkey all ask for the password again first.
- Backup confirmation — Export and import require Confirm it’s youA quick re-check before secrets leave or arrive with the password and current authenticator code, or with a passkey. Its grant lasts five minutes, works once, is bound to that browser session and to either export or import, and is kept only in memory.
- Backup route boundary — Only a signed-in browser session can confirm, export, preview, or import a backup. API tokens cannot use those routes.
- API tokensA scoped key for scripts that call the API — Tokens start with
tvpn_, carry the scopestorrents:read,torrents:write,vpn:read,vpn:write,settings:readandsettings:write(a write scope includes its read scope), and expire on a date you choose or never. - Token management — Only a signed-in browser session can create, list, edit, or revoke tokens. A token's value is shown once and never changes when the token is edited, and revoking deletes the token.
- Credential boundaries — API tokens are bearer credentials only for the API on port 22602. RPC logins use HTTP Basic authentication only on port 9091. Web proxy logins use HTTP Basic or SOCKS5 username and password authentication only on port 22605. None of the three works in place of another.
- RPC login management — Add login generates a password that is shown once. Edit changes the username, and saving it with Generate a new password ticked replaces the password, shows the new one once, and stops the old one from working right away. Delete revokes the login, and the list records when it was last used.
- Notifications — Only a signed-in browser session can list, add, edit, test, or remove notification destinationsWhere an alert goes, such as ntfy, Telegram, or email. An API tokenA scoped key for scripts that call the API gets
403withsession_required, whatever its scopes. - Precedence — When a request carries both a bearer token and session cookies, the token decides what the request may do.
- API token failures — An invalid bearer token receives
401. It does not use the administrator, RPC, or web proxy failed-sign-in counters. - Rate limit — After 10 failed attempts from one address, or one
/56network for IPv6, more attempts are refused until 15 minutes have passed since the first failure. Wrong passwords, authenticator codes, recovery codes, passkeys and password checks all count toward one sign-in limit, and a refused attempt'sRetry-Afterheader gives the seconds left. Claims are counted separately, and only a wrong or expired claim codeThe code from the logs that creates your admin account counts as a failed claim. - RPC login limit — After 10 failed RPC sign-ins from one IPv4 address or IPv6
/56network in 5 minutes, port 9091 returns429until that 5-minute window ends. - Web proxy login limit — After 10 failures from one client in 5 minutes, the proxy blocks that client for 5 minutes. HTTP clients receive
429; SOCKS5 clients receive an authentication failure. - Reverse proxies —
X-Forwarded-For,X-Forwarded-ProtoandX-Forwarded-Hostare honored only from private or local addresses, so a proxy on the same Docker network or LAN passes the visitor's real IP and https. From a public address they're ignored.
Browser protections
- Content Security Policy —
default-src 'self'withframe-ancestors 'none', so the interface loads only its own files and can't be framed. - Other headers —
X-Frame-Options: DENY,X-Content-Type-Options: nosniff, andReferrer-Policy: no-referrer. - Caching — Responses use
Cache-Control: no-store, except the compiled files under/assets/.
Known limits
- No HTTPS — The container serves plain HTTP. Cookies get the
Secureflag when a reverse proxy reports https. - Trusted LAN — Every private address may set forwarded headers, so a device on the LAN can claim any IP. Keep untrusted devices off the network that reaches the container.
- Firewall scope — The firewall drops every new connection the container opens outside a VPN, whichever process opens it. Only replies and connections marked by the VPN controllerThe only part allowed to bring tunnels up or down use the regular network, including the ones it opens for the control planeThe web interface and API; it stays up when the VPN is down's provider catalogs and notifications.
- No secret files — VPN credentials and WireGuard keys come only from the web interface or the API, and the container generates the installation keyUnlocks your saved secrets; lose it and they're removed when the file is missing.