Repository navigation
SubGen 0.8.0
A simpler setup
Setting up SubGen now means editing two short files. Only the admin password is required; everything else has a sensible default or lives in Settings.
docker-compose.yaml
services:
subgen:
image: ghcr.io/fahed-alhammadi/subgen:latest
container_name: subgen
restart: unless-stopped
gpus: all # remove this line if the host has no NVIDIA GPU
ports:
- "8080:8080" # behind a reverse proxy on this host: "127.0.0.1:8080:8080"
env_file: .env
volumes:
- ./config:/config # database, settings and Studio uploads
- ./models:/models # Whisper and translation models
# Your media folders. Each one becomes a library you add in the web interface.
- /path/to/movies:/media/movies
- /path/to/tv:/media/tv
# Recommended hardening. Safe to keep as is.
security_opt: [no-new-privileges:true]
cap_drop: [ALL]
cap_add: [CHOWN, SETUID, SETGID] # used only at startup to switch to PUID/PGID.env
PUID=1000
PGID=1000
SUBGEN_ADMIN_USERNAME=admin
SUBGEN_ADMIN_PASSWORD=change-me-to-a-long-password- PUID/PGID now work from
.env. The container starts as root only to createconfig/andmodels/and give them to that user, then runs SubGen as that user with no Linux capabilities. Your media folders are never touched. There is no moremkdir/chownstep, and auser:line still works. - No signing key to generate. If
SUBGEN_SECRET_KEYisn't set, SubGen creates one on first start inconfig/secret_key. - Sign-in works over plain HTTP on your LAN. Cookies become HTTPS-only automatically when you reach SubGen over HTTPS, directly or through a reverse proxy.
SUBGEN_SECURE_COOKIESis no longer needed. - Reverse proxies on a Docker network:
SUBGEN_TRUSTED_PROXIESnow accepts a range, for example172.18.0.0/16.
More in Settings
These used to be environment variables. They now apply without a restart:
- Transcription: processing device (Automatic, NVIDIA GPU or CPU) and compute type
- Scanning: how long a new file must stay unchanged before it is processed
- Workspace: largest Studio upload
- System (new section): free disk space to keep, and log detail
- Security: session length, failed sign-ins allowed and the block period, below two-factor sign-in
Upgrading from 0.7
Your current docker-compose.yaml and .env keep working. Variables that moved to Settings become their starting values. To switch to the short files:
- Download the new
docker-compose.yamland put your folders in it. The oldSUBGEN_CONFIG_PATH,SUBGEN_MODEL_PATHandSUBGEN_MEDIA_PATHvalues become the left side of the volume lines. - Keep
PUID,PGID,SUBGEN_ADMIN_USERNAMEandSUBGEN_ADMIN_PASSWORDin.env. The rest can go, includingSUBGEN_SECRET_KEY. - If Compose says the name
subgenis already in use, rundocker rm -f subgenfirst. Your data lives in the mounted folders.
If SubGen ran as root before (no user: line), the first start gives config/ and models/ back to PUID/PGID. Subtitles written as root stay owned by root. The README's Upgrading section has a one-line command to fix them.
Container
docker pull ghcr.io/fahed-alhammadi/subgen:0.8.0
Back up config/ before upgrading, then run docker compose pull && docker compose up -d.
Full changes: v0.7.0...v0.8.0
