Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server

Guide

How to Expose a Service with Cloudflare Tunnel

Cloudflare Tunnel (cloudflared) publishes a 127.0.0.1 service on your domain without opening firewall ports. Handy for panels and demos.

Steps

  1. Install cloudflared (official package or binary):

    curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
    sudo dpkg -i cloudflared.deb
    cloudflared --version
  2. Authenticate with your Cloudflare account:

    cloudflared tunnel login
  3. Create the tunnel and map a hostname to the local service:

    cloudflared tunnel create my-app
    cloudflared tunnel route dns my-app app.your-domain.com
    cloudflared tunnel run --url http://127.0.0.1:3000 my-app
  4. For production, install the tunnel as a systemd service:

    sudo cloudflared service install
    sudo systemctl enable --now cloudflared
    sudo 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.

Related guides