Fixing Open WebUI connection and WebSocket errors

Open WebUI connection errors often look like model failures but start in the proxy, the WebSocket path or the replica setup. This page shows how to isolate each layer and what a fix involves.

On this page

Why Open WebUI connection errors look like model failures

Users who see an empty reply, a stream that stops halfway, a spinner that never clears or a sign-in loop usually blame the model first. In a self-hosted Open WebUI deployment, that instinct is often wrong. A single chat message passes through the browser, the Open WebUI server, an optional WebSocket channel for live updates, and then the model provider (Ollama, an OpenAI-compatible endpoint, Anthropic or another configured service). A break at any of those hops produces symptoms that look like a model problem, so the first task is to find which layer is failing before anyone changes model settings or retries prompts.

This work matters most at three points. The first is right after a first install, when the browser is talking directly to the container and the path is simple enough to test in isolation. The second is when a reverse proxy or HTTPS is added in front of Open WebUI, because the proxy must pass streaming responses and WebSocket upgrade requests through unchanged, and it must send the correct host and scheme headers so the application builds the right URLs. The third is when the team moves to several replicas, because session and WebSocket state then has to be shared across instances. A deployment that worked for one user on one container can fail in each of these cases while the model provider stays healthy.

Before the first production launch, confirm three things with whoever owns the network path: which proxy or load balancer sits in front of Open WebUI, whether it is configured to keep long-lived connections open and to upgrade WebSocket requests, and which public URL users type into the browser. Ask the team to record those answers alongside the deployment. When a symptom appears later, the record tells the on-call engineer which hop to test first, and it prevents a proxy change from being mistaken for a model outage.

Where a chat request can break between browser and model service

A chat message starts in the browser, passes through the HTTPS reverse proxy that must forward WebSocket upgrades, reaches an Open WebUI replica, and then reads session state from Redis and chat data from PostgreSQL before calling the model provider. The streamed answer travels the same path back to the browser. Check each hop in order: whether the proxy upgrades the connection, whether the replicas share state, and whether the origin is allowed by CORS. The question beside each hop tells you where to look first when that hop fails.

Request path from browser to model provider, with the question to ask at each hop.

Open WebUI connection errors by symptom and likely starting layer

Most connection problems in Open WebUI show up in the browser, but the cause often sits one or two hops away: in the reverse proxy, the HTTPS termination point, the browser origin, replica state or the model provider. The cards below pair each symptom with the layer most likely responsible and the first observation to make before changing any setting.

Empty responses

A chat returns nothing, or the reply appears only after a page reload. The model provider may be failing or slow, but the proxy is also a common cause when it buffers or drops the response body. Start with the browser network trace for the request that carries the chat, then compare the response status and body size with the proxy access log for the same request. If the model server logs a completed generation and the browser still sees nothing, the path between them is the suspect, and the proxy is the first layer to inspect.

Streaming that stops partway

Tokens arrive for a few seconds, then the reply freezes or ends early. This pattern usually points to a proxy or load balancer that closes idle connections, or to response buffering that holds streamed chunks until a timeout. Check the idle and read timeout settings on every hop between the browser and Open WebUI, and note the point in time when the stream stops. Repeat the same prompt on a direct connection to the container to see whether the cut happens only through the proxy.

Scaling docs

WebSocket connection failures

The browser reports that a WebSocket cannot connect, or the page falls back to polling and shows stale status. The most common cause is a proxy that does not forward the Upgrade and Connection headers for the WebSocket path. Confirm in the browser developer tools whether the handshake returns a switching-protocols response, and check the proxy access log for the upgrade request. If you run several replicas, also confirm that Redis is handling websocket connection state, because a connection can land on a replica that does not hold the session.

CORS errors in the browser console

