.env file in the project root.
Quick Reference
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | ✓ | ./plank.db | Path to SQLite database file |
DATA_PATH | ✓ | ./data | Directory for downloaded files |
TMDB_API_KEY | ✓ | - | TMDB API key for movie/TV metadata |
PROWLARR_URL | - | http://localhost:9696 | Prowlarr API base URL |
PUBLIC_PROWLARR_URL | - | ${PROWLARR_URL} | Public-facing Prowlarr URL |
PROWLARR_API_KEY | - | - | Prowlarr API key (auto-configured in Docker) |
PROWLARR_CONFIG_PATH | - | - | Path to Prowlarr config.xml (Docker only) |
FLARESOLVERR_URL | - | - | FlareSolverr URL for captcha solving |
OPENSUBTITLES_API_KEY | - | - | OpenSubtitles API key |
OPENSUBTITLES_USERNAME | - | - | OpenSubtitles account username |
OPENSUBTITLES_PASSWORD | - | - | OpenSubtitles account password |
BETTER_AUTH_SECRET | ✓ | - | Secret key for authentication (32+ chars) |
BETTER_AUTH_URL | ✓ | http://localhost:3300 | Base URL for authentication callbacks |
ENABLE_FILE_STORAGE | - | true | Save downloaded files to disk |
PORT | - | 3300 | Server port number |
HOST | - | 0.0.0.0 | Server host binding (Docker: 0.0.0.0) |
ORIGIN | Docker | http://localhost:3300 | Public URL for CSRF protection |
TZ | - | America/New_York | Timezone (Prowlarr/FlareSolverr) |
MEDIA_PATH | - | ./media | Host path for media library (Docker) |
Database Configuration
DATABASE_URL
Path to the SQLite database file. Can be relative or absolute.
The database file will be created automatically on first run. Ensure the directory is writable.
DATA_PATH
Directory where torrent files are downloaded and stored.
Metadata & Search
TMDB_API_KEY
API key from The Movie Database for fetching movie/TV show metadata, posters, and descriptions.
- Create an account at themoviedb.org
- Go to Settings → API
- Request an API key (choose “Developer” option)
- Copy the API Key (v3 auth)
Search functionality requires a valid TMDB API key. Without it, you can only add content via magnet links.
Prowlarr Configuration
Prowlarr provides torrent search functionality by aggregating multiple indexers.PROWLARR_URL
Internal URL for Plank to communicate with Prowlarr.
In Docker, always use the service name (
prowlarr) instead of localhost.PUBLIC_PROWLARR_URL
Public-facing URL for accessing Prowlarr. Defaults to
PROWLARR_URL.PROWLARR_API_KEY
API key for authenticating with Prowlarr. Auto-configured in Docker deployments.
- Access Prowlarr at
http://localhost:9696 - Go to Settings → General
- Copy the API Key
PROWLARR_CONFIG_PATH
Path to Prowlarr’s
config.xml file (Docker only). Used to auto-extract the API key.This is only used in Docker deployments where Prowlarr’s config volume is mounted into the Plank container.
FlareSolverr Configuration
FLARESOLVERR_URL
URL to FlareSolverr service for solving captchas on torrent sites.
FlareSolverr is configured in Prowlarr, not directly in Plank. This variable is for Prowlarr to use.
Subtitle Configuration
OpenSubtitles provides subtitle downloads in multiple languages.OPENSUBTITLES_API_KEY
API key from OpenSubtitles.com for downloading subtitles.
- Create an account at opensubtitles.com
- Go to Consumers
- Create a new application
- Copy the API key
OPENSUBTITLES_USERNAME
Your OpenSubtitles account username.
OPENSUBTITLES_PASSWORD
Your OpenSubtitles account password.
Authentication
BETTER_AUTH_SECRET
Secret key for encrypting session tokens and cookies. Must be at least 32 characters.
BETTER_AUTH_URL
Base URL for authentication callbacks and redirects. Must match the URL users access Plank from.
Include the protocol (
http:// or https://) and port if non-standard.Server Configuration
PORT
Port number the server listens on.
In Docker, this is the internal container port (usually
3000). The host port is configured in docker-compose.yml.HOST
Network interface to bind to.
ORIGIN
Public URL users access Plank from. Required for Docker to prevent CSRF errors.
Storage Configuration
ENABLE_FILE_STORAGE
Whether to save downloaded files to disk. Reserved for future functionality.
Keep this as
true. Setting to false may cause issues in the current version.MEDIA_PATH
Host directory for media library (Docker only). Mounted at
/app/data/library inside the container.Timezone
TZ
Timezone for Prowlarr and FlareSolverr containers.
Example Configurations
Minimal Docker Configuration
.env
Full Docker Configuration
.env
Bare Metal Configuration
.env
Production with HTTPS
.env
Security Best Practices
-
Never commit
.envfiles to version control -
Use strong secrets (32+ characters, random)
-
Restrict file permissions
-
Use environment-specific values
- Development:
http://localhost:3300 - Production:
https://plank.yourdomain.com
- Development:
- Rotate secrets periodically (invalidates existing sessions)
Troubleshooting
Variables not loading
Variables not loading
Ensure Test loading:
.env is in the project root and properly formatted:"CSRF forbidden" error in Docker
"CSRF forbidden" error in Docker
Ensure Restart after changing:
ORIGIN matches your browser URL exactly:Prowlarr connection fails
Prowlarr connection fails
Docker: Verify service name (not Bare Metal: Verify Prowlarr is running:Check API key matches Prowlarr settings:
localhost):- Prowlarr → Settings → General → API Key
Authentication errors
Authentication errors
Verify Ensure
BETTER_AUTH_SECRET is set and at least 32 characters:BETTER_AUTH_URL matches your access URL:Next Steps
Docker Setup
Configure Docker deployment
Bare Metal Setup
Install on your system
Prowlarr Configuration
Set up torrent indexers
Security Guide
VPN setup and best practices