Skip to main content

Quick Start Guide

Get from zero to your first backup in under 5 minutes using Docker.
1

Pull and Run Borg UI

Run the following command to start Borg UI with Docker:
docker run -d \
  --name borg-web-ui \
  -p 8081:8081 \
  -v borg_data:/data \
  -v borg_cache:/home/borg/.cache/borg \
  -v /home/yourusername:/local:rw \
  ainullcode/borg-ui:latest
Replace /home/yourusername with the directory you want to back up. This mounts your host directory to /local inside the container.
What this does:
  • Maps port 8081 for web access
  • Creates borg_data volume for application data (database, SSH keys, logs)
  • Creates borg_cache volume for Borg’s repository cache (improves performance)
  • Mounts your data directory to /local in the container
2

Access the Web Interface

Open your browser and navigate to:
http://localhost:8081
Default Login Credentials:
  • Username: admin
  • Password: admin123
You’ll be prompted to change the password on first login for security.
3

Create Your First Repository

A repository is where Borg stores your backups. Let’s create one:
  1. Click “Repositories” in the sidebar
  2. Click “Create Repository” button
  3. Fill in the repository details:
Repository Name: my-first-backup
Repository Path: /local/backups/borg-repo
Repository Type: Local
Encryption: repokey
Passphrase: [secure-password]
Save your passphrase securely! If you lose it, your backups are unrecoverable. Borg uses strong encryption with no backdoors.
  1. Click “Create” - the repository will be initialized
4

Configure Source Directories

Now tell Borg what to back up:
  1. In the repository details page, find “Source Directories”
  2. Click “Add Source”
  3. Enter the path to back up: /local/Documents (or any directory you mounted)
  4. Optionally add exclude patterns:
    • *.tmp
    • node_modules
    • .git
The /local prefix corresponds to your mounted volume. If you mounted /home/yourusername:/local, then /local/Documents backs up /home/yourusername/Documents on your host.
5

Run Your First Backup

Time to create your first backup!
  1. Click the “Backup Now” button in the repository details
  2. Optionally add a custom archive name or let it auto-generate
  3. Watch the real-time progress:
    • Current file being processed
    • Backup speed (MB/s)
    • Data statistics (original size, compressed, deduplicated)
    • Estimated time remaining
Real-time backup progressYour first backup is complete! 🎉

What’s Next?

Schedule Automatic Backups

Set up automated backups using the visual cron builder

Browse & Restore Files

Browse your backup archives and restore individual files

Configure Notifications

Get alerts via Email, Slack, Discord, and 100+ other services

SSH Remote Backups

Back up to remote servers via SSH/SFTP

Pro Tips

Instead of docker run, use Docker Compose for easier management:Create a docker-compose.yml file:
services:
  borg-ui:
    image: ainullcode/borg-ui:latest
    container_name: borg-web-ui
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - borg_data:/data
      - borg_cache:/home/borg/.cache/borg
      - /home/yourusername:/local:rw
    environment:
      - TZ=America/Chicago
      - PUID=1000
      - PGID=1000

volumes:
  borg_data:
  borg_cache:
Then run:
docker compose up -d
See the Installation Guide for more options including Redis caching.
For large repositories with thousands of files, Redis caching dramatically speeds up archive browsing.Update your docker-compose.yml to include Redis:
services:
  borg-ui:
    image: ainullcode/borg-ui:latest
    container_name: borg-web-ui
    restart: unless-stopped
    ports:
      - "8081:8081"
    volumes:
      - borg_data:/data
      - borg_cache:/home/borg/.cache/borg
      - /home/yourusername:/local:rw
    environment:
      - TZ=America/Chicago
      - PUID=1000
      - PGID=1000
      - REDIS_HOST=redis
      - REDIS_PORT=6379
    depends_on:
      redis:
        condition: service_healthy
    networks:
      - borg_network

  redis:
    image: redis:7-alpine
    container_name: borg-redis
    restart: unless-stopped
    command: redis-server --maxmemory 2gb --maxmemory-policy allkeys-lru
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 3s
      retries: 3
    networks:
      - borg_network

