-
Notifications
You must be signed in to change notification settings - Fork 0
Environment Variables
smart-coder997 edited this page Jul 21, 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 the recommendarr service in your docker-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 correct links. |
BASE_URL |
Base path if running the app under a sub-directory (e.g., /recommendarr ). |
/ |
Requires custom Docker image if not / . See Reverse Proxy Setup. |
FORCE_SECURE_COOKIES |
Force session cookies to use Secure flag even if accessed via HTTP. |
false |
Required (true ) when HTTPS reverse proxy 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 container. | false |
Automatically set in official Docker image. |
SESSION_SECRET |
A long, random string to encrypt session cookies. | Random on start | Highly Recommended to set manually or persistence. See Authentication Setup. |
GOOGLE_CLIENT_ID |
Google OAuth Client ID. | null |
See Authentication Setup. |
GOOGLE_CLIENT_SECRET |
Google OAuth Client Secret. | null |
See Authentication Setup. |
GITHUB_CLIENT_ID |
GitHub OAuth Client ID. | null |
See Authentication Setup. |
GITHUB_CLIENT_SECRET |
GitHub OAuth Client Secret. | null |
See Authentication Setup. |
CUSTOM_OAUTH_AUTH_URL |
Auth URL for custom OAuth2. | null |
See Authentication Setup. |
CUSTOM_OAUTH_TOKEN_URL |
Token URL for custom OAuth2. | null |
See Authentication Setup. |
CUSTOM_OAUTH_USERINFO_URL |
User Info URL for custom OAuth2. | null |
See Authentication Setup. |
CUSTOM_OAUTH_CLIENT_ID |
Client ID for custom OAuth2. | null |
See Authentication Setup. |
CUSTOM_OAUTH_CLIENT_SECRET |
Client Secret for custom OAuth2. | null |
See Authentication Setup. |
CUSTOM_OAUTH_SCOPE |
Space-separated scopes for custom OAuth2. | openid profile email |
See Authentication Setup. |
Important: Restart Recommendarr after changing any environment variables for them to take effect.