-
Notifications
You must be signed in to change notification settings - Fork 16
Environment Variables
fingerthief edited this page Apr 12, 2025
·
1 revision
Recommendarr uses environment variables for configuration. These can be set in various ways depending on your installation method:
-
Docker Run: Use the
-e VARIABLE=value
flag (e.g.,-e PORT=8080
). -
Docker Compose: Define them under the
environment:
section for therecommendarr
service in yourdocker-compose.yml
file. -
Manual Installation: Create a
.env
file in the project root directory (f:/Development/recommendarr
) and define variables asVARIABLE=value
, one per line. Alternatively, set them directly in your shell before running the application (e.g.,export PORT=8080
).
Variable | Description | Default | Notes |
---|---|---|---|
PORT |
The single port used for both the frontend and the backend API. | 3000 |
Ensure this matches the port exposed in Docker (-p ). |
PUBLIC_URL |
The full public URL where the app is accessible (e.g., https://rec.domain.com ). |
http://localhost:${PORT} |
Crucial for OAuth redirects and generating correct links. Set this accurately, especially behind a reverse proxy. |
BASE_URL |
Base path if running the app under a sub-directory (e.g., /recommendarr ). |
/ |
Requires building a custom Docker image if not / . See Reverse Proxy Setup. |
FORCE_SECURE_COOKIES |
Force session cookies to use the Secure flag even if accessed via HTTP. |
false |
Required (true ) when using an HTTPS reverse proxy that terminates SSL. See Troubleshooting. |
NODE_ENV |
Node.js environment mode. | production |
Should generally be kept as production . |
DOCKER_ENV |
Internal flag to indicate if running inside the official Docker container. | false |
Automatically set to false in the official Docker image. |
SESSION_SECRET |
A long, random, secret string used to encrypt session cookies. | Randomly generated on start | Highly Recommended to set manually for persistence. See Authentication Setup. |
GOOGLE_CLIENT_ID |
Google OAuth Client ID for enabling Google login. | null |
See Authentication Setup. |
GOOGLE_CLIENT_SECRET |
Google OAuth Client Secret for enabling Google login. | null |
See Authentication Setup. |
GITHUB_CLIENT_ID |
GitHub OAuth Client ID for enabling GitHub login. | null |
See Authentication Setup. |
GITHUB_CLIENT_SECRET |
GitHub OAuth Client Secret for enabling GitHub login. | null |
See Authentication Setup. |
CUSTOM_OAUTH_AUTH_URL |
Authorization URL for a custom OAuth2 provider. | null |
See Authentication Setup. |
CUSTOM_OAUTH_TOKEN_URL |
Token URL for a custom OAuth2 provider. | null |
See Authentication Setup. |
CUSTOM_OAUTH_USERINFO_URL |
User Info URL for a custom OAuth2 provider. | null |
See Authentication Setup. |
CUSTOM_OAUTH_CLIENT_ID |
Client ID for a custom OAuth2 provider. | null |
See Authentication Setup. |
CUSTOM_OAUTH_CLIENT_SECRET |
Client Secret for a custom OAuth2 provider. | null |
See Authentication Setup. |
CUSTOM_OAUTH_SCOPE |
Scopes (space-separated) requested from the custom OAuth2 provider. | openid profile email |
See Authentication Setup. |
Important: Restart Recommendarr after changing any environment variables for them to take effect.