Cannes, around 04:20âŻAM. The hackathon clock is merciless. Our fundingârate bot is humming, but the graphs? Nonâexistent. âCan we spin up ClickHouse and Grafana now?â asks my teammate, already opening fluence.network in another tab. That night we refined a repeatable recipe: grab a cheap VPS, drop CapRover on top, deploy whatever we need â frontâend, microservice, or a full analytics stack â in minutes, not hours.
Below is the distilled playbook I wish I had earlier. Same conversational style as our arbitrage series, just more commands. đ§
Missed the fundingârate arbitrage article? Catch up here â the stack we deploy will power its dashboards.
Pick any cloud or bareâmetal provider you like â DigitalOcean, Hetzner, AWS Lightsail, your own homelab â the toolchain below works everywhere. Create a midâtier Ubuntu 22.04 box (2â4âŻvCPU, 4â8âŻGBâŻRAM gives ClickHouse and Grafana breathing room), add your public SSH key, and take note of the serverâs public IP. Thatâs all you need for the rest of the guide.
ssh ubuntu@<VPS_IP>
# Always update first
apt update && sudo apt upgrade -ycurl -fsSL https://get.docker.com | sh
sudo usermod -aG docker ubuntu # log out & back in to apply
# Docker Compose plugin
sudo apt install docker-compose-plugin -yQuick sanity check:
docker run hello-worldshould spit out the classic handshake.
Open these ports in your VPS firewall / security group for CapRover & Docker Swarm to work: 80, 443, 3000, 996, 7946, 4789, 2377/tcp 7946, 4789, 2377/udp
CapRover is basically âHeroku + Traefikâ in a single container.
docker run -d \
--name caprover \
-p 80:80 -p 443:443 -p 3000:3000 \
-e ACCEPTED_TERMS=true \
-e MAIN_NODE_IP_ADDRESS='YOUR_VPS_IP' \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /captain:/captain \
caprover/caproverWait ~30Â seconds, then open:
http://<LIGHTSAIL_IP>:3000
Set your root domain (e.g., vps.yourdomain.com) and copy the suggested DNSÂ records.
Default caprover password: captain42
- In your DNS provider, add an AÂ record for
captain.vps.yourdomain.comâ VPS IP. - Back in CapRover, hit âEnable HTTPSâ. Under the hood Letâs Encrypt + Traefik handle certs.
- VoilĂ â dashboard now at
https://captain.vps.yourdomain.com.
- Apps â Create new app â name
clickhouse. - Choose âMethod 3: deploy a preâbuilt imageâ.
- Image name:
clickhouse/clickhouse-server:latest(official image â https://hub.docker.com/r/clickhouse/clickhouse-server/). - Ports: leave 8123 (HTTP) & 9000 (native) exposed.
- Hit Deploy.
Same drill, new app:
- Image:
grafana/grafana:latest(official image â https://hub.docker.com/r/grafana/grafana/) - Exposed port: 3000
- Environment variable:
GF_SECURITY_ADMIN_PASSWORD=supersecret
Deploy! CapRover autoâassigns subdomains:
https://clickhouse.vps.yourdomain.com, https://grafana.vps.yourdomain.com
- Log into Grafana (
admin / supersecret). - Connections â Add data source â ClickHouse.
- URL:
https://clickhouse.vps.yourdomain.com:8123 - Auth: default
default / ''(change in prod!). - Save & test â green check means success.
Now import a dashboard JSON or craft a panel showing average funding rates from your botâs table. Instant visuals, zero glue code.
- Captain Definition files let you version deployments (think dockerâcompose YAML).
- Use CapRover CLI in CI/CD:
caprover deployon everygit push main. - Set up scheduled backups: ClickHouse â S3, Grafana â JSON export.
Speed isnât just nice â itâs morale. When the ideaâ>prototype loop shrinks to minutes, the team stays in flow. CapRover isnât magic, but it removes 80% of yakâshaving:
- No fighting reverse proxies.
- No manual SSL renewals.
- No âwait, which port is that service on?â
The other 20âŻ%? Still on you. Keep your secrets safe, monitor your disk, and rehearse restores. âď¸
Fork this guide, swap in your own services, and deploy something today. Questions, war stories, or better tricks â my DMs are always open.
đŹ Twitter â https://twitter.com/defi_defiler đź LinkedIn â https://www.linkedin.com/in/chlenc