Files
BackupX/docs-site/docs/deployment/docker.md
Wu Qing 61709dd4c9 fix(cluster): support external master URL
- add server.external_url / BACKUPX_SERVER_EXTERNAL_URL for Agent install URL generation
- pass the configured external Master URL into install script and compose rendering
- document cluster deployment requirements for Docker, bare-metal, and multi-node setups

Fixes #55
2026-05-09 07:41:51 +08:00

2.3 KiB

sidebar_position, title, description
sidebar_position title description
1 Docker Deployment Production-style Docker deployment with docker compose, mounted source directories, and environment overrides.

Docker Deployment

BackupX's official Docker image awuqing/backupx supports multi-architecture (linux/amd64 + linux/arm64).

Compose file

services:
  backupx:
    image: awuqing/backupx:latest
    container_name: backupx
    restart: unless-stopped
    ports:
      - "8340:8340"
    volumes:
      - backupx-data:/app/data
      # Mount host directories you want to back up:
      - /var/www:/mnt/www:ro
      - /etc/nginx:/mnt/nginx-conf:ro
    environment:
      - TZ=Asia/Shanghai
      # Required when remote Agents must connect through a public or routed URL:
      # - BACKUPX_SERVER_EXTERNAL_URL=https://backup.example.com
      - BACKUPX_LOG_LEVEL=info
      - BACKUPX_BACKUP_MAX_CONCURRENT=2

volumes:
  backupx-data:

Start with:

docker compose up -d

Host-directory backup

To back up files from the host, mount them into the container. When creating a file-type task in the web UI, point the source path at the mount location (e.g. /mnt/www). Make sure the directory is visible inside the container.

Multi-node clusters

When deploying Agents on other machines, set BACKUPX_SERVER_EXTERNAL_URL on the Master container to the URL that those Agents can reach:

environment:
  - BACKUPX_SERVER_EXTERNAL_URL=https://backup.example.com

Use an HTTPS URL if Agents cross untrusted networks. The generated one-click install scripts and docker-compose snippets use this value as BACKUPX_AGENT_MASTER.

Environment variables

All configuration keys can be overridden with the BACKUPX_ prefix:

environment:
  - TZ=Asia/Shanghai
  - BACKUPX_SERVER_PORT=8340
  - BACKUPX_LOG_LEVEL=debug
  - BACKUPX_BACKUP_MAX_CONCURRENT=4
  - BACKUPX_BACKUP_TEMP_DIR=/tmp/backupx

See the Configuration page for the full list.

Upgrades

Check System Settings → Check Updates in the UI to see if a new version is available, then on the host:

docker compose pull && docker compose up -d

No migrations needed — BackupX auto-migrates the SQLite schema on startup.