The browser blocks a request and reports a cross-origin error, even though the same request works with curl. The layer responsible is usually the browser origin: the public hostname, scheme and port the user types differ from the values Open WebUI expects, or a second hostname such as an API or tool server is called directly. Compare the Origin header in the failed request with the URL shown in the address bar. Fix the hostname and scheme alignment at the proxy before adding any cross-origin allowances.

Sign-in and session drops

Users are signed out unexpectedly, or a refresh asks them to sign in again after a few minutes. In a multi-replica deployment, the replica state layer is the usual suspect: a request can reach a replica that does not share the session store. Without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks. Check whether requests from one user switch between replicas, and whether the HTTPS termination point forwards the correct protocol so secure cookies are set and returned.

Scaling Open WebUI docs

Proxy and connection settings and when each one fits

This table compares the four connection-related choices that shape WebSocket and streaming behavior: proxy layout, where TLS ends, how sessions stick to a replica, and how many replicas run. Read each row for when the option fits, what breaks when it is misconfigured, and what to confirm before you commit.

ChoiceWhen it fitsWhat breaks if misconfiguredWhat to confirm
Single instance behind one reverse proxyOne host, small team, evaluation or a pilot where SQLite sits on local SSD or NVMe storageStreaming stalls or drops when the proxy does not pass upgrade headers or has short read timeouts for long responsesProxy WebSocket and streaming settings in the features documentation, and the proxy's idle timeout values
TLS terminated at the reverse proxyMost internal deployments where one certificate manager and one renewal process are preferredMixed content, wrong scheme in generated URLs, or CORS rejections when the external origin differs from the internal addressForwarded-protocol and forwarded-host handling in your proxy, and the public URL the application is configured to use
TLS terminated at the applicationFew cases; useful when the proxy is a plain TCP pass-through or a single host must serve HTTPS directlyCertificate renewal is missed, or the proxy re-encrypts traffic inconsistently, causing handshake failures on upgradeCurrent deployment guidance for HTTPS on your chosen install method, and who owns certificate renewal
Sticky sessions at the load balancerSeveral replicas where Redis is not yet available and the team accepts that a replica failure drops live connectionsA WebSocket reconnects to another replica mid-stream, causing lost events, duplicate responses or sign-out loopsAffinity method and cookie behavior of your load balancer, and whether the scaling guide still requires Redis for your version
Shared Redis state across replicasMultiple replicas that need consistent sessions, websocket connections and application stateRedis outage or a missing connection setting leaves replicas unaware of each other's sessions and socketsRedis requirements in the scaling documentation, and the Redis deployment's availability and failover model
Single replicaEvaluation, small teams, or a single host where simpler troubleshooting is worth more than redundancyA replica restart interrupts every active stream and no peer can take over connectionsRestart behavior and health checks for your install method, and your tolerance for short interruptions
Several replicas with PostgreSQL and an external vector storeShared production use across many users, where the scaling guide's requirements are metDefault SQLite or the bundled ChromaDB crashes under concurrent writes or multiple processesDatabase, vector store and shared file storage requirements in the scaling documentation before you size the cluster
Sign-out without RedisNot a deployment choice to make, but a behavior to plan for in a single-replica setupWithout Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeksToken lifetime settings in the scaling documentation and your session policy for shared workstations

Why streaming and WebSockets break behind reverse proxies

Most connection problems in Open WebUI come from the reverse proxy in front of it, not from the application. Chat responses are streamed token by token, and live features depend on a WebSocket connection, but many proxies are configured to collect a full response before forwarding it. When proxy buffering is on, the browser receives nothing for a long time and then the whole answer arrives at once, which looks like a model that stopped streaming. The same applies to any layer in the path, including a load balancer or ingress controller. Check the buffering directive for your proxy and confirm the exact setting for your Open WebUI release in the Scaling Open WebUI documentation, then verify it with a long streamed prompt in a test browser session.

