Overview
Docker is the recommended way to run Homarr. The official Docker image includes all dependencies, handles database migrations automatically, and provides a consistent runtime environment across different platforms.The official Homarr Docker image is available at
ghcr.io/homarr-labs/homarr on GitHub Container Registry.Image Architecture
The Homarr Docker image is based on Node.js 24.14.0 Alpine Linux and includes:- Next.js application running on port 3000
- WebSocket server for real-time updates on port 3001
- Background task processor for scheduled jobs
- Nginx reverse proxy on port 7575 (the main entry point)
- Embedded Redis server for caching and sessions
- Database migration tooling for SQLite, MySQL, and PostgreSQL
Basic Installation
Pull the Image
Run the Container
Environment Variables
Required Variables
| Variable | Description | Example |
|---|---|---|
SECRET_ENCRYPTION_KEY | 64-character hex string for AES-256-CBC encryption of secrets | 0000...0000 (64 chars) |
Generate a secure encryption key with:
openssl rand -hex 32Authentication & Authorization
| Variable | Default | Description |
|---|---|---|
AUTH_SECRET | Auto-generated | Secret for Auth.js (generated automatically on startup) |
AUTH_PROVIDERS | credentials | Authentication providers: credentials, oidc, ldap |
AUTH_SESSION_EXPIRY_TIME | - | Session expiration time in seconds |
AUTH_LOGOUT_REDIRECT_URL | - | URL to redirect after logout |
OIDC Authentication (Optional)
LDAP Authentication (Optional)
Database Configuration
SQLite (Default)
MySQL
PostgreSQL
Logging & Monitoring
| Variable | Default | Description |
|---|---|---|
LOG_LEVEL | info | Logging level: debug, info, warn, error |
DISABLE_REDIS_LOGS | false | Disable Redis logging output |
File Permissions
| Variable | Default | Description |
|---|---|---|
PUID | 0 | User ID for running the application |
PGID | 0 | Group ID for running the application |
Set
PUID and PGID to match your host user to avoid permission issues with mounted volumes. Find your IDs with id -u and id -g.Advanced Configuration
| Variable | Default | Description |
|---|---|---|
LOCAL_CERTIFICATE_PATH | /appdata/trusted-certificates | Path for trusted SSL certificates |
DB_MIGRATIONS_DISABLED | false | Disable automatic database migrations |
REDIS_IS_EXTERNAL | false | Use external Redis instead of embedded instance |
REDIS_HOST | - | External Redis hostname (if REDIS_IS_EXTERNAL=true) |
REDIS_PORT | - | External Redis port (if REDIS_IS_EXTERNAL=true) |
ENABLE_KUBERNETES | false | Enable Kubernetes integration features |
TURBO_TELEMETRY_DISABLED | 1 | Disable Turborepo telemetry |
Volume Mounts
Application Data Volume
The/appdata volume contains all persistent data:
-v /path/to/homarr/data:/appdata
Network Configuration
Exposed Ports
| Port | Service | Description |
|---|---|---|
| 7575 | Nginx Proxy | Main entry point for HTTP and WebSocket traffic |
Ports 3000 (Next.js) and 3001 (WebSocket) are used internally and don’t need to be exposed.
Reverse Proxy Setup
If you’re using a reverse proxy (Nginx Proxy Manager, Traefik, Caddy), configure it to:- Forward HTTP traffic to port 7575
- Enable WebSocket support for
/websocketspath - Set appropriate headers:
Container Management
View Logs
Access Container Shell
Use Homarr CLI
The container includes the Homarr CLI tool:Restart Container
Stop Container
Remove Container
Updating Homarr
Start the new container
Use the same
docker run command you used initially, with all the same environment variables and volume mounts.Database migrations run automatically on startup. The first start after an update may take slightly longer.
Troubleshooting
Database Migration Errors
If migrations fail, check:Permission Issues
If you see permission errors:-
Check file ownership:
-
Set correct PUID/PGID:
-
Recreate container with correct IDs:
Container Won’t Start
-
Check for port conflicts:
-
Verify volume mount exists:
-
Check Docker daemon logs:
High Memory Usage
If Homarr uses too much memory:-
Consider using external Redis:
-
Limit Docker container memory:
Best Practices
- Always use volume mounts for
/appdata- never store data in the container - Save your encryption key in a password manager or secure vault
- Use external databases (MySQL/PostgreSQL) for production deployments
- Enable automatic restarts with
--restart unless-stopped - Monitor logs regularly for errors and performance issues
- Keep containers updated by pulling latest images weekly
- Backup before updates to avoid data loss
- Use specific version tags in production instead of
latest
Next Steps
Docker Compose
Simplify management with Docker Compose
Bare Metal Installation
Run Homarr directly on your system
Configuration Guide
Learn about advanced configuration options
Database Setup
Set up external MySQL or PostgreSQL
