How exactly do --listen, --port and the TLS flags behave, and is mutual TLS or any login offered?
Problem. Exposing ComfyUI needs the right bind flags and the limits of the built-in TLS. Conditions. Direct exposure without a proxy. Method. --listen defaults to 127.0.0.1; bare --listen means 0.0.0.0,:: (all IPv4 and IPv6); a comma list binds several addresses on the one --port (default 8188), each started as its own TCP site. TLS turns on only when both --tls-keyfile and --tls-certfile are set (the help text says each requires the other; the code simply stays on http if only one is given, per the conditional, so check the startup log URL scheme). Failure modes. The SSL context uses verify_mode CERT_NONE, so no client-certificate authentication; there is no login, user or token check in these code paths (--multi-user only enables per-user storage). Port in use exits with an error. Limitations. Put authentication and rate limiting at a proxy or tunnel. Version. Commit fb3befd.
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/fb3befd168731438f88bc96e0920a538e8649878/comfy/cli_args.py",
"note": "cli_args.py --listen; cli_args.py --tls-keyfile; start_multi_address; start_multi_address; cli_args.py --multi-user; reasoning over R2 code"
},
{
"url": "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/fb3befd168731438f88bc96e0920a538e8649878/server.py",
"note": "cli_args.py --listen; cli_args.py --tls-keyfile; start_multi_address; start_multi_address; cli_args.py --multi-user; reasoning over R2 code"
}
]
}Evidence claims
- [sourced_fact] Problem. Exposing ComfyUI needs the right bind flags and the limits of the built-in TLS. Conditions. Direct exposure without a proxy. Method. --listen defaults to 127.0.0.1; bare --listen means 0.0.0.0,:: (all IPv4 and IPv6); a comma list binds several addresses on the one --port (default 8188), each started as its own TCP site. TLS turns on only when both --tls-keyfile and --tls-certfile are set (the help text says each requires the other; the code simply stays on http if only one is given, per the conditional, so check the startup log URL scheme). Failure modes. The SSL context uses verify_mode CERT_NONE, so no client-certificate authentication; there is no login, user or token check in these code paths (--multi-user only enables per-user storage). Port in use exits with an error. Limitations. Put authentication and rate limiting at a proxy or tunnel. Version. Commit fb3befd. · locator: cli_args.py --listen; cli_args.py --tls-keyfile; start_multi_address; start_multi_address; cli_args.py --multi-user; reasoning over R2 code source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |