Cloudflare Tunnel Setup
Bridge your local ComfyUI to Panel Haus with a secure HTTPS tunnel.
Why you need a tunnel
ℹ The mixed-content problem Panel Haus runs on HTTPS (
https://panelhaus.app). Your local ComfyUI runs on HTTP (http://localhost:8188). Browsers block HTTPS pages from making requests to HTTP servers, a security feature called mixed-content blocking. A Cloudflare Tunnel creates a public HTTPS URL that forwards traffic to your local ComfyUI, solving the problem without exposing your machine directly.Install cloudflared
| Platform | Command |
|---|---|
| Windows | winget install cloudflare.cloudflared |
| macOS | brew install cloudflared |
| Linux | sudo apt install cloudflared (or see pkg.cloudflare.com) |
Quick start (temporary URL)
The fastest way to get connected. The URL changes each time you restart, but it works in about 30 seconds.
- Make sure ComfyUI is running with CORS enabled:
python main.py --listen --enable-cors-header - Open a second terminal and run:
cloudflared tunnel --url http://localhost:8188 - You will see output with a URL like
https://random-words-here.trycloudflare.com. Copy it. - In Panel Haus, open Neural Forge (admin toolbar).
- Go to Settings (gear icon).
- Paste your tunnel URL in the ComfyUI URL field.
- Click Test Connection. A green checkmark means you are connected.
⚡ Try it Follow the 7 steps above right now. If you get a green checkmark, try generating an image through Neural Forge. The first generation may take 10 to 30 seconds as the model loads into VRAM.
Named tunnel (permanent URL)
For a stable URL that does not change every restart, set up a named tunnel with your own domain.
- Create a free Cloudflare account if you do not have one.
- Authenticate the CLI:
cloudflared tunnel login(this opens a browser to authorize). - Create a named tunnel:
cloudflared tunnel create comfyui. Note the tunnel UUID. - Route DNS to it:
cloudflared tunnel route dns comfyui comfyui.yourdomain.com - Create the config file at
~/.cloudflared/config.yml:
config.ymltunnel: YOUR-TUNNEL-UUID
credentials-file: /path/to/.cloudflared/YOUR-TUNNEL-UUID.json
ingress:
- hostname: comfyui.yourdomain.com
service: http://localhost:8188
- service: http_status:404
- Run:
cloudflared tunnel run comfyui - Your ComfyUI is now always available at
https://comfyui.yourdomain.com. - Paste this URL in Panel Haus Neural Forge settings. It never changes.
ComfyUI launch flags
| Flag | Required? | Purpose |
|---|---|---|
--listen | Yes | Bind to 0.0.0.0 so the tunnel can reach ComfyUI |
--enable-cors-header | Yes | Allow cross-origin requests from Panel Haus |
--port 8188 | No | Default port; change if 8188 is taken |
△ Watch out Both flags are required. Without
--listen, ComfyUI only accepts connections from localhost and the tunnel cannot reach it. Without --enable-cors-header, the browser blocks Panel Haus from talking to ComfyUI.ℹ Security note Your tunnel URL is public: anyone with the URL can access your ComfyUI. The temporary URL's randomness provides some obscurity. For named tunnels, consider adding Cloudflare Access for authentication. Never share your tunnel URL publicly unless you want others using your GPU.