Skip to main content

Docker Compose Configuration

Borg UI uses Docker Compose for easy deployment with zero-configuration setup and smart defaults.

Quick Start

The default docker-compose.yml provides:
  • Auto-generated SECRET_KEY (persisted to /data/.secret_key)
  • Auto-configured SQLite database at /data/borg.db
  • Redis cache for 600x faster archive browsing
  • Smart defaults for all settings

Complete docker-compose.yml

docker-compose.yml

Service Configuration

App Service

Build Arguments

string
default:"local-dev"
Application version identifier. Auto-populated in CI/CD pipelines.

Privileged Mode

Required ONLY for remote-to-remote backups via SSHFSThis allows mounting remote SSH locations as local filesystems. If you only use local or direct SSH backups, you can disable this:

Ports

Maps the web UI port to the host. Default: 8081 Change via environment variable:
.env

Volumes

Custom mount paths: If you use paths other than /local, update LOCAL_MOUNT_POINTS to match:

Environment Variables

See Environment Variables for complete reference.

Health Check

Ensures the container is healthy and accepting connections.

Redis Service

Redis provides 600x faster archive browsing through intelligent caching.

Redis Configuration

Redis flags explained:
  • --maxmemory 2gb: Maximum memory usage (adjust as needed)
  • --maxmemory-policy allkeys-lru: Evict least recently used keys when full
  • --save "": Disable RDB persistence (cache-only, no disk writes)
  • --appendonly no: Disable AOF persistence
Redis is used purely as a cache - persistence is disabled for better performance. Data loss on restart is acceptable since the cache rebuilds automatically.

Redis Ports

Exposes Redis for external connections (optional). Remove this line if you only need internal access.

Redis Health Check

Production Examples

Minimal Setup (Local Backups Only)

docker-compose.yml

Behind Reverse Proxy with External Redis

docker-compose.yml

High-Performance Setup (Large Repositories)

docker-compose.yml

Common Customizations

Change Port

Multiple Host Directories

Disable Redis (In-Memory Cache Only)

Custom Redis Memory Limit

Management Commands

Troubleshooting

Port Already in Use

Permission Denied

Redis Connection Failed

Reset Everything

This deletes all data including repositories, SSH keys, and settings.

Next Steps

Environment Variables

Complete reference for all configuration options

Cache Configuration

Set up Redis for 600x faster archive browsing

SSH Keys

Configure SSH keys for remote repositories

Deployment

Deploy to production environments