.env configuration
This file configures a Docker installation. Copy the template included with PlexSub, change only the values listed here, and keep the file out of Git.
You do not need to put every integration credential in .env when you configure it in Settings > Services. PlexSub stores those credentials encrypted in its database.

Basic installation
| Variable | When to change it | Example |
|---|---|---|
COMPOSE_PROJECT_NAME | When you want a different name for the Docker installation. | plexsub |
PORT | When port 5000 is already in use. | 5000 |
APP_IMAGE_REF | To choose the PlexSub image you will run. | Image specified by the installed version |
PLEXSUB_POSTGRES_IMAGE_REF | Only when following an official PostgreSQL guide. | postgres:18.4-alpine |
APP_TIMEZONE | To use your timezone for dates and notifications. | Europe/Madrid |
Database
| Variable | What to enter |
|---|---|
POSTGRES_DB | The database name; normally plexsub. |
POSTGRES_USER | A PostgreSQL user dedicated to PlexSub. |
POSTGRES_PASSWORD | A long, unique, private password. |
Do not change PostgreSQL's major version over the same volume. Back up, restore into a new volume, and validate before replacing the installation.
Security and access
| Variable | When to use it |
|---|---|
APP_SETTINGS_ENCRYPTION_KEY | Required. Use a long key distinct from every other secret. Keep it with your backups. |
SESSION_SIGNING_SECRET | Required. Use another long, distinct secret. |
PLEXSUB_SETUP_TOKEN | Optional. A temporary token to protect the initial setup when your installation needs it. |
APP_BASE_URL | The URL people will use: https://plexsub.yourdomain.com when public, or the local URL used by your installation. |
TRUST_PROXY_LEVEL | Leave at 0 for direct access. Use 1 only when a trusted reverse proxy or tunnel sits in front of PlexSub. |
FORCE_SECURE_COOKIES | Use 1 with public HTTPS. Do not enable it for an HTTP-only local-network installation. |
Generate secrets with OpenSSL:
openssl rand -base64 48
Generate one value per secret. Do not reuse the PostgreSQL password as an encryption key or session secret.
Variable-based integrations
The preferred option is adding integrations in Settings > Services. If your installation method uses variables, define only those for the service you use:
| Service | Common variables |
|---|---|
| Plex | PLEX_SERVER_URL, PLEX_TOKEN |
| Jellyfin | JELLYFIN_URL, JELLYFIN_API_KEY |
| Emby | EMBY_URL, EMBY_API_KEY |
| Seerr, Overseerr, or Jellyseerr | OVERSEERR_URL, OVERSEERR_API_KEY |
| Radarr or Sonarr | RADARR_URL, RADARR_API_KEY, SONARR_URL, SONARR_API_KEY |
| qBittorrent | QBITTORRENT_URL, QBITTORRENT_USERNAME, QBITTORRENT_PASSWORD |
| Bazarr | BAZARR_URL, BAZARR_API_KEY |
| Tautulli | TAUTULLI_URL, TAUTULLI_API_KEY |
| SMTP | SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, SMTP_FROM |
Read Integrations to choose what you need and Integration diagnostics when a connection fails.
Minimal example
COMPOSE_PROJECT_NAME=plexsub
PORT=5000
POSTGRES_DB=plexsub
POSTGRES_USER=plexsub
POSTGRES_PASSWORD=put_a_long_unique_password_here
APP_SETTINGS_ENCRYPTION_KEY=put_a_long_unique_key_here
SESSION_SIGNING_SECRET=put_another_long_unique_secret_here
APP_BASE_URL=http://localhost:5000
APP_TIMEZONE=Europe/Madrid
TRUST_PROXY_LEVEL=0
FORCE_SECURE_COOKIES=0
When publishing PlexSub over HTTPS, set APP_BASE_URL to your https:// address, set FORCE_SECURE_COOKIES=1, and follow the secure publishing guide.
Never include
- Passwords, tokens, or API keys in screenshots or messages.
- The
.envfile in Git. - Backups or keys in public folders.
- Undocumented variables “to try”: they are not needed for a normal installation.