Apply for Free VPS

Publish a site with Cloudflare Tunnel

Updated 27 Nov 2026 https cloudflare tunnel

Serve a website from a shared-IPv4 plan through an outbound tunnel.

A server with a dedicated IPv4 address does not need a tunnel to serve a website. It is still an option if you prefer not to open inbound ports.

A tunnel connects outward from your server to Cloudflare, which then serves visitors on normal web addresses. No inbound ports are needed. It is a third-party service with its own terms and limits; read them first. Your domain's DNS must be managed in Cloudflare.

Set it up

In the Cloudflare dashboard, open Zero Trust, then Networks and Tunnels, create a tunnel and choose your Linux distribution. Cloudflare shows the exact install command containing your tunnel token. Run it on your server. Menu names can change, so follow Cloudflare's current documentation.

Add a public hostname

In the tunnel's settings add, for example:

Public hostname Service
app.example.com http://localhost:3000

Check

systemctl status cloudflared
journalctl -u cloudflared -n 50 --no-pager

Keep the application private

Bind it to 127.0.0.1 so it is reachable only through the tunnel.

Security

The token lets someone run your tunnel: keep it secret and rotate it if exposed. Add access rules for admin pages.

Content you publish must still follow our Acceptable Use Policy.

Was this helpful?

Report outdated or incorrect information