Deploy Pluton with Docker
This guide walks you through deploying Pluton using Docker and Docker Compose for a production-ready backup server.
Quick Start
1. Create Docker Compose File
Create docker-compose.yml:
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
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
# ===== 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:
driver: local
2. Configure Environment Variables
Create a .env file in the same directory for easier management:
ENCRYPTION_KEY=s0eK1r12973fS501SW
USER_NAME=admin
USER_PASSWORD=0123456789
# Optional - override defaults
SERVER_PORT=5173
3. Start Pluton
docker compose up -d
4. Access Pluton
Open your browser and navigate to:
http://localhost:5173
Login with:
- Username: admin (or your configured USER_NAME)
- Password: Your configured USER_PASSWORD
Configuration Details
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
USER_NAME | Yes | admin | Initial admin username |
USER_PASSWORD | Yes | - | Initial admin password (min 8 chars) |
SECRET | Yes | - | JWT token secret key |
ENCRYPTION_KEY | Yes | - | Backup encryption master key |
APP_URL | No | http://localhost:5173 | Public URL for the application |
SERVER_PORT | No | 5173 | Port for the web server |
MQTT_PORT | No | 1883 | [PRO] Port for MQTT broker (remote agents) |
ALLOW_CUSTOM_RESTORE_PATH | No | true | Allow custom restore locations |
ALLOW_FILE_BROWSER | No | true | Enable file browser for path selection |
DISABLE_EVENT_SCRIPTS | No | false | Disable pre/post backup scripts |
Security Notes:
- Never use default passwords in production
- Generate unique SECRET and ENCRYPTION_KEY
- Keep ENCRYPTION_KEY safe - without it, encrypted backups cannot be restored
- Store keys securely (password manager, vault)
Reverse Proxy Setup
For HTTPS and custom domains, use a reverse proxy (nginx, Traefik, Caddy).
Example nginx configuration:
server {
listen 80;
server_name backup.yourdomain.com;
location / {
proxy_pass http://localhost:5173;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Update environment:
environment:
- APP_URL=https://backup.yourdomain.com
Advanced Configuration
Running Behind Traefik
services:
pluton:
image: plutonhq/pluton:latest
labels:
- "traefik.enable=true"
- "traefik.http.routers.pluton.rule=Host(`backup.yourdomain.com`)"
- "traefik.http.routers.pluton.entrypoints=websecure"
- "traefik.http.routers.pluton.tls.certresolver=letsencrypt"
- "traefik.http.services.pluton.loadbalancer.server.port=5173"
networks:
- traefik-network
- pluton-network
Custom Health Check
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5173/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
Useful Commands
# View container details
docker inspect pluton
# Execute commands in container
docker exec -it pluton sh
# Copy files from container
docker cp pluton:/app/data/logs ./logs
# Copy files to container
docker cp ./config.json pluton:/app/data/
# View container processes
docker top pluton
# View container resource usage
docker stats pluton --no-stream
Getting Help
If you encounter issues:
- Check logs:
docker compose logs -f pluton - Verify configuration: Review environment variables and volumes
- Check disk space:
df -h - Review documentation: Pluton Docs
- Report issues: GitHub Issues
Quick Reference
# Start
docker compose up -d
# Stop
docker compose down
# Restart
docker compose restart
# Logs
docker compose logs -f
# Update
docker compose pull && docker compose up -d
# Backup data
docker run --rm -v pluton-data:/data -v $(pwd):/backup \
alpine tar czf /backup/pluton-backup.tar.gz -C /data .
# Check status
docker compose ps
# Shell access
docker exec -it pluton sh