Skip to content

SubGen 0.8.0

Choose a tag to compare

@Fahed-Alhammadi Fahed-Alhammadi released this 14 Nov 09:56
· 11 commits to main since this release

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 create config/ and models/ 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 more mkdir/chown step, and a user: line still works.
  • No signing key to generate. If SUBGEN_SECRET_KEY isn't set, SubGen creates one on first start in config/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_COOKIES is no longer needed.
  • Reverse proxies on a Docker network: SUBGEN_TRUSTED_PROXIES now accepts a range, for example 172.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

Settings with the processing device and compute type

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:

  1. Download the new docker-compose.yaml and put your folders in it. The old SUBGEN_CONFIG_PATH, SUBGEN_MODEL_PATH and SUBGEN_MEDIA_PATH values become the left side of the volume lines.
  2. Keep PUID, PGID, SUBGEN_ADMIN_USERNAME and SUBGEN_ADMIN_PASSWORD in .env. The rest can go, including SUBGEN_SECRET_KEY.
  3. If Compose says the name subgen is already in use, run docker rm -f subgen first. 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