Overview
Docker Compose is the recommended deployment method for Borg UI. It provides:- Automatic Redis setup for 600x faster archive browsing
- Persistent volumes for data and cache
- Health checks and automatic restarts
- Easy configuration via
.envfile - Service dependencies and networking
Quick Start
1
Create docker-compose.yml
Create a
docker-compose.yml file:2
Create .env file (optional)
Create a
.env file in the same directory to customize settings:3
Start the services
4
Verify it's running
http://localhost:8081Default credentials: admin / admin123Configuration
Volume Mounts
Application Data
- SQLite database
- SSH keys and Borg encryption keys
- Configuration files
- Logs
- Auto-generated
SECRET_KEY
Borg Cache
Host Filesystem
Docker Socket (Optional)
Environment Variables
Core Settings
User/Group IDs
Timezone
Security
If
SECRET_KEY is not set, it will be auto-generated and persisted to /data/.secret_key.Redis Cache
Borg Timeouts
For large repositories with long cache build times:Disable Authentication
Privileged Mode
Privileged mode is required only for remote-to-remote backups via SSHFS. If you only use local or direct SSH backups, you can remove this line.
Redis Configuration
The included Redis service is configured for optimal caching:- maxmemory: Limits Redis memory usage to 2GB
- allkeys-lru: Evicts least recently used keys when memory limit is reached
- save "": Disables persistence (cache data doesn’t need to survive restarts)
- appendonly no: Disables append-only file for better performance
Using External Redis
To use an external Redis instance:REDIS_URL and set individual parameters:
redis service from your docker-compose.yml.
Management Commands
Start services
Stop services
View logs
Restart services
Check service status
Update to latest version
1
Pull latest images
2
Recreate containers
3
Remove old images
Rebuild from source
If using the build context instead of pre-built images:Access container shell
View resource usage
Production Example
Complete production-ready configuration:docker-compose.yml
.env
Troubleshooting
Services not starting
Check logs for errors:Redis connection issues
Verify Redis is healthy:Permission issues
-
Check PUID/PGID match your host user:
-
Update
.envfile with correct values -
Recreate containers:
Port conflicts
If port 8081 is already in use, change it in.env:
Health check failures
Increase start_period for slower systems:Next Steps
Reverse Proxy
Run behind Nginx or Traefik with SSL
Unraid
Deploy on Unraid with Community Applications