Installation
Build the image from the repository and start it with Docker Compose, which already grants the device, capability, volumes, and ports the container needs.
Requirements
- amd64 or arm64 host — The image builds only for
amd64andarm64, and any other architecture stops the build. - Docker with Compose — The repository's
compose.ymlbuilds the image and runs the container. - A copy of the repository — The build runs from the repository root, where
Dockerfileandcompose.ymllive. - TUN deviceThe /dev/net/tun device the container needs for tunnels — The host must provide
/dev/net/tun, which Compose passes into the container. NET_ADMINThe Docker capability that lets it manage its firewall capability — Compose grants it so the container can manage its firewall and tunnel, and privileged mode isn't needed.- Working iptables — The container needs a legacy or nft iptables firewall backendWhich iptables flavor the container picked at startup, and it tries legacy first.
- A VPN account — PureVPN, Private Internet Access, IPVanish, NordVPN, Surfshark, IVPN, Mullvad, or another OpenVPN or WireGuard service whose file passes the custom profile checks.
- WireGuard kernel module (optional) — WireGuardThe VPN protocol that signs in with a key, not a password uses the host's kernel module when it has one, and the slower
wireguard-goWireGuard without a kernel module; slower, no setup from the image otherwise, with no extra container settings. - Memory and CPUs for several connections — The container keeps 256 MiB for shared services and budgets 160 MiB for each connection. It also allows up to two connections per available CPU, using the smaller result. Give the container at least 576 MiB for two connections, 736 MiB for three, or more when the host has room.
Docker memory and CPU limits count as the available resources. VPN connections explains the complete capacity calculation and its fallback.
Build and Start
Run these commands from the repository root:
# Check the resolved Compose configuration.
docker compose config
# Build the image and start the container in the background.
docker compose up --build --detach
# Follow the startup logs.
docker compose logs --follow app
On the first start, the container works through these steps:
- It checks
PUIDWhich user owns your downloads on the host,PGIDWhich user owns your downloads on the host,TZ, and the TUN deviceThe /dev/net/tun device the container needs for tunnels, and prepares its folders. - It creates
/config/database/state.sqlite3and the installation keyUnlocks your saved secrets; lose it and they're removed at/config/keys/installation.key, then writes Transmission's settings file. - It blocks protected traffic before any Transmission daemon or the VPN controllerThe only part allowed to bring tunnels up or down starts.
- It starts the web interface, which prints a one-time claim codeThe code from the logs that creates your admin account to the logs unless a claim secret fileYour own claim code, mounted as a file is mounted.
tip
The Transmission build runs one compile job at a time by default. A higher TRANSMISSION_BUILD_JOBS build argument runs more jobs at once:
docker compose build --build-arg TRANSMISSION_BUILD_JOBS=4
docker compose up --detach
Run without Compose
Build the image, then pass the same device, capability, volumes, and three published ports to docker run:
docker build --tag transmission-vpn:local .
docker run --detach \
--name transmission-vpn \
--restart unless-stopped \
--user 0:0 \
--cap-add NET_ADMIN \
--device /dev/net/tun \
--env PUID=1000 \
--env PGID=1000 \
--env TZ=UTC \
--publish 22602:22602 \
--publish 9091:9091 \
--publish 22605:22605 \
--volume transmission-vpn-config:/config \
--volume transmission-vpn-data:/data \
transmission-vpn:local
warning
On a Docker network without IPv6, wildcard publishing can forward outside IPv6 clients from Docker's private gateway address. It is recommended to use the provided Compose file, whose network has IPv6, or bind the optional remote-access ports to the host's LAN address with --publish <LAN address>:22605:22605 and --publish <LAN address>:9091:9091.
Environment Variables
| Variable | Default | Description |
|---|---|---|
PUIDWhich user owns your downloads on the host | 1000 | User ID that runs unprivileged services and owns app files, from 1 to 60000. |
PGIDWhich user owns your downloads on the host | 1000 | Group ID for the same services and files, from 1 to 60000. |
TZ | UTC | Time zone name, such as Europe/London, that matches a zone installed in the image. |
Compose reads these variables from your shell when it starts the container:
PUID=1001 PGID=1001 TZ=Europe/London docker compose up --build --detach
No environment variable selects the VPN provider or tunnel, holds VPN credentials or keys, or changes Transmission's settings. Those live in the web interface, and settings can also come from a managed configurationA JSON file that presets or locks settings at deploy file.
Volumes and Ports
| Path or port | Purpose |
|---|---|
/config | The config volumeThe /config folder; back it up whole, key included, with the database, the installation keyUnlocks your saved secrets; lose it and they're removed, each connection's Transmission configuration folder, and the optional managed configurationA JSON file that presets or locks settings at deploy file. |
/data | The data mountThe /data folder where every download lives, which holds every download. |
22602/tcp | The control portPort 22602, where you open the web interface, which carries the web interface and the API over plain HTTP. |
22605/tcp | The optional web proxyLets other devices browse through your VPN on port 22605, which carries authenticated HTTP and SOCKS5 traffic from private networks. |
9091/tcp | The RPC portPort 9091, where remote apps connect, which carries only the optional compatible RPCMakes all connections look like one Transmission to apps route over plain HTTP. |
- The container always listens on ports 22602, 22605, and 9091. To reach one on a different host port, change the host side of its mapping, such as
"8080:22602"incompose.ymlor--publish 8080:22602withdocker run. With host networking, the ports are always 22602, 22605, and 9091. - The Compose file keeps
/configand/datain named volumes calledconfiganddata. - The Compose file turns on IPv6 for the container's network, so the web interface sees each IPv6 visitor's own address. Docker Engine 27 or later picks the IPv6 subnet on its own, and on a host without IPv6, you can delete the
networksblock. IPv6 addresses are often reachable from the internet, so it is recommended to check that your router or host firewall blocks inbound connections to ports 22602, 22605, and 9091. - The installation keyUnlocks your saved secrets; lose it and they're removed in
/configencrypts the authenticator app's secret, VPN profile contents and connection credentials, and notification secrets, so it is recommended to keep it with the database whenever you copy or move/config, as covered in Updates and Backups. - Each Transmission's native RPCEach Transmission's private RPC port, never published uses a separate loopback port inside the container, starting at 9092. These ports are never published.
Upgrade an old /data state mount
Older images kept app state under /data. Stop the old container, change the state folder's mount from -v <state-folder>:/data to -v <state-folder>:/config, and give downloads their own /data mount. On first start, the container moves the old app/keys/installation.key and SQLite files into keys/ and database/ without overwriting anything, and converts a raw 32-byte key to the 64-character lowercase hexadecimal format without changing its key bytes.
An unchanged old run line that mounts only /data is also detected. The container uses that mount as its state directory for the start, performs the same internal layout migration, and logs a warning to move the state mount to /config. It is recommended to change the mount before the next update so /data contains only downloads.
Use Host Folders
It is recommended to mount host folders when you want to reach downloads from the host or back up /config with ordinary file tools. A compose.override.yml file next to compose.yml replaces the named volumes:
services:
app:
volumes:
- ./config:/config
- ./downloads:/data
It is recommended to set PUIDWhich user owns your downloads on the host and PGIDWhich user owns your downloads on the host to the host account that owns the downloads folder. Storage and Permissions covers the ownership rules.
Next Steps
- First-Run Setup — Claim the installation and create the administrator account.
- Storage and Permissions — Plan folder ownership and the runtime identity.
- Connect to a VPN — Choose a provider and test the first connection.