# Docker Compose stack for the rclone webgui. # # The rclone rcd container does three jobs on one port: # - Serves the static frontend from webgui/web/ (--rc-files) # - Serves RC API endpoints at POST /* (built-in) # - Serves remote files at GET /: (--rc-serve) # # The jobs-api sidecar stores recurring task definitions in SQLite and starts # scheduled runs through rclone RC. The browser calls it on port 5581. # Default port bindings are loopback-only because the RC API runs without auth. # For LAN/public access, either put TLS/authentication in a reverse proxy first, # or set WEBGUI_BIND_ADDR, JOBS_API_BIND_ADDR, and JOBS_API_ALLOWED_ORIGINS in # a local .env file. # # rclone config lives in ./config/rclone/rclone.conf (bind-mounted). # If it doesn't exist yet, create your remotes with: # docker compose exec rclone rclone config # or copy an existing rclone.conf into ./config/rclone/ before starting. # # Usage: # docker compose up -d # start # open http://localhost:5580 # docker compose logs -f rclone # tail rclone logs # docker compose logs -f jobs-api # tail scheduler/API logs # docker compose down # stop services: rclone: image: rclone/rclone:latest container_name: rclone-webgui command: - rcd - --rc-no-auth - --rc-addr=:8080 - --rc-files=/web - --rc-serve - --rc-job-expire-duration=24h - --rc-job-expire-interval=1m - -vv volumes: # Static frontend served by rclone's own http.FileServer. - ./webgui/web:/web:ro # rclone looks for $XDG_CONFIG_HOME/rclone/rclone.conf; the # official image sets XDG_CONFIG_HOME=/config. - ./config/rclone:/config/rclone # Cache dir for tokens, chunk cache, vfs cache, etc. - rclone-cache:/cache # Scratch space for any local-FS remotes that point here. - rclone-data:/data # Expose the host /root tree to local filesystem transfer jobs. - /root:/root environment: - XDG_CONFIG_HOME=/config - RCLONE_CACHE_DIR=/cache ports: - "${WEBGUI_BIND_ADDR:-127.0.0.1}:5580:8080" restart: unless-stopped jobs-api: image: python:3.12-alpine container_name: rclone-jobs-api command: ["python", "/app/server.py"] depends_on: - rclone volumes: - ./webgui/api:/app:ro - ./webgui/data:/data environment: - JOBS_DB=/data/jobs.sqlite - JOBS_API_HOST=0.0.0.0 - JOBS_API_PORT=8081 - JOBS_SCHEDULER_INTERVAL=15 - JOBS_API_ALLOWED_ORIGINS=${JOBS_API_ALLOWED_ORIGINS:-http://localhost:5580,http://127.0.0.1:5580} - RCLONE_RC_URL=http://rclone:8080 ports: - "${JOBS_API_BIND_ADDR:-127.0.0.1}:5581:8081" restart: unless-stopped volumes: rclone-cache: rclone-data: