Cloudflare Tunnel (cloudflared) publishes a 127.0.0.1 service on your domain without opening firewall ports. Handy for panels and demos.
Steps
Install cloudflared (official package or binary):
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.debsudo dpkg -i cloudflared.debcloudflared --versionAuthenticate with your Cloudflare account:
cloudflared tunnel loginCreate the tunnel and map a hostname to the local service:
cloudflared tunnel create my-appcloudflared tunnel route dns my-app app.your-domain.comcloudflared tunnel run --url http://127.0.0.1:3000 my-appFor production, install the tunnel as a systemd service:
sudo cloudflared service installsudo systemctl enable --now cloudflaredsudo systemctl status cloudflared --no-pager
Tips
- The origin can stay closed in UFW; only the tunnel egresses to Cloudflare.
- Add Access / Zero Trust policies if the panel must not be public.
ext step
A stable origin behind the tunnel: Deploy your Cloud VPS.