A WebSocket starts as an ordinary HTTP request that asks the server to switch protocols. The proxy must forward the Upgrade and Connection headers and must use HTTP/1.1 toward the upstream, or the handshake fails and the browser falls back or shows a disconnected state. Idle timeouts create a second, less obvious failure. A proxy that closes connections with no traffic for a set period can cut a long generation, a tool call or a slow model that pauses before its first token. Ask your platform team for the read and send timeouts on every hop, and plan them to exceed the longest response you expect users to wait for. Treat any specific value you find in examples as something to test, not a default to copy.

HTTPS termination changes what the application sees. The proxy accepts TLS from the browser and talks plain HTTP to Open WebUI, so the application may believe the request arrived over http on an internal host name. Forwarded headers such as X-Forwarded-Proto, X-Forwarded-Host and X-Forwarded-For carry the original scheme and host, and the application must be configured to trust them from your proxy only. If the scheme or host is wrong, the page can request WebSocket or asset URLs with ws:// or ` while the page itself is served over HTTPS. Browsers then block those requests as mixed content, or reject them because the origin does not match the allowed list. Confirm the public URL setting for your release, then check the browser developer console and the proxy access log after every change to certificates or hostnames.

Proxy checks for Docker Compose, Kubernetes and multi-replica setups

On a single Docker or Docker Compose host, the reverse proxy in front of the Open WebUI container is the most common source of broken streaming and WebSocket errors. The proxy has to forward the upgrade handshake to the container and must not buffer or cut off the response that streams tokens back to the browser. Start by reading the proxy configuration for the route that serves the Open WebUI hostname and confirm the container port it targets matches the published port in the Compose file.

  • Route and upgrade handling: Confirm the proxy forwards the Upgrade and Connection headers for WebSocket traffic, and that response buffering is turned off for the streaming routes.
  • Read and send timeouts: Check the proxy's read timeout. A short default can end a long model response or an idle socket mid-answer.
  • Public URL: Confirm the public URL the application is configured with matches the scheme and hostname that browsers use, so generated links and redirects do not point at an internal address.
  • Forwarded headers: Check that the proxy sets the forwarded protocol and host headers, so the application knows the original request was HTTPS.
  • Container logs during a failed request: Compare the proxy's error log with the container log at the same timestamp to tell a proxy rejection from an application error.

When the proxy and application agree on the public URL, the route and the timeouts, most single-host streaming failures are resolved without changing the application itself.

How to fix Open WebUI connection errors in order

