TorrenCloud

Configuration Reference

Full reference for all TorrenCloud environment variables.

All configuration is done through environment variables in your .env file.

Required Variables

VariableDescription
POSTGRES_PASSWORDPostgreSQL password (used internally)
JWT_SECRETJWT signing key, minimum 32 characters
NEXTAUTH_SECRETNextAuth.js secret, must differ from JWT_SECRET
ADMIN_EMAILAdmin login email
ADMIN_PASSWORDAdmin login password

Optional Variables

VariableDefaultDescription
ADMIN_NAMEAdminAdmin display name
NEXTAUTH_URLhttp://localhost:47100Public frontend URL (set automatically by installer on remote servers)
PUBLIC_FRONTEND_URLOverride for sslip.io / custom public URL
BACKEND_URLhttp://127.0.0.1:47200Backend URL for server-side auth requests
GOOGLE_CLIENT_IDGoogle OAuth client ID (required only for Google Drive)
POSTGRES_DBtorrencloDatabase name
POSTGRES_USERtorrenclo_userDatabase username
JWT_ISSUERTorrenClou_APIJWT issuer claim
JWT_AUDIENCETorrenClou_ClientJWT audience claim
HANGFIRE_WORKER_COUNT10Background job concurrency

Observability (Optional)

VariableDescription
OBSERVABILITY_LOKI_URLLoki log aggregation endpoint
OBSERVABILITY_OTLP_ENDPOINTOpenTelemetry trace exporter endpoint
OBSERVABILITY_ENABLE_PROMETHEUSExpose /metrics endpoint (true/false)
OBSERVABILITY_ENABLE_TRACINGEnable distributed tracing (true/false)

Data Persistence

Data is stored in Docker volumes:

VolumeContainer PathPurpose
torrencloud-pgdata/data/postgresPostgreSQL database
torrencloud-redis/data/redisRedis data
torrencloud-downloads/data/downloadsDownloaded torrent files

Custom Domain Setup

If deploying on a server with a domain name, set these in .env:

NEXTAUTH_URL=https://your-domain.com:47100
PUBLIC_FRONTEND_URL=https://your-domain.com:47100

The frontend automatically discovers the backend API at runtime using the browser's current origin — no rebuild needed. Google Drive OAuth will use https://your-domain.com:47100/proxy/api/storage/gdrive/callback as the redirect URI.

Generating Secrets

# Linux / macOS
openssl rand -base64 32
# PowerShell
[Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Max 256 }) -as [byte[]])

On this page