Integrations
Cloudflare Tunnel
Publish services on localhost to the public internet through an encrypted Cloudflare outbound connection — no port forwarding, no static IP, automatic TLS.
Overview
KillTheHost integrates with Cloudflare Tunnel so you can host websites, APIs, and the control panel without exposing router ports. The tunnel runs as cloudflared on the host and forwards inbound traffic to containers managed by STAX-MNGR or services running on the loopback interface.
Prerequisites
- A domain added to Cloudflare with nameservers delegated to Cloudflare.
- A Cloudflare account with Zero Trust enabled (free tier is sufficient).
- Admin/sudo access on the host to install the
cloudflareddaemon.
Install cloudflared
Linux (Debian/Ubuntu)
$curl -L --output cloudflared.deb \ https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb$sudo dpkg -i cloudflared.deb$cloudflared --versionmacOS
$brew install cloudflared$cloudflared --versionWindows
Download the MSI installer from the cloudflared releases page and run it as administrator. After installation, open a new PowerShell window.
Authenticate & create tunnel
Authenticate cloudflared with your Cloudflare account. This opens a browser window where you select the zone the tunnel will live in.
$cloudflared tunnel loginThen create the tunnel and note the UUID that is returned.
$cloudflared tunnel create killthehostTunnel created: 87d3a1f6-0b7e-4a91-8c4d-bd0e5e9a6f2cRoute hostnames
Create a config file at $HOME/.cloudflared/config.yml that maps hostnames to local services.
tunnel: 87d3a1f6-0b7e-4a91-8c4d-bd0e5e9a6f2ccredentials-file: /home/you/.cloudflared/87d3a1f6-0b7e-4a91-8c4d-bd0e5e9a6f2c.jsoningress: - hostname: app.example.com service: http://localhost:8080 - hostname: api.example.com service: http://localhost:3000 - hostname: panel.example.com service: http://localhost:5000 - service: http_status:404Register each hostname as a public DNS record pointing at the tunnel.
$cloudflared tunnel route dns killthehost app.example.com$cloudflared tunnel route dns killthehost api.example.com$cloudflared tunnel route dns killthehost panel.example.comRun as a service
Install cloudflared as a system service so it starts automatically at boot.
# Linux (systemd)$sudo cloudflared service install$sudo systemctl status cloudflared# macOS$sudo cloudflared service installVerify the tunnel
Check tunnel health from the CLI or from the KillTheHost panel Tunnels tab, which polls the Cloudflare API every 30 seconds.
$cloudflared tunnel info killthehost$killthehost tunnel statusOnce the status is healthy, open one of your hostnames in a browser. Traffic terminates TLS at the Cloudflare edge and is forwarded over the encrypted outbound connection to the service on your host.