This sequence isolates whether an Open WebUI connection failure comes from the browser, the reverse proxy, the public address or HTTPS setup, or the application itself, so each fix targets the right layer.

  1. Reproduce the error with one user and one model

    Sign in as a single test user, select one model that is known to work on the provider side, and send one short prompt in a new chat. Record the exact symptom: an empty response, a reply that stops mid-stream, a spinner that never ends, or a CORS message. Note the time, the browser, and the network path the user takes, such as direct access or through a load balancer. Keep the test narrow so later changes can be compared against a fixed baseline. Continue only when the symptom reproduces reliably. If it does not reproduce on repeat attempts, the fault is likely intermittent and tied to a specific user, group, or model, so widen the test before changing configuration.

  2. Capture the browser network trace and console

    Open the browser developer tools before sending the prompt, then keep the Network and Console tabs open during the request. Look for the chat completion request and any WebSocket connection to the same host. Record the request URL, status code, response headers (especially Access-Control-Allow-Origin and any redirect), and whether a WebSocket reached the open state or closed with an error. Copy the console error text verbatim. Continue when you can name the failing request and its status. If the trace shows no request leaving the browser, the problem is client-side, such as a blocked script, an extension, or a stale cached page, so clear the cache and retest before going further.

  3. Match the request in proxy logs

    Using the timestamp and URL from the browser trace, find the same request in the reverse proxy access log and error log. Confirm the status code the proxy returned, the upstream address it used, and any upstream timeout, buffering, or header error recorded. Compare the proxy's view with the browser's view. If the proxy logged a 502, 504, or upgrade failure, the fault sits in the proxy path. If the proxy logged a 200 but the browser showed an empty reply, check whether response buffering or a compression setting is cutting the stream. If the request never reached the proxy, return to DNS, the public address, or the load balancer in front of it.

  4. Confirm HTTPS and the public address

    Check that the address users type matches the public URL Open WebUI is configured to use, and that the scheme is HTTPS end to end or terminated at a trusted proxy with the forwarded protocol headers set. Verify the certificate chain is complete and valid for that hostname. Mixed content, a plain HTTP redirect loop, or an internal hostname embedded in generated links can all break streaming and cross-origin requests. Confirm the proxy forwards the original host and protocol to the application. Continue when the public address, certificate, and forwarded headers all agree. Where any of them differ, correct the mismatch before testing the WebSocket path, because a WebSocket opened against the wrong origin will fail regardless of the application's health.

  5. Test the WebSocket upgrade path

    Confirm that the proxy passes the HTTP Upgrade handshake for WebSocket connections under the same path Open WebUI uses, and that the proxy's read and send timeouts exceed the longest expected streamed response. Open a WebSocket to the public address from the browser console or a command-line client that supports the protocol, and check for a successful 101 Switching Protocols response. Check that the connection stays open for the length of one streamed answer. If the handshake succeeds but the connection drops mid-reply, look at idle timeouts on the proxy and any load balancer between the client and the proxy. Record the pass or fail result before moving on.

  6. Test a single replica without the proxy

    Run one Open WebUI instance and connect to it directly on its internal port, bypassing the reverse proxy and any load balancer. Repeat the single-user, single-model prompt. If it streams and completes correctly, the fault is in the proxy, the public address, or the network path between them, so return to the earlier steps. If it still fails, the fault is in the application or its model connection, so check the model provider settings, the container logs, and environment variables for the public URL. Note that a single replica does not exercise shared state. If you run several replicas, Redis and shared storage are still part of the path to test later, and the scaling guide describes what each one must provide.

  7. Retest across browsers and sign-in cycles

    Once the failing layer is fixed, repeat the original prompt in two different browsers, one of them in a private window, using a non-admin account. Then sign out, sign back in, and send another prompt to confirm session handling holds. Check that the second sign-in does not show a stale session or a reappearing error. Compare the network trace against the baseline from step one. The sequence is complete when both browsers stream full replies, the WebSocket stays connected, and sign-out followed by sign-in returns a working chat. Document the settings changed, the proxy configuration version, and the test results so the fix can be repeated after upgrades.

Security trade-offs when loosening CORS and proxy rules

Connection errors tempt teams to relax origin checks, trust more headers and expose more ports until the symptom goes away. Each shortcut also widens the attack surface, so every loosened setting needs a named owner, a narrower alternative and a revert step recorded before the fix is closed.

Widening allowed origins until the error clears

When the browser reports a CORS failure, it is tempting to add wildcard or broad origins to the proxy or application configuration. A wildcard origin lets any website script issue requests against your Open WebUI instance from a user's browser. Add only the exact scheme, host and port that the browser shows in the blocked request, and confirm the proxy forwards the same Host and Origin values the application expects. Afterward, remove any temporary origin and retest the login and streaming paths.

Open WebUI features

Trusting forwarded headers from any client

Open WebUI behind a reverse proxy relies on forwarded headers such as the client address and original protocol to build correct links and redirects. If the proxy accepts those headers from any client, an outside caller can set them directly and mislead logging, rate limits or redirect targets. Configure the proxy to overwrite forwarded headers on ingress and trust them only from the proxy's own address range. Check the result by sending a request with a spoofed X-Forwarded-For value and confirming the application logs the real source.

Exposing internal ports while debugging

Teams often publish the application container port, a Redis port or a PostgreSQL port to the host network so they can test a connection directly. Those services were designed for internal traffic only, and a published database or cache port becomes a direct target for anyone who can reach the host. Test from inside the same network instead, using docker exec or a debug pod, and keep data stores on private networks. Remove every temporary port mapping and confirm with a network scan from outside the cluster or host.

