Open WebUI workers versus replicas: which one to add first
A team that has outgrown one Open WebUI container usually faces the same choice: add Uvicorn workers inside the existing container, or run more containers, each a replica, behind a load balancer. Workers are separate processes that share one container's resources and one copy of the application configuration. Replicas are separate containers that can run on different hosts. The scaling guide treats multiple replicas as the path that needs shared state, so that is the option that brings the larger set of infrastructure changes. Most teams should settle this question before they change anything, because the database, vector store and file storage choices that follow from it are hard to reverse once users depend on them.
Extra workers look like the smaller step, but they still bring requirements the single-container setup may never have met. The scaling guide says SQLite does not handle concurrent writes from multiple processes well, so a multi-worker setup needs PostgreSQL instead. It also warns that the default ChromaDB crashes in multi-process setups, so an external vector database is required once several workers run. Before you touch the process count, confirm where your database file lives, which vector store your installation uses, and whether any settings depend on one process holding state in memory.
The decision is due now if your current stack still relies on SQLite or the default ChromaDB and you expect concurrent load to grow. Write down the process model you plan to run, the database and vector store it needs, and the shared state each option requires, including Redis for sessions and websocket connections when you run replicas. Use the scaling guide as the checklist for that inventory, and confirm version-specific behavior against the release you plan to deploy before you begin the migration.
How workers, replicas and a combined setup compare
This table compares three ways to run more capacity: one worker per container with several replicas, several workers inside one container, and a combined setup. Read each row across the columns to see what runs where, which shared services are required, how each layout tends to fail, and which teams it fits. The main takeaway is that replicas are the layout the scaling guide points to, and extra workers add process-level requirements on top of it.
| Aspect | Replicas with one worker each | Several workers in one container | Combined setup |
|---|---|---|---|
| What runs where | Each container runs one Uvicorn worker. Capacity grows by adding containers behind a load balancer. | One container starts several Uvicorn worker processes that share the container's resources. | Several containers, each running more than one worker process. |
| PostgreSQL | Required. SQLite is not suitable for multi-instance deployments. | Required, because several processes write concurrently. | Required across all containers. |
| Redis | Required so sessions, websocket connections and application state are shared across replicas. | Confirm in the current scaling guide whether Redis is needed for process-level coordination alone. Plan for it once more than one container exists. | Required across all containers. |
| External vector database | Required. The default ChromaDB is not suitable for multi-replica setups. | Required. The default ChromaDB will crash in multi-process setups. | Required. Do not rely on the embedded ChromaDB. |
| Shared file storage | Required so uploads and knowledge stay reachable from every replica. | Confirm the requirement with the scaling guide. Local container storage is unlikely to be enough for shared uploads. | Required across all containers. |
| Main failure mode | Misconfigured replicas that miss a shared service, causing login loops, 401 errors or missing files. | Worker processes crash or contend on shared state, and a single container restart drops all of its workers at once. | Both failure sets apply, and troubleshooting spans containers and processes at the same time. |
| Fits teams that | Want horizontal scale, simple restarts and a clear dependency checklist before going live. | Run a single host or small VM and cannot yet add more containers, and accept the process-level requirements. | Have measured a need for more capacity than one worker per container gives and operate the shared services well. |
| What to confirm | The current guidance on replicas, session handling and token revocation in the scaling guide. | Whether the multi-worker setting is supported with your release and which services it requires. | Which setting combination the current scaling guide documents as tested before adopting it. |
Why the default is one Uvicorn worker per container
The pattern Open WebUI's scaling guidance points to is one Uvicorn worker per container, with scale delivered by adding replicas. Each container then runs a single application process that the container runtime can supervise: if the process fails, the container restarts, and its health state is visible to the orchestrator as one unit. Horizontal scaling, meaning how many containers run and where they sit, becomes the job of Kubernetes, Docker Compose or whichever scheduler the team already operates, rather than something tuned inside each container. Before you adopt this as your baseline, open the scaling guide at Scaling Open WebUI and read its exact wording for the version you run, because the recommendation is tied to that documentation and may change between releases.
Worker count is a deployment setting, not a fixed property of the product, so confirm it against your own release before you write it into a Helm values file or Compose manifest. Check the worker setting in the configuration reference for your version, and check what the guide says about running more than one worker in a single container. Ask your platform team to record the value in your deployment repository so that an upgrade does not silently change it. This page does not publish throughput or latency figures for different worker counts, and you should not accept benchmark numbers for them from a vendor or partner without seeing the test method, hardware, model latency and workload used to produce them.
The practical decision is how you will measure load and when you add a replica. Use your own metrics, such as request latency, CPU and memory per container, and the number of open WebSocket connections, to decide when the existing replica count is no longer enough. Remember that adding replicas only works once the shared dependencies are in place: PostgreSQL, Redis, an external vector database and shared file storage. A scaled-out container without those components will not behave like a healthy replica, so plan the replica count together with the state layer rather than as a standalone change.
What extra workers in one container still require
Raising the worker count inside one container keeps every process on the same host, but each process still needs shared state that a single SQLite file or embedded vector store cannot provide. The cards below cover the components and budgets that stay in force once workers multiply, and the checks to run before you raise the count.
External vector database required
The default embedded ChromaDB crashes in multi-process setups, so running several workers requires an external vector database even on one host. Each worker process would otherwise open its own copy of the embedded store. Choose the external store before raising the count, then confirm that every worker reads and writes the same collection and that retrieval still works after a restart.
Scaling docsPostgreSQL in place of SQLite
SQLite does not handle concurrent writes from multiple processes well, so the scaling guide requires PostgreSQL for multi-instance deployments. Multiple workers writing to one SQLite file produce lock contention that surfaces as slow or failed requests under load. Confirm that the database URL is set identically for every worker and that a migration from the existing SQLite file has been tested on a copy before cutover.
Redis for sessions and WebSocket state
Redis holds sessions, WebSocket connection state and application state that must be visible to every worker. Without Redis, signing out does not revoke tokens, which remain valid until they expire, by default after 4 weeks. Verify that sign-out revokes access on every worker, and that streamed chats reconnect correctly when a request lands on a different process.
Shared storage for uploads and knowledge
Uploads and knowledge files must stay reachable from every worker and replica. Files written to a local disk in one worker are invisible to the others, which produces missing-file errors for users whose requests land elsewhere. Decide on the shared storage backend before scaling, and test an upload from one worker followed by a retrieval through another.
Memory and connection budget per process
Each worker process loads its own copy of the application, its embedding and extraction libraries, and holds its own database connections. Raising the worker count multiplies memory use and the number of connections presented to PostgreSQL, so a count that fits one process can exhaust host memory or the database connection limit. Measure resident memory and open connections per worker under realistic load, and size the pool against the database's connection limit before increasing workers.
Crash impact on in-flight chats
When one worker process crashes, streams and requests that it was serving fail, and the user sees an interrupted response that must be resent. Other workers keep serving new requests, but the affected chat's WebSocket and session state depends on Redis and the database being consistent. Test a deliberate worker kill during a streamed response, record what users see, and confirm that the container restarts the process automatically.
How to add replicas without the migration race
This sequence moves a single Open WebUI instance onto shared state so that several replicas can serve the same users and data. Each step ends with a check you can run before the next one starts.
Back up and freeze the existing instance
Before anything changes, the platform owner takes a full backup of the current Open WebUI data directory, including the SQLite database file, uploads and the vector store, and confirms the backup can be restored to a separate host. Announce a maintenance window so users stop writing new chats, uploads and knowledge changes while the copy runs. The step is done when a restore test on a scratch host opens the backup and shows the expected users, chats and files. Confirm the exact backup and restore procedure in the current Open WebUI documentation for your version, because the file layout matters for the copy.
Move the database to PostgreSQL
The platform team provisions PostgreSQL and points Open WebUI at it, so the application writes all state to a database built for concurrent writes from several processes. SQLite is not suitable for multi-instance deployments, so this step cannot be skipped. Run the data copy from the SQLite file into PostgreSQL while the original instance is stopped, and let the application create or migrate its schema before any copy begins. The step is done when row counts for users, chats and files match between the two databases and a single instance starts cleanly against PostgreSQL. Confirm the supported migration path for your version before you start, since schema changes and data copies must finish before anything else starts.
Set up Redis as the shared state store
Deploy Redis so that sessions, WebSocket connections and application state live outside any single container. Configure the single instance to use it first, which exposes configuration mistakes while there is only one process to debug. The check is practical: sign in, open a chat that streams a response, and sign out, then confirm the session is no longer accepted. Without Redis, signing out does not revoke tokens, which stay valid until they expire (by default after 4 weeks), so this check is the one that proves shared state is working. Record the Redis settings in your configuration management so every replica reads the same values.
Move file storage and vector search to shared services
Place uploads and knowledge files on storage that every replica can reach, such as an object store or a shared filesystem, and replace the default embedded ChromaDB with an external vector database. The default ChromaDB will crash in multi-process setups, so this change is required before more than one worker or replica runs. Re-index or migrate existing knowledge bases according to the current documentation and confirm the vector database is reachable from every host that will run Open WebUI. The step is done when a file uploaded through the original instance opens from the storage backend and a knowledge base query returns results against the external vector store.
Run the single instance on shared state and verify it
Restart the existing instance so it runs entirely on PostgreSQL, Redis, shared storage and the external vector database, with nothing left writing to local files. Check that no state remains in the old SQLite file or local upload folders by running a test chat, upload and knowledge query, then reviewing the new locations. Confirm the instance still serves existing users with their original roles and data. This is the baseline you will compare every new replica against. Do not add a second process until this check passes, because a failed baseline makes replica problems impossible to separate from configuration problems.
Bring up one new replica and check it
Start a single additional Open WebUI container with identical configuration, including the same secret key, database, Redis, storage and vector settings. Route a small set of test users to it through the load balancer, or test it directly on its own address. Run three checks: sign in on one replica and confirm the session works on the other, upload a file on one and open it from the other, and sign out on one and confirm the session is rejected on the other. Also confirm a knowledge base query returns the same results from both. The step is done when all three checks pass on repeated attempts. If a login loop or a missing file appears, stop and diagnose it before scaling further.
Scale out and keep watching the shared services
After the single new replica passes every check, add the remaining replicas one at a time, confirming each one before the next starts. Watch PostgreSQL connections, Redis availability and vector database health during the increase, because each replica adds load to every shared service. Keep the old instance in standby for a period agreed with the platform owner so you can roll back to it. The step is done when all replicas pass the same sign-out and shared-file checks and the monitoring shows steady connection counts. Confirm the scaling and rollback guidance in the current Open WebUI scaling documentation before you finalize the rollout plan.
Replicas share state through PostgreSQL, Redis, file storage and an external vector store
The diagram starts at the user's request reaching the load balancer inside the company network. The balancer forwards it to one of several Open WebUI replicas, and each replica runs a single Uvicorn worker in its container. Every replica reads and writes the same PostgreSQL database, uses Redis for sessions, websocket coordination and application state, and reads uploads and knowledge files from shared file storage. Retrieval goes to an external vector database, not the embedded ChromaDB. Check that every replica points at the same shared services before scaling out.
Each replica runs one worker and shares state through external services inside the company network.
Choosing the path for a single VM, Compose or Kubernetes
On one VM or Compose host, Open WebUI runs as one container with one Uvicorn worker, and the host is the only place where scheduling happens. Docker and Docker Compose are official install methods, and you set the worker count through the container environment or the Compose file. Scaling on one host means giving the container more CPU and memory, not adding replicas that the host would have to balance.
- Worker settings: keep one worker per container, and set the worker count in the Compose service definition or the environment file so it survives restarts.
- Restarts: a restart policy brings a crashed container back on the same host. It does not move the workload to another machine if the host fails.
- Shared services: SQLite is acceptable here only for a single replica with the database file on locally attached SSD or NVMe storage. Otherwise, provide PostgreSQL, and add Redis and an external vector database before you run more than one worker.
- Storage: keep uploads and the data volume on storage that survives a host rebuild, and include it in your backup plan.
- Failure domain: one host is one failure domain, so maintenance and host faults take the service down.
Before relying on a single host, confirm the worker and database variables for your version in the install documentation and in the Open WebUI scaling guide.
Running several VMs or Compose hosts, each with its own Open WebUI container behind a load balancer, gives you replicas without a cluster orchestrator. Each host runs one container with one worker, and your team decides which host runs which replica, when to add a host and how to sequence upgrades. Multi-replica operation requires Redis, PostgreSQL, shared file storage and an external vector database, so the platform work is mostly in the services around the containers.
- Replica placement: add capacity by adding hosts, and record which host runs which version so you can see mixed-version states during a rollout.
- Configuration consistency: every host must receive identical environment values, including the secret used to sign tokens. Drift between hosts shows up as login failures that are hard to trace.
- Restarts: use a systemd unit or a Compose restart policy on each host. Nothing reschedules a container from a failed host onto a healthy one.
- Shared services: PostgreSQL, Redis, the external vector database and shared file storage must be reachable from every host, and their network paths need the same firewall and DNS planning as the application.
- Load balancer: confirm with the scaling documentation how your load balancer should treat WebSocket connections and health checks before you send production traffic to several hosts.
Ask your team to write the host inventory and the upgrade order down before the first rollout, and check each item against the core requirements in the scaling guide.
Kubernetes with Helm is the official cluster install method and the most direct way to express replicas. The replica count is a chart value, and the worker count is set through the container environment in the same values file. Kubernetes keeps the requested number of pods running, restarts unhealthy pods and places them on nodes with capacity, but it cannot provide the databases, cache, vector store or shared storage that a multi-replica Open WebUI needs.
- Replicas: set the replica count in the chart values and let the Deployment keep that many pods running. Changing it is a configuration change, not a code change.
- Workers: keep one worker per pod and express the setting through the chart's environment values, so scaling pods stays the only scaling axis.
- Restarts and scheduling: liveness and readiness probes decide when a pod is restarted or removed from service. Spread constraints, anti-affinity and pod disruption budgets are settings your team must configure for node drains and upgrades.
- Shared services: PostgreSQL, Redis, an external vector database and shared storage, either in the cluster or as managed services in your infrastructure. The chart does not provision them for you.
- Secrets: store the shared signing secret and database credentials as Kubernetes secrets, and confirm every pod reads the same values.
Before the first rollout, confirm the value names, probe paths and supported storage access modes in the chart version you deploy, since these change between releases.
Keeping sessions and tokens consistent across replicas
The most important consequence of scaling Open WebUI without Redis is a security one: signing out does not revoke tokens. Without Redis, a token stays valid until it expires, which by default is 4 weeks according to the Scaling Open WebUI guide. A user who signs out of one replica on a shared workstation, or whose laptop is lost, can still have a working token that other replicas accept. Plan for this before go-live, not after an incident. Treat the 4-week default as a value to confirm in your own environment, and decide with your security team whether that window is acceptable for your users, roles and data sensitivity.
Every replica has to recognize a token issued by any other replica. That only works when all instances share the same WEBUI_SECRET_KEY, point at the same PostgreSQL database for user and session records, and use the same Redis for shared state. The identity settings must match too: the same OIDC or LDAP configuration, the same callback and redirect URLs as seen by the browser, and the same external URL in front of the load balancer. A replica with a different secret key or identity configuration produces the kind of 401 errors and login loops that look like random failures. Check these values on every replica after each change, including after a rolling upgrade, and record where each one is stored so a new replica cannot drift from the rest.
Make sign-out across replicas an acceptance check before any user traffic reaches the cluster. Sign in through the load balancer so the session lands on one replica, sign out, then send the old token to each of the other replicas directly and confirm the request is refused. Repeat with a token from a different replica and with a restart of one replica in the middle of the test. Record the results and rerun the test after any change to Redis, the secret key or the identity configuration. Do not rely on the sign-out button alone as evidence, and do not assume that other revocation behavior exists beyond what your version documents. Confirm the current behavior for your release in the Open WebUI releases on GitHub and in your own tests.
Limits to confirm in your environment before scaling out
Scaling Open WebUI out is an architecture decision, and the limits that shape it depend on the exact version you run and the services behind it. The cards below list what your team should verify against current documentation and its own environment, rather than carry forward from a blog post or an older install.
Worker guidance for your version
Confirm the worker and replica guidance in the scaling documentation for the exact Open WebUI version you plan to run. Open WebUI has shipped several releases in recent months, so the recommendation you read last year may not match the release you deploy. Check the releases page for changes to startup flags, environment variables and multi-process behavior before you change the container command.
Releases pageSupported vector database list
Confirm which vector databases the core team maintains and which ones your version supports in multi-process mode. The embedded ChromaDB is the default, and the scaling guide warns it crashes when several workers or replicas run. Check the list against the vector store you plan to run, including whether it is used over HTTP, and test retrieval after the switch.
Scaling guideManaged PostgreSQL and Redis availability
Decide whether a managed PostgreSQL or Redis service meets your availability target, and confirm the failover behavior with the provider. Ask how failover interrupts connections, whether the application reconnects cleanly, and how the service handles the connection limits your replicas will open. Redis holds sessions and websocket coordination, so a Redis outage affects logins as well as chat streams.
Rolling upgrades across replicas
Confirm how database migrations run when replicas start at different versions. Plan whether one replica migrates the schema while others still serve traffic, and whether your load balancer can drain a node before it is replaced. Test an upgrade in a staging copy with the same PostgreSQL, Redis and storage configuration before you change production.
File storage behavior across nodes
Confirm that uploads and knowledge files resolve the same way from every replica. A shared file location must be reachable from each node with the same permissions, and a file written on one replica must be readable on another immediately after upload. Test by uploading a file through one replica, then opening a chat that uses it through each of the others.
Monitoring for worker crashes
Confirm that your monitoring catches a worker that exits or restarts without failing the health check. A container can stay running while one worker process inside it has died, so track container restarts, error rates on login and chat endpoints, and database connection errors. Alert on restart counts per replica rather than on the overall service being up.
Questions buyers ask about scaling Open WebUI workers and replicas
Can we add Uvicorn workers ourselves instead of hiring help?
Yes, a team with container and database experience can change worker counts, but the change is rarely the hard part. Adding workers inside one container only makes sense once the state that replicas share is already external. Without PostgreSQL, Redis, a shared file store and an external vector database in place, extra workers can break file access, sessions and retrieval. The scaling guide makes the external vector database a requirement once several workers or replicas run, because the default ChromaDB crashes in multi-process setups. Check each prerequisite in your own environment before changing the worker count.
What drives the effort of moving to multiple replicas?
The main drivers are how many shared services you must add, how far your current install is from them, and how much testing the change needs. A team that already runs PostgreSQL and Redis has a shorter path than one moving off SQLite, which the scaling guide says is not suitable for multi-instance deployments. Other drivers include shared file storage, the vector store used by knowledge bases, the number of identity integrations to retest, and whether you run Kubernetes or Compose. Ask a partner to show which of these apply to you before estimating anything.
What does a quote for this work usually include?
A quote should follow from a written scope that names the current architecture, the target architecture and the services to be added or changed. Ask for the list of components in scope, such as the PostgreSQL and Redis setup, the vector database choice, shared storage, the replica and worker settings, and the environments covered. It should also state the migration steps, the test plan, the rollback approach, the handover material and the cutover window. Separate the one-time build from any recurring support or upgrade retainer, since those are priced and delivered differently.
What does our team need to provide during the work?
Expect to provide access to the current database, identity provider and container platform, plus a named contact who can approve changes. Network approvals are often on the critical path, especially for connections between replicas, Redis, PostgreSQL and the vector store. You will also need a test window in which users can be moved or paused, and a backup you have restored at least once. Confirm these needs in writing before work starts, because missing approvals usually delay the schedule more than the technical changes do.
How long does the work take from our starting point?
Duration depends on the starting point, and no general figure is safe to quote. A single-replica install on SQLite needs the most change because the database, storage and vector store all move. An install already on PostgreSQL with Redis may need far less. Ask for a timeline that lists each phase, the approvals it depends on and the test window it needs. Treat any timeline given before the current state is inventoried as an early guess.
What goes wrong when workers are raised before the shared services are ready?
The usual failures are login loops and 401 errors, missing uploads or knowledge files on some replicas, and worker crashes tied to the embedded vector store. Without Redis, signing out does not revoke tokens, which remain valid until they expire, by default after 4 weeks. Teams should verify a shared secret, sessions across replicas, file reachability from every replica and retrieval against each replica before they send users to the new setup. A test plan that covers these checks is part of the cost, not an optional extra.
Is the work a one-time project or an ongoing cost?
Most of the build is one-time: designing the architecture, migrating data, configuring replicas and testing. Recurring work includes upgrades, monitoring, backup restores, capacity changes as user numbers grow, and reviewing new Open WebUI releases. Upgrades also depend on the Open WebUI License for deployments above 50 users in a rolling 30-day period, so licensing review may recur as well. Ask any partner which items are included in the build and which would sit under a retainer.
Official sources for Open WebUI scaling
Four official sources cover the decisions on this page: how replicas and workers are supposed to be run, which features depend on shared state, which license terms apply at your user count, and which release you would be upgrading to. Read them together before you settle on a topology, because the scaling guide and the release notes change more often than a design document would.
Scaling guide requirements
This is the primary source for what a multi-replica Open WebUI needs: PostgreSQL in place of SQLite, Redis for shared state, shared file storage and an external vector database. Check the guide for the worker and replica guidance, then compare each requirement against your planned topology. Note that the guide also states the default token lifetime without Redis, which affects how you plan session revocation after sign-out.
Scaling guideFeatures and install methods
The features documentation lists the supported install paths (Docker and Docker Compose, Kubernetes with Helm, and pip) and the identity, RBAC and retrieval features that run across replicas. Check which install method matches your orchestration plan and confirm which vector databases are supported before you choose one. Feature behavior can differ between single-instance and multi-instance setups, so test the features you depend on in a replica test environment.
Features docsLicense terms at scale
The license page sets the branding rule that applies once a deployment exceeds 50 users in any rolling 30-day period, unless an enterprise license or written contributor permission is held. Scaling out to more replicas often means serving more users, so confirm your user count against this threshold before you widen the deployment. Also check which license applies to the release you plan to run, since code through v0.6.5 is under BSD-3-Clause.
License pageReleases and change history
The GitHub releases page records each version, including the most recent ones, and is where you confirm the exact version you will pin. Read the notes for every release between your current version and the target, looking for changes to database handling, Redis use, worker settings and vector store support. Pin the image tag in your deployment manifests so that a rolling update does not change worker or replica behavior without a review.
- Latest release checked
- v0.12.3
How DeployOpen works on this
DeployOpen starts with a written scope that fixes the worker count, replica count and shared services before any change reaches your environment. We build and test the change in infrastructure you control, then hand over the configuration, runbooks and verification steps your team needs to operate it.
How we scope
- Current worker count, replica count and container command for each Open WebUI instance, recorded before any change
- Confirmation that PostgreSQL, Redis, an external vector database and shared file storage are in place or planned
- Written list of which user sessions, uploads and knowledge bases must survive the move to multiple replicas
How we build
- Migration of the database from SQLite to PostgreSQL with a verified backup taken before the cutover
- Replica rollout in a staging copy first, with Redis-backed sign-out and token revocation tested before production
- Load balancer session and WebSocket behavior checked across replicas, with failures logged and retested
How we hand over
- Documented container settings, environment variables and worker and replica decisions with the reasons for each
- Runbook for the cutover sequence, rollback steps and the checks to run after every Open WebUI upgrade
- Recorded test results showing login, sign-out, file access and chat streaming across every replica
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
- Ongoing upgrades, monitoring reviews and retesting are available as a retainer after handover
- Quotes follow from the written scope, so your team can compare the work against an in-house plan

