Getting Started
When cloning Homarr, you’ll find a.env.example file. Copy this file to .env and populate it with your values:
Required Variables
These environment variables are required for Homarr to function properly.Secret key used by Auth.js for encrypting JWTs and mail hashes. While not actively used for encryption in Homarr, it’s required by Auth.js.Example:
A 32-byte (64 character) hex string used to encrypt integration secrets in the database. This is critical for security.Generate a key:Example:
Database Configuration
Homarr supports three database drivers: SQLite, MySQL, and PostgreSQL.- SQLite
- MySQL
- PostgreSQL
Authentication Configuration
See the Authentication Providers page for detailed authentication configuration.Comma-separated list of authentication providers to enable. Supported values:
credentials, ldap, oidc.How long user sessions remain valid. Accepts duration format (e.g.,
30d, 7d, 12h).URL to redirect users to after logout. Must be a valid URL.
Redis Configuration
Redis is optional and used for caching and session management in distributed deployments.Whether to use an external Redis server.
Redis server hostname.
Redis server port.
Redis username for authentication.
Redis password for authentication.
Path to TLS CA certificate for Redis connection.
Redis database index to use.
Application Settings
Logging verbosity level. Available options:
trace, debug, info, warn, error, fatal.Full path to directory containing trusted SSL certificates. Used for connecting to services with self-signed certificates.
API key for internal communication between nextjs-api and tasks-api. Generated automatically on container start.Generate manually:
Disable all external network connections for air-gapped deployments.
Disable Turborepo telemetry.
Feature Flags
Enable Kubernetes integration features.
Enable mock integration for testing purposes. Only use in development.
Example Configuration
Here’s a complete example.env file for a production deployment:
.env
Next Steps
- Database Setup - Configure your database
- Authentication Providers - Set up authentication
- CLI Commands - Manage users with CLI tools