Leaving verbose logs that capture prompts

Raising the log level to trace a streaming or WebSocket fault can write full request bodies, which include user prompts, attached file text and sometimes tokens. Those logs then flow into a central platform with a wider audience and longer retention than the chat itself. Enable debug output only for the minutes needed to reproduce the fault, confirm prompt content is excluded, and restore the previous level once the request path is confirmed. Check your log store for any entries written during the session and handle them under your retention policy.

What fixing Open WebUI connection errors costs and needs from your team

What drives the effort of fixing Open WebUI connection errors?

The effort depends mostly on the shape of the path between users and Open WebUI. The main drivers are the number of reverse proxies and load balancers in front of the application, how HTTPS is terminated and where, the number of Open WebUI replicas, the number of model providers connected, and how much access your team can give to logs and infrastructure. Each proxy layer adds places where WebSocket upgrades, timeouts and forwarded headers can be dropped. Multiple replicas add a requirement for shared state, so a connection problem may actually be a session or Redis problem. Ask any partner to confirm which of these apply to your environment before accepting a quote, because they change the diagnostic path more than the fix itself.

Can one administrator fix Open WebUI WebSocket errors alone?

Often yes for a single-instance deployment behind one proxy, provided that person can read proxy configuration, container logs and the Open WebUI environment settings, and can restart services in a test window. The work becomes harder when the administrator does not control the proxy, the TLS certificates or the network path, because those usually belong to another team. Multiple replicas, several model providers or a change to identity settings also raise the number of people who must agree on the change. A second reviewer is useful for changes to production proxies, even when one person does the investigation.

What must our team provide before outside help starts?

Plan to provide four things before the work begins:

  • Access to the reverse proxy or ingress configuration, including timeout and upgrade settings, in a read-only or staging copy if production access is restricted.
  • Container or service logs from Open WebUI and from each proxy layer covering a failed request, with prompt content removed where policy requires it.
  • A test account with a role similar to the users who report problems, so behavior can be reproduced without using a personal login.
  • A model endpoint that the team can use for testing, whether a local server or an approved remote provider, along with the credentials scope needed to call it.

Also confirm who can approve configuration changes and when a maintenance window is possible.

How long does a fix for Open WebUI connection errors take?

Duration depends on how many layers need to be checked and how quickly the failing path can be reproduced. A single cause in a simple proxy setup can often be isolated in a short working session once logs and configuration are available. Intermittent failures, failures that appear only under load, or problems that span several proxies, certificates and replicas take longer because each hypothesis needs a controlled test. No general duration is published here. Ask for a timeline that is tied to a written scope, with the layers covered, the environments tested and the verification steps listed as deliverables.

Does a fixed-scope engagement start with a written scope?

Yes. DeployOpen works on most engagements as fixed scope, which means the scope, deliverables and timeline are agreed in writing before work starts. For connection and WebSocket work, the written scope typically names the proxy and certificate layers in question, the Open WebUI version and deployment method, the environments to be tested, the access the team will provide, and the evidence that a fix has been verified. Any item outside that scope, such as a later upgrade or a new identity provider, would be quoted separately. Ask for the written scope before you compare quotes.

What recurs after an Open WebUI connection fix?

A one-time fix does not remove the ongoing need to recheck the path. Recurring work usually includes retesting WebSocket and streaming behavior after each Open WebUI upgrade, since release changes can affect how requests are handled, and retesting after any proxy, load balancer, certificate or ingress change. Ongoing support, upgrades and continuous testing are available as retainers from DeployOpen, and they can be scoped to cover these retests. Before you agree to a quote, confirm which retests are included, how many environments they cover and what happens if a future upgrade changes behavior.

Limits to confirm in your Open WebUI version and environment

