Self-Hosting on a Raspberry Pi with Dokploy + Cloudflare Tunnels

How I run production-ready services at home on a Raspberry Pi using Dokploy and Cloudflare Tunnels—no port forwarding, no static IP, minimal cost.
How I run production-ready services at home on a Raspberry Pi using Dokploy and Cloudflare Tunnels—no port forwarding, no static IP, minimal cost.
Self-hosting at home used to mean fighting NAT, dynamic IPs, and sketchy port forwarding. That’s no longer necessary.
This setup uses a Raspberry Pi, Dokploy, and Cloudflare Tunnels to create a small but serious home PaaS that’s secure, cheap, and boring to operate—in a good way.
Why self-host at home
- Full control over data and infrastructure
- Fixed hardware cost, zero monthly server bill
- Ideal for internal tools, side projects, and early-stage products
A Raspberry Pi is more than enough if you’re not doing heavy compute. Most web apps are I/O-bound, not CPU-bound.
Fun fact: This entire website runs on a Raspberry Pi at home—frontend, backend, and database—all self-hosted and kept private behind Cloudflare Tunnel.
Dokploy: lightweight PaaS
Dokploy sits on top of Docker and gives:
- App deployments via Git
- Traefik-based routing
- Environment management
- Clean UI without Kubernetes complexity
It’s opinionated, simple, and fits the Pi perfectly.
Cloudflare Tunnel: the missing piece
Cloudflare Tunnel removes all inbound exposure:
- No open ports
- No static IP
- No router configuration
- Origin server is never public
Traffic flow:
DNS → Cloudflare → Tunnel → Traefik → Container
This alone makes home hosting viable.
Security model
- Services only accessible through Cloudflare
- Optional Zero Trust access per app
- TLS handled by Cloudflare
- Pi never exposed to the internet directly
Attack surface stays minimal.
What this is good for
- Personal dashboards
- Internal tools
- APIs
- Early MVPs
- Client demos
What it’s not good for
- High-traffic consumer apps
- Heavy background jobs
- Anything that needs horizontal scaling
Final thoughts
This setup replaces a VPS for a large class of projects. It’s not “for fun” infrastructure—it’s practical.
If your app fits the constraints, a Raspberry Pi + Dokploy + Cloudflare Tunnel is hard to beat!