comfyui-https-bridge
A ComfyUI custom node that automatically starts a local HTTPS proxy server, enabling web applications deployed on public HTTPS pages to securely connect to your local ComfyUI instance.
ComfyUI HTTPS Bridge
A ComfyUI custom node that automatically starts a local HTTPS proxy server, enabling web applications deployed on public HTTPS pages to securely connect to your local ComfyUI instance.
The Problem
Modern browsers block connections from HTTPS pages to HTTP endpoints (mixed content policy). This means if you use a ComfyUI web UI hosted on https://yourapp.com, it cannot directly connect to your local ws://localhost:8188.
The Solution
This node starts a local HTTPS proxy on port 9999 that sits between the browser and ComfyUI:
Browser (HTTPS page)
↓ wss://localhost:9999 (trusted self-signed cert)
ComfyUI HTTPS Bridge ← this node
↓ ws://localhost:8188 (local, no restrictions)
ComfyUI
Features
- Zero configuration — starts automatically when ComfyUI loads
- No external tools required — generates self-signed certificates using Python's
cryptographylibrary - Auto-detects ComfyUI address — reads
--listenand--portstartup arguments automatically - Smart IP detection — when ComfyUI uses
--listen 0.0.0.0, resolves to the actual local network IP - Full proxy support — handles HTTP requests, WebSocket connections, and image streaming
Installation
Via ComfyUI Manager
Search for ComfyUI-HTTPS-Bridge and install.
Manual
cd ComfyUI/custom_nodes
git clone https://github.com/caissonfiv/comfyui-https-bridge.git
Then install dependencies:
pip install -r custom_nodes/comfyui-https-bridge/requirements.txt
Restart ComfyUI. The bridge starts automatically in the background.
First-Time Browser Setup (Once Only)
Because the certificate is self-signed, your browser needs a one-time authorization:
- Open https://localhost:9999 in your browser
- Click Advanced → Proceed to localhost
- You'll see a blank page — that means it's working
After this, the browser remembers the exception permanently.
Usage
In your ComfyUI web app's connection settings, enter:
https://localhost:9999
You should see "ComfyUI Connected" in the app.
Configuration
All settings are optional via environment variables:
| Variable | Default | Description |
|----------|---------|-------------|
| COMFY_BRIDGE_PORT | 9999 | HTTPS bridge port |
| COMFY_HOST | auto-detected | Override ComfyUI host |
| COMFY_PORT | auto-detected | Override ComfyUI port |
Address detection priority:
- Environment variables
COMFY_HOST/COMFY_PORT(highest) - ComfyUI startup args
--listen/--port(auto-read) - Default
127.0.0.1:8188
Example — custom port:
COMFY_BRIDGE_PORT=9998 python main.py
Example — remote ComfyUI:
COMFY_HOST=192.168.1.50 COMFY_PORT=8188 python main.py
Requirements
- Python 3.8+
cryptography— for self-signed certificate generationaiohttp— for the HTTPS proxy server (already included in ComfyUI)
License
MIT