cd /news/developer-tools/through-the-tunnel-ep-5-of-the-0-clo… · home topics developer-tools article
[ARTICLE · art-92058] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Through the Tunnel(Ep-5 of The $0 cloud)

A developer successfully hosted a website from their own server behind CGNAT using Cloudflare Tunnel, achieving their goal of zero-cost hosting. The project involved learning Linux, Docker, networking, and Cloudflare, and the developer plans to buy a domain for a permanent URL.

read2 min views1 publishedAug 11, 2026

After searching for a solution (I just GPT'd my way through it lol), I found that Cloudflare was the way to go.

The thing about CGNAT (Carrier-Grade Network Address Translation) is that it allows outgoing requests. Things like opening YouTube, calling an external API, down files, or even my server pulling code from GitHub all work just fine.

Cloudflare creates a secure tunnel that lets it communicate with my server even though it's sitting behind CGNAT.

The flow is roughly:

Visitor → Cloudflare → Tunnel → My Server

And the response follows the same path back.

But the cool part is, Cloudflare isn't actually punching through CGNAT.

It uses an already-existing connection that my server made to Cloudflare, and routes the incoming requests through that connection.

So I created an account on Cloudflare, tried installing Cloudflare Tunnel, and found out they provide stable Docker images for it.

So obviously, I installed it through Docker because at this point, I'm doing nearly everything with Docker—Postgres, Nginx, and even my database storage!

And I was able to test the tunnel quickly with a temporary tunnel and URL. I opened the URL using my phone's mobile data.

And oh boy... I finally did it.

A website, hosted from my own server, running behind my own network, and accessible to anyone on the internet.

That feeling was awesome.

The problem was, I definitely needed a domain—or maybe I didn't, but buying one seemed like the most feasible option.

Cloudflare's temporary tunnel gave me HTTPS and a random URL, but that URL wasn't something I could properly control or use as a permanent address.So there was no permanent URL that I could actually control.

All that's left now is to buy a domain, configure it, and point it to my server.

And that's it.

I started this whole thing with one simple goal: host a website from my own server without spending a penny.

And somehow, along the way, I ended up learning about Linux, Docker, networking, CGNAT, Nginx, SSH, Cloudflare, and a whole lot of things I never expected to touch.

But hey... I actually did it.

I hosted my own website. From my own server. Without paying for hosting.

── more in #developer-tools 4 stories · sorted by recency
── more on @cloudflare 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/through-the-tunnel-e…] indexed:0 read:2min 2026-08-11 ·