Skip to content

A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.

2.9 KB
Raw Blame
services:
  pluton:
    image: plutonhq/pluton:latest
    # Uncomment below to build locally instead of pulling from Docker Hub
    # build:
    #   context: .
    #   dockerfile: Dockerfile
    container_name: pluton-backup
    restart: unless-stopped

    ports:
      - "${SERVER_PORT:-5173}:${SERVER_PORT:-5173}"

    volumes:
      # Main data volume - contains database, config, logs
      - pluton-data:/data

      # Optional: Mount host directories to backup

      # Example: Make user's documents folders Accessible to Pluton
      # - /home/user/documents:/mnt/documents:ro  #linux
      # - /home/user/photos:/mnt/photos:ro  #linux
      # - C:/Users/username/Documents:/mnt/documents:ro # Windows
      # - C:/Users/username/Pictures:/mnt/photos:ro # Windows

      # Example: Make a Docker volume (named 'wp-data') Accessible to Pluton
      # - /var/lib/docker/volumes/wp-data/_data:/mnt/wordpress:ro #linux
      # - C:/ProgramData/docker/volumes/wp-data/_data:/mnt/wordpress:ro  # Windows

      # Example: Make the whole Docker volume data Accessible to Pluton
      # - /var/lib/docker/volumes:/mnt/docker-volumes:ro #linux
      # - C:/ProgramData/docker/volumes:/mnt/docker-volumes:ro  # Windows

      # Example: Mount a host directory to store backups in (Local Storage)
      # Leave out ":ro", a backup destination has to be writable. In Pluton,
      # select the container path (/mnt/backups), not the host path.
      # - /mnt/disk1/backups:/mnt/backups #linux
      # - D:/backups:/mnt/backups # Windows

    environment:
      # ===== REQUIRED: Security & Authentication =====
      # Generate secure random strings (min 12 characters for the first three)
      ENCRYPTION_KEY: ${ENCRYPTION_KEY} # Encryption key for restic/rclone Snapshot encryption
      USER_NAME: ${USER_NAME} # Admin username for login
      USER_PASSWORD: ${USER_PASSWORD} # Admin password for login

      # ===== Application Settings =====
      APP_TITLE: ${APP_TITLE:-Pluton}
      APP_URL: ${APP_URL:-http://localhost:5173}
      SERVER_PORT: ${SERVER_PORT:-5173}
      MAX_CONCURRENT_BACKUPS: ${MAX_CONCURRENT_BACKUPS:-2}
      SESSION_DURATION: ${SESSION_DURATION:-7} # How long frontend login Session lasts in Days

      # TRUST_PROXY: ${TRUST_PROXY:-1} #Uncomment when running Pluton behind a reverse proxy (Caddy, Nginx, Traefik, ...).

      # ===== User Interface Security Settings =====
      ALLOW_CUSTOM_RESTORE_PATH: ${ALLOW_CUSTOM_RESTORE_PATH:-true}
      ALLOW_FILE_BROWSER: ${ALLOW_FILE_BROWSER:-true}
      DISABLE_EVENT_SCRIPTS: ${DISABLE_EVENT_SCRIPTS:-false}

      # ===== Docker-specific (do not change) =====
      NODE_ENV: production
      IS_DOCKER: "true"

    healthcheck:
      test:
        [
          "CMD",
          "sh",
          "-c",
          "wget --no-verbose --tries=1 --spider http://localhost:${SERVER_PORT:-5173}/api/health",
        ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

volumes:
  pluton-data: