No Port Forwarding
Expose services without opening firewall ports or configuring NAT.
Cloudflare Tunnels provide a secure way to expose NodeKAT to the internet without configuring firewall rules or opening ports on your server.
No Port Forwarding
Expose services without opening firewall ports or configuring NAT.
Automatic SSL
Free SSL certificates automatically managed by Cloudflare.
DDoS Protection
Built-in DDoS protection and rate limiting.
Zero Trust
Integrate with Cloudflare Access for identity-based security.
macOS:
brew install cloudflaredLinux:
# Debian/Ubuntuwget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.debsudo dpkg -i cloudflared-linux-amd64.deb
# Or use the official install scriptcurl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.debsudo dpkg -i cloudflared.debDocker:
docker pull cloudflare/cloudflaredcloudflared tunnel loginThis will open a browser window to authenticate with Cloudflare. After authentication, you’ll receive a certificate file.
cloudflared tunnel create nodekatThis creates a tunnel and outputs a tunnel ID. Save this ID for later use.
Route your domain to the tunnel:
cloudflared tunnel route dns nodekat nodekat.yourdomain.comCreate ~/.cloudflared/config.yml:
tunnel: <your-tunnel-id>credentials-file: /root/.cloudflared/<your-tunnel-id>.json
ingress: - hostname: nodekat.yourdomain.com service: http://localhost:8080 originRequest: noTLSVerify: true - service: http_status:404Manual start:
cloudflared tunnel run nodekatAs a service (systemd):
Create /etc/systemd/system/cloudflared.service:
[Unit]Description=Cloudflare Tunnel for NodeKATAfter=network.target
[Service]Type=simpleUser=rootExecStart=/usr/bin/cloudflared tunnel --config /root/.cloudflared/config.yml runRestart=alwaysRestartSec=5
[Install]WantedBy=multi-user.targetEnable and start:
sudo systemctl enable cloudflaredsudo systemctl start cloudflaredAdd cloudflared as a service in your docker-compose.yml:
version: '3.8'services: nodekat: # ... your nodekat configuration networks: - nodekat-network
cloudflared: image: cloudflare/cloudflared:latest command: tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN} environment: - TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN} depends_on: - nodekat networks: - nodekat-network restart: unless-stopped
networks: nodekat-network: driver: bridgeGet your tunnel token from the Cloudflare dashboard:
Route multiple services through one tunnel:
ingress: - hostname: nodekat.yourdomain.com service: http://localhost:8080 - hostname: api.yourdomain.com service: http://localhost:3000 - hostname: admin.yourdomain.com service: http://localhost:8081 - service: http_status:404Configure multiple origins for high availability:
ingress: - hostname: nodekat.yourdomain.com service: http://localhost:8080 originRequest: pool: nodekat-poolFor non-HTTP services:
ingress: - hostname: ssh.yourdomain.com service: tcp://localhost:22 originRequest: proxyType: ""Protect your tunnel with identity-based access:
nodekat.yourdomain.comSee our Access Policies guide for detailed instructions.
Limit which IPs can access your origin:
ingress: - hostname: nodekat.yourdomain.com service: http://localhost:8080 originRequest: ipRules: - allow: false ip: 0.0.0.0/0 - allow: true ip: 172.16.0.0/12 # Docker internallogfile: /var/log/cloudflared.logloglevel: infocloudflared tunnel info nodekat# systemd journalsudo journalctl -u cloudflared -f
# Docker logsdocker-compose logs -f cloudflaredEnable Prometheus metrics:
metrics: 0.0.0.0:8081If you see certificate errors, add to your ingress config:
originRequest: noTLSVerify: trueEnable HTTP/2 and compression:
ingress: - hostname: nodekat.yourdomain.com service: http://localhost:8080 originRequest: http2Origin: true compress: true