Uptime Kuma · deploy guide
Deploy Uptime Kuma on a VPS with Docker Compose
Self-host Uptime Kuma on a Bashrack VPS with persistent volumes and Caddy HTTPS. You manage the server, updates and backups.
about 30 minutes of hands-on time
Who it's for
Customers comfortable managing a Linux server who want their own Uptime Kuma instance.
You'll need
- An approved Bashrack account; review current VPS pricing and availability before adding funds
- An Ubuntu VPS with sudo access and Docker Engine + Compose
- A domain pointing to your VPS and access to its DNS records
Steps
step 1
Prepare a VPS and DNS
Use an Ubuntu VPS with root or sudo access. This guide runs Docker Compose on your VPS; it does not use the managed Web Hosting source picker. Point your domain A record at the VPS public IPv4. You manage updates and backups.
bashmkdir -p ~/uptime-kuma cd ~/uptime-kuma umask 077 printf "DOMAIN=uptime-kuma.example.com\nTZ=UTC\n" > .envstep 2
Install Docker Engine
Install Docker Engine and its Compose plugin using the official Docker Ubuntu instructions linked below. Confirm Docker is running before continuing.
bashsudo docker version sudo docker compose versionstep 3
Save compose.yaml
Save this configuration as compose.yaml in the directory created above. Edit DOMAIN in .env to your real domain before deployment. Only Caddy exposes public ports. Never commit .env or share its contents.
yamlservices: app: image: louislam/uptime-kuma:2 restart: unless-stopped volumes: - app_data:/app/data caddy: image: caddy:2 restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config volumes: app_data: caddy_data: caddy_config:step 4
Configure HTTPS
Save this as Caddyfile, replacing uptime-kuma.example.com with the same domain used in .env. Allow inbound TCP 80 and 443 in your VPS firewall, while preserving your SSH access. Do not expose the app or database port directly.
textuptime-kuma.example.com { reverse_proxy app:3001 }step 5
Validate and start
Run these commands from the directory containing compose.yaml. The first command validates configuration without printing substituted secrets. Inspect service health locally; do not paste logs containing credentials into support messages.
bashsudo docker compose config --quiet sudo docker compose up -d sudo docker compose psstep 6
Finish setup and back up
Open your HTTPS domain and immediately create the Uptime Kuma owner account. If setup fails, check DNS, firewall and container health before retrying. Back up persistent data before upgrading; restarting or recreating the container does not replace a tested backup. Never run docker compose down --volumes unless you intend to erase the data.
Security and upkeep
- Create the owner account before sharing the URL.
- Back up persistent app data.
- Review upstream release notes and test upgrades before changing image versions.
- Keep .env private. Do not expose database ports.