Updating
Upgrades, backups, rolling back, and pinning a version.
The short version
curl -fsSL https://raw.githubusercontent.com/TorrenClou/deploy/main/install.sh | bashThe installer replaces the container and leaves the volumes alone, so your database, downloads and secrets survive.
Or by hand:
docker pull ghcr.io/torrenclou/torrentclou:latest
docker rm -f torrencloud
# then the same docker run you used originallyDatabase migrations run automatically at start. Watch for
Database migrations applied successfully:
docker logs -f torrencloudBefore a big upgrade: back up
The one thing you cannot recreate is the torrencloud-pgdata volume. It holds your account,
your storage credentials, your job history — and the generated secrets.
docker exec torrencloud pg_dump -U torrenclo_user torrenclo > torrenclou-backup.sql
docker exec torrencloud cat /data/postgres/secrets.env > torrenclou-secrets.envPowerShell:
docker exec torrencloud pg_dump -U torrenclo_user torrenclo | Out-File -Encoding utf8 torrenclou-backup.sql
docker exec torrencloud cat /data/postgres/secrets.env | Out-File -Encoding utf8 torrenclou-secrets.envKeep torrenclou-secrets.env somewhere safe and private — it contains the database password
and the token signing keys. Restoring the database without it leaves everyone logged out and
the database password mismatched.
Restoring
docker exec -i torrencloud psql -U torrenclo_user -d torrenclo < torrenclou-backup.sql
docker restart torrencloudIf the container was recreated from scratch, put the secrets back before starting it, or pass
the old JWT_SECRET, NEXTAUTH_SECRET and POSTGRES_PASSWORD as environment variables.
Rolling back
Images are tagged YYYY.MM.DD-<backend-sha>-<frontend-sha> as well as latest:
docker rm -f torrencloud
docker run -d ... ghcr.io/torrenclou/torrentclou:2026.01.15-a1b2c3d-e4f5g6hThe tag list is on the package page.
Migrations do not roll back. If the version you are leaving added a database change, the older image is running against a schema it does not know about.
TorrenClou will not let that happen quietly. On start it compares the migrations recorded in the database against the ones the running build knows about, and if the database has any it has never heard of, it refuses to start:
Database schema is ahead of this build (20260301120000_AddQuotaTracking).
Refusing to start. Set ALLOW_SCHEMA_AHEAD=true to override.That is the correct outcome. The fix is to restore the dump you took before upgrading, which is why the backup step above matters.
If you understand the risk and want to start anyway — for instance because the newer migration only added a column the older code never reads:
docker run -d ... -e ALLOW_SCHEMA_AHEAD=true ghcr.io/torrenclou/torrentclou:1.4.1Nothing validates that judgement for you. The older code will read and write the newer schema as though it were its own.
In practice: rolling back one release is usually fine, rolling back across a release that changed the schema needs the dump, and the guard tells you which situation you are in.
Pinning a version
Run a specific tag instead of latest and it stays put until you change it. Sensible if you
would rather choose when to take an update.
What version am I on?
curl -s http://localhost:47200/api/version{
"version": "1.0.0",
"buildSha": "757731c15ba2365e0ea9b1d7cfc76778e22871fb",
"buildTime": "2026-09-03T09:00:00Z",
"databaseSchema": "20260214093000_AddStorageProfiles",
"pendingMigrations": 0,
"schemaAhead": false
}databaseSchema is the newest migration recorded in the database, and schemaAhead says
whether the database is newer than the running code. Those two are what tell you whether a
rollback is safe.
The image tag is also readable directly:
docker inspect torrencloud --format '{{.Config.Image}}'Release cadence
The image rebuilds whenever the backend or frontend merges to main, so latest moves with
development. There is no fixed schedule. Pin a tag if you want a slower pace.
Uninstalling
docker rm -f torrencloud
docker volume rm torrencloud-pgdata torrencloud-redis torrencloud-downloadsThe second command deletes everything, including your account. Take a backup first if there is any chance you want it back.