Most connection and WebSocket failures trace back to a handful of facts about your release, your proxy, your replicas and your model provider. Confirm each item below before you change configuration, so you test against the behavior you actually run.

Proxy upgrade and buffering behavior

Streaming depends on the reverse proxy forwarding the WebSocket upgrade headers and not buffering the response body. Proxy vendors differ on defaults for both, and some versions change them between releases. Check your proxy's documentation for WebSocket upgrade support, response buffering and idle timeouts, then confirm the settings on the exact proxy version in production, not on a lab copy.

Exact Open WebUI release in use

Connection behavior, configuration keys and default settings change between releases, so a fix for one version may not apply to another. Record the running image tag or package version before you start. The current release on the project's GitHub releases page is v0.12.3, but your deployment may run an older build, and the release notes list changes to check against your logs.

GitHub releases

Redis and shared storage for replicas

Multiple replicas need Redis for sessions and websocket connections, plus shared file storage so uploads and knowledge stay reachable from every replica. If a request lands on a replica that does not hold the connection state, streaming can fail intermittently. Confirm that Redis and shared storage exist, that every replica points to them, and that your load balancer's session affinity matches what your version expects.

Scaling docs

Token lifetime after sign-out

Without Redis, signing out does not revoke tokens. They stay valid until they expire, and by default that is 4 weeks. This matters when a connection error looks like an authentication problem, and it matters for security review because a session can outlive the user's sign-out. Confirm whether Redis is configured, and record the token lifetime your deployment actually uses before you test sign-in and reconnect behavior.

Model provider streaming and timeout limits

Open WebUI can only stream as fast and as long as the model provider allows. Hosted providers and local model servers each set their own request timeouts, output limits and streaming behavior, and a gateway in between may add its own. Check the provider's documentation for maximum request duration and streaming support, and test a long generation through the full path so a provider timeout is not mistaken for a proxy fault.

How DeployOpen scopes and fixes Open WebUI connection problems

DeployOpen approaches Open WebUI connection and WebSocket errors by first reproducing the failure path from the browser through the reverse proxy to the application, then fixing the configuration in your own infrastructure. Engagements are fixed-scope, with the diagnosis, changes, verification and handover agreed in writing before work starts.

How we scope

  • Collect the symptoms, browser console output, proxy configuration and the Open WebUI version in use before quoting
  • Confirm the hostnames, HTTPS termination points, and whether one or several replicas sit behind the proxy
  • Agree in writing which proxies, load balancers and Open WebUI settings are in scope for changes
  • Define how each fix will be verified, such as streaming tests, WebSocket upgrade checks and CORS preflight checks
  • Ongoing support after the fix can be arranged as a retainer

How we build

  • Reproduce empty responses, broken streaming and WebSocket failures on the exact path users take
  • Review reverse proxy settings for WebSocket upgrade headers, buffering and timeouts against the deployed Open WebUI setup
  • Check CORS and origin settings against the public hostname and any separate API clients
  • Test changes in a non-production environment that mirrors your proxy and certificate chain
  • Confirm Redis and shared state are in place when several replicas could drop or split WebSocket sessions

How we hand over

  • Deliver a written record of each root cause, the change made and the file or setting it touched
  • Provide a verification checklist that your team can rerun after upgrades or proxy changes
  • Document the configuration values that must stay aligned between the proxy and Open WebUI
  • Walk through the findings with your platform and security teams so the fixes are understood
  • Store configuration changes in your own version control where your team already manages infrastructure

How we support

  • Retest the connection paths after each Open WebUI upgrade, since release changes can alter streaming behavior
  • Review proxy and certificate changes for their effect on WebSocket and CORS behavior before rollout
  • Offer a retainer for ongoing monitoring of connection health and periodic retesting
  • Confirm with your team which upgrade windows, maintenance hours and escalation paths apply to your environment
  • Ask for the support scope, response expectations and exclusions in the written quote

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.