Skip to main content

HTTPS & Reverse Proxies

Secure your Open WebUI deployment with TLS encryption, reverse proxies, or managed tunnels.

HTTPS encrypts all traffic between users and Open WebUI, protecting chat history, credentials, and uploaded files. It is also required for browser features like Voice Calls, which need a secure context to access the microphone.

Voice Calls require HTTPS

Modern browsers block microphone access on non-HTTPS origins. Voice Calls will not work over plain http:// unless you are on localhost.

The {{CLIPBOARD}} and {{USER_LOCATION}} prompt variables also need a secure context. Over plain http:// on any address other than localhost, Open WebUI shows Failed to read clipboard contents or Location access not allowed. {{CLIPBOARD}} then stays in the prompt as written, and {{USER_LOCATION}} becomes LOCATION_UNKNOWN. Copy buttons switch to a fallback when the browser's clipboard API is unavailable, so copying works without HTTPS.


Choose your approach​

MethodBest forTLS management
Cloudflare TunnelProduction without open portsAutomatic (Cloudflare edge)
ngrokDevelopment and testingAutomatic (ngrok edge)
TailscalePrivate access across devicesAutomatic (tailscale serve)
NginxSelf-hosted production with full controlManual or Let's Encrypt
CaddySelf-hosted production, minimal configAutomatic (Let's Encrypt)
HAProxyHigh-availability / load balancingManual or Let's Encrypt
Apache, Synology DSM, IISA web server or NAS you already runManual
Cloud load balancersAWS ALB, GCP LB, Azure App GatewayManaged by cloud provider

Quick recommendations​

  • Just want HTTPS fast? Use Cloudflare Tunnel (production) or ngrok (development). No certificates to manage, no ports to open.
  • Running a reverse proxy already? Add Caddy for automatic certs or Nginx for maximum control.
  • Need load balancing? Use HAProxy or your cloud provider's load balancer.

Key configuration notes​

Regardless of which approach you choose, keep these in mind:

SettingWhy it matters
WEBUI_URLSet this to your public HTTPS URL. The redirect back to Open WebUI after SSO sign-in falls back to the request's own URL when it is empty, but links in notifications and webhook events lose their host. It does not set the SSO callback URL sent to the identity provider, which is built from the request unless OPENID_REDIRECT_URI or the provider's own redirect URI variable is set. It is persisted config: after first startup, change it in Admin Settings > General
CORS_ALLOW_ORIGINDefaults to *, so leaving it unset never breaks WebSocket. If you set it, it must include your exact public origin (scheme, host, port), or Socket.IO connections (and any cross-origin browser requests) fail
Proxy buffering offKeeps streamed responses flowing for API clients. The web UI streams chat tokens over /ws/socket.io, so buffering does not affect it while WebSocket works
WebSocket supportProxy /ws/socket.io with Upgrade and Connection headers. By default the browser uses the WebSocket transport only, with no polling fallback; behind a proxy that cannot upgrade, set ENABLE_WEBSOCKET_SUPPORT=false to switch server and client to long-polling
Forwarded headersPass the original Host header and forward X-Forwarded-For and X-Forwarded-Proto. Audit-log client IPs come from X-Forwarded-For; the SSO callback URL sent to the identity provider (unless a redirect URI is set) is built from Host and X-Forwarded-Proto. Open WebUI trusts the X-Forwarded-* headers from any peer unless FORWARDED_ALLOW_IPS names the proxy's address. X-Real-IP is not read
Secure cookiesThe token and owui-session cookies, and the OAuth session cookies, are sent without Secure by default. Once TLS is in front, set WEBUI_AUTH_COOKIE_SECURE=true and WEBUI_SESSION_COOKIE_SECURE=true
Extended timeoutsAPI clients streaming from /api/chat/completions and long non-streaming requests (uploads with processing, web fetch, transcription) can take minutes; set proxy read timeouts to at least 300s. The Socket.IO connection pings every 25s, so it survives any idle timeout above about 45s
Upload sizeThe app has no upload cap until Max Upload Size is set (Admin Settings > Documents, or RAG_FILE_MAX_SIZE), so the proxy's body-size limit is what returns 413; set it at or above the value you configure there. The same limit applies to chat saves: saving an edited message or a rating sends the whole chat in one request, so a limit that is too low loses those changes in long chats (details)
Health checksPoint load balancers at /health (liveness) or /ready (readiness: startup finished, database and Redis reachable)
Several instancesSocket.IO state lives in-process. Balancing across instances, or running UVICORN_WORKERS above 1, needs WEBSOCKET_MANAGER=redis with REDIS_URL, a shared database, and the same WEBUI_SECRET_KEY on every instance
This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.