Self-hosting on a Raspberry Pi with Coolify and Cloudflare
When I had solar panels installed earlier this year, I switched to the Octopus Agile tariff. It’s a brilliant idea — half-hourly electricity prices that reflect the real-time cost of energy. But, while Octopus have a good mobile app, it’s not particularly easy to dig into the agile prices
I wanted a simple UI that could tell me when to charge my home battery for the lowest cost. Something clear, fast, and accessible — not a spreadsheet or a hard to read graph on a mobile app.
That’s how https://agile.nickjones.tech came to life.
Why a Raspberry Pi?
Raspberry Pis are surprisingly capable these days. Mine already runs a local Grafana instance and Home Assistant, so it’s always online and rarely idle.
And let’s be honest — the incremental costs of side projects are non-zero. I’m increasingly aware of how many £5 and $10 monthly services I’ve accumulated over the years. For a long time Heroku was my go to choice, but those days are gone. 💔
So instead of spinning up yet another cloud instance, I decided to host the site on my Pi, quietly sitting in the corner of my office.
First time with Coolify
I’d been planning to install k3s, but decided to try something lower effort this time. Enter Coolify — a self-hosted PaaS that just works, and you can run it entirely on your own hardware.
This was my first experience with it, and I’m impressed. Coolify runs on the Pi and manages my containers effortlessly. It’s early days, but I’ve not noticed any issues with performance either.
Deploying with Coolify is a simple git push that triggers a build of my Docker images and a then a rolling update.
Honestly, it’s really cool.
Security via Cloudflare Tunnel
Of course, exposing anything from your home network comes with risk. I didn’t fancy opening ports on my router, so I used Cloudflare Tunnel to handle secure ingress.
Coolify’s built-in integration made this painless — no need to install or configure cloudflared manually. The Pi sits directly on my LAN, which I might rethink eventually, but the isolation and containerisation give me some peace of mind.
It’s a neat trick: public access without the exposure.
The site itself
Visit https://agile.nickjones.tech and you’ll see the half-hourly Agile prices plotted through the day. The UI highlights the optimal times to charge based on those rates — that’s when the electricity is cheapest, and the grid is often at its cleanest.
It’s early days, but it’s already proving useful. Instead of guessing or checking the Octopus app, I can glance at the chart and plan my charging around the dips.
Coolify feels like the missing piece for small, self-hosted projects. It’s the kind of tool that makes a Raspberry Pi feel like a tiny cloud provider sitting on your desk.
Between that and Cloudflare’s tunnel magic, I’ve now got a little slice of production infrastructure running in my office — quietly, securely, and without another monthly bill.