networks:
  borg_network:

volumes:
  borg_data:
  borg_cache:
Learn more in the Cache Configuration guide.
If you encounter permission errors when accessing mounted directories, set the correct user/group IDs:
  1. On your host, run:
    id -u && id -g
    
  2. Add these as environment variables:
    environment:
      - PUID=1000  # Your user ID
      - PGID=1000  # Your group ID
    
  3. Restart the container:
    docker compose down && docker compose up -d
    
The container will automatically adjust file permissions to match your host user.
You can mount as many directories as needed:
volumes:
  - borg_data:/data
  - borg_cache:/home/borg/.cache/borg
  - /home/yourusername:/local/home:rw
  - /var/www:/local/www:ro
  - /mnt/photos:/local/photos:rw
Then create backups from:
  • /local/home/Documents
  • /local/www/html
  • /local/photos/2024
The /local prefix is just a convention. You can use any container path, but remember to set LOCAL_MOUNT_POINTS environment variable to match:
environment:
  - LOCAL_MOUNT_POINTS=/local,/data,/custom

Common First-Time Questions

Your backups are stored in the repository path you specified during setup. In our quick start example, that’s /local/backups/borg-repo inside the container.Since /local is mapped to /home/yourusername on your host, the actual location on your host is:
/home/yourusername/backups/borg-repo
This is where Borg creates its deduplicated backup repository with all your archives.
Absolutely! Just mount your external drive and point the repository there:
docker run -d \
  --name borg-web-ui \
  -p 8081:8081 \
  -v borg_data:/data \
  -v borg_cache:/home/borg/.cache/borg \
  -v /home/yourusername:/local:rw \
  -v /mnt/external-drive:/backup:rw \
  ainullcode/borg-ui:latest
Then create a repository at /backup/borg-repo.
  1. Go to Repositories → Select your repository
  2. Click on Archives tab
  3. Select the archive (backup snapshot) you want to browse
  4. Navigate through the file tree
  5. Select files/folders and click “Restore”
  6. Choose the destination path
The UI provides a file browser with 600x faster performance when using Redis caching.
Borg UI supports two encryption modes:repokey (Recommended)
  • Encryption key is stored in the repository
  • Easier to work with on multiple machines
  • Key is backed up with repository
  • Protected by your passphrase
keyfile
  • Encryption key is stored separately on your local machine
  • More secure (key not in repository)
  • You must manage the keyfile yourself
  • Required on each machine accessing the repository
Both modes use strong encryption (AES-256). Choose repokey for simplicity, keyfile for maximum security.
Yes! Just replace localhost with your server’s IP address:
http://192.168.1.100:8081
If you can’t access it, check your firewall:
sudo ufw allow 8081
For production use, consider setting up a reverse proxy with HTTPS. See the Reverse Proxy Guide for details.

Troubleshooting

Check the container logs:
docker logs borg-web-ui
Common issues:
  • Port 8081 already in use → Change to different port: -p 8082:8081
  • Volume permission errors → Set PUID/PGID to match your user
  1. Verify the mount path exists on your host
  2. Check container can see the mount:
    docker exec borg-web-ui ls /local
    
  3. Set correct PUID/PGID:
    id -u && id -g
    
    Add to environment: PUID=1000 and PGID=1000
First backup is always slower due to:
  • Full data read and chunking
  • Building repository cache
  • Calculating deduplication
Subsequent backups are much faster due to deduplication.To speed up:
  1. Use fast compression like lz4 instead of zlib or lzma
  2. Exclude unnecessary files (node_modules, .git, caches)
  3. Ensure good disk I/O on both source and repository

Next Steps

Now that you have Borg UI running:
  1. Set up automated backups - Use the visual cron builder
  2. Configure notifications - Get alerts when backups succeed or fail
  3. Enable Redis caching - Speed up archive browsing by 600x
  4. Set up SSH backups - Back up to remote servers
  5. Read security best practices - Keep your backups secure
Have questions? Join our Discord community for help!

Build docs developers (and LLMs) love