Open WebUI with vLLM

Connect Open WebUI to vLLM on GPU servers you control through the OpenAI-compatible API, with the access, timeout and gateway decisions planned before users arrive.

On this page

How Open WebUI reaches a vLLM server on your GPUs

A team that wants one shared chat interface over models it serves itself has a specific architecture to build: Open WebUI connects to vLLM as an OpenAI-compatible provider, and vLLM exposes the /v1 endpoints when it runs under vllm serve. The work is configuring that connection, restricting which vLLM endpoints users can reach, and planning for model loads that take a long time. vLLM is licensed under Apache-2.0 and has no paid edition, so the recurring cost sits in accelerator capacity, the surrounding infrastructure and the people who operate the stack. Open WebUI's own licensing is a separate question covered in the buyer's guide for that product.

In the connection, Open WebUI sends requests to the base URL of the vLLM server, normally ending in /v1, and authenticates with the key set through vLLM's --api-key option. Two details matter here. The vLLM security documentation states that --api-key protects the /v1 family of routes but not /metrics, /health, /pause or /abort_requests, and it recommends a reverse proxy that allowlists only the endpoints users need. Plan that proxy as part of the build, and confirm the exact route list for your vLLM release, because the docs change between versions. Also decide whether Open WebUI reaches vLLM over a private network path or through the proxy, and keep the vLLM API off public addresses.

Model loading is the other planning item. A large model can take a long time to load onto GPUs after vllm serve starts, and during that window the server may not answer requests. Open WebUI will report a timeout or a failed model list if the first request arrives too early. Measure load time for each model on your own hardware, set health checks that wait for readiness before routing traffic, and test the first request after a restart. Add a gateway such as LiteLLM in front of vLLM when you need per-team keys, spend limits, failover between replicas or several providers behind one endpoint, and treat that as a separate build covered on its own page.

What you need before connecting Open WebUI to vLLM

Connecting Open WebUI to vLLM depends on three layers working before any configuration starts: the GPU server running vLLM, the Open WebUI install, and the network and certificates between them. Check each card below in your own environment before you open a change request.

GPU server and accelerator support

vLLM runs on NVIDIA CUDA, AMD ROCm and Intel XPU GPUs, among other hardware. Confirm that your accelerator model, driver stack and operating system are listed in the vLLM installation docs, because support differs by platform and version. Record the GPU memory per device and the number of devices per node, since these decide which models you can serve and whether you need tensor parallelism across GPUs.

vLLM installation docs

vLLM version and release line

Pick a vLLM version deliberately instead of installing whatever is newest. vLLM ships new minor releases about every two weeks, so pin the version in your build and plan a test window for each upgrade. Read the release notes for the features and model support you need, and confirm the Open WebUI release you run is compatible with your OpenAI-compatible connection settings.

Latest release in supplied facts
v0.31.0
vLLM releases

Model fit on the hardware

Check that the model weights, the KV cache for your expected context length and concurrent users all fit in GPU memory before you connect anything. Large models may need tensor parallelism across GPUs in one node, or pipeline parallelism across nodes. Confirm model architecture support and quantization options with the vLLM docs and test the exact model you plan to serve, not a similar one.

A running Open WebUI install

Open WebUI installs with Docker, Docker Compose, Kubernetes with Helm, or pip install open-webui followed by open-webui serve. Get one install method working end to end with a local account before adding the vLLM connection, so model errors are not confused with install errors. Record the version you deploy, because upgrades change settings and the license terms apply from v0.6.6 onward.

Open WebUI features

PostgreSQL for multi-replica setups

A single Open WebUI replica can run on SQLite when the database file sits on locally attached SSD or NVMe storage. Once you run multiple replicas, the scaling guide requires PostgreSQL instead of SQLite, and Redis plus shared file storage also become necessary. Provision the database, backups and credentials before you scale out, and plan the external vector database the scaling guide requires for multi-replica setups.

Scaling Open WebUI

Network path to the vLLM port

Open WebUI must reach the vLLM API server over a network path you control, usually on a private subnet rather than a public address. Confirm that firewall rules, security groups and any Kubernetes network policies allow traffic from the Open WebUI host or pods to the vLLM port. Keep vLLM nodes on an isolated network, because vLLM's multi-node communication is insecure by default.

TLS certificates and endpoint exposure

Plan certificates for the public Open WebUI hostname and for any internal HTTPS path to vLLM. Use a reverse proxy that allowlists only the endpoints users need, because vLLM's --api-key option does not cover every route, including /metrics and /health. Confirm with your certificate authority and internal PKI team who issues, renews and rotates these certificates before go-live.

Configuring the connection step by step

This sequence takes a vLLM server from a running model to a verified chat in Open WebUI, with a check at each step so the team knows the connection works before it opens access to users.

  1. Start the vLLM server with a served model name

    On the GPU server, the platform engineer runs vllm serve with the model path and a --served-model-name value that users will see in Open WebUI, such as a short, stable alias. Bind the server to an address reachable only from the Open WebUI host and its approved network segment, not to all interfaces by default. The step is done when the server log shows the model loaded and the API server listening. Model loading can take a while on large weights, so wait for the ready message before testing.

  2. Confirm the model list responds from the Open WebUI host

    Run curl against the /v1/models endpoint from the Open WebUI host, not from the GPU server, because that is the path Open WebUI will use. The response should list the served model name exactly as configured. If the call times out or is refused, check the bind address, firewall rules and whether the model is still loading before changing any Open WebUI settings. Record the exact model ID returned, since you will match it later.

  3. Add the vLLM base URL as an OpenAI-compatible connection

    A workspace administrator opens the Open WebUI admin settings, goes to the connections area and adds an OpenAI-compatible connection. Enter the vLLM base URL including the /v1 path, for example the internal address of the GPU host on the vLLM port. Leave the connection disabled for regular users until the test in the final steps passes. The connection is saved when Open WebUI lists it without an error, and the model list refresh returns the served model name.

  4. Set an API key on both sides

    Start vLLM with the --api-key option so requests without the key are rejected, then enter the same key in the Open WebUI connection settings. Store the key in a secret manager or an environment-managed secret rather than in a shared document or a shell history file. Confirm the key works with a curl call that sends the Authorization header, and confirm that the same call without the header is refused. Keep in mind that the vLLM security documentation says this option alone is not enough, so the network controls in the deployment should still apply.

  5. Confirm a chat completion returns

    Send a short test request to the /v1/chat/completions endpoint with curl, using the served model name and the API key. A JSON response with a generated message confirms that the model runs and the route is open. Then open a new chat in Open WebUI as the administrator, select the vLLM model and send a short prompt. Test a second prompt to confirm that streaming and follow-up turns work. The step is complete when both the curl call and the Open WebUI chat return a reply without errors.

  6. Set model visibility and group access

    In the Open WebUI admin settings, control which models appear to users and which groups can use them, so that sensitive or experimental models stay limited to approved teams. Use the role-based access control groups and per-model permissions available in your Open WebUI version, and confirm the exact menu names in your release. Sign in as a test user from each target group and verify that the model appears for allowed groups and is hidden from others. Enable the connection for regular users only after this check passes.

Why first requests time out while the model loads

A model that is still loading is not ready to answer. After vllm serve starts, the process must read the weights into GPU memory and finish its startup steps before the OpenAI-compatible endpoints can handle a chat request. Load time depends on model size, precision, storage speed and how many GPUs the model is split across, so it can range from minutes to much longer on large models. Requests sent during that window can fail with connection errors or hang until a timeout fires. Measure the load time on your own hardware by timing how long the server takes to begin answering a test request, and record that number before you set any timeout. Do not copy a figure from a blog post or a different GPU class.

Add the Open WebUI connection only after the vLLM server reports ready. Poll the /v1/models endpoint with a small script or your orchestrator's readiness probe, and confirm that the served model name appears before you create the connection in the Open WebUI admin settings. Then tune the timeouts in the path between the browser and the model. Open WebUI calls the upstream endpoint with its own request timeout, and any reverse proxy in front of Open WebUI or in front of vLLM has a separate read timeout. Check the Open WebUI documentation for the current timeout settings in your release, and set the proxy read timeout to exceed the worst-case load and first-token time you measured.

A proxy timeout shorter than the load time is the most misleading failure in this setup. The proxy returns a gateway error, Open WebUI shows a generic failure in the chat, and the vLLM log may show the model still loading or completing normally. Engineers then look at the application, the model settings or the prompt, when the real cause is a timer that expired first. Keep a test case that sends a request immediately after a cold restart, and check the proxy access log, the Open WebUI log and the vLLM log for the same request ID. Plan the restart procedure so that users are routed away from the endpoint until readiness passes, especially after upgrades or node reboots.

How a chat request travels from users to vLLM

A chat request starts with a signed-in user in the browser, passes to Open WebUI in the application tier, and reaches the vLLM OpenAI-compatible API server, which runs the model on GPUs in a separate network. An optional reverse proxy sits in front of the vLLM endpoints, and an optional LiteLLM gateway can sit between Open WebUI and vLLM. Check each hand-off: only the endpoints meant for users should be reachable from the application tier, and the GPU network should accept traffic only from the layer in front of it.

Request path from users through the application tier to vLLM and GPUs, with trust boundaries.

Connect directly or put LiteLLM in between

A direct connection points Open WebUI at the vLLM server's OpenAI-compatible base URL, usually with the --api-key value set on the vLLM side. Open WebUI then lists the models that server exposes and sends chat requests straight to it. This pattern fits one or a few vLLM models used by one team, where the people running the GPU server are also the people administering Open WebUI. Nothing extra needs to be deployed or patched.

  • Fewest moving parts: one model server, one endpoint and one set of credentials to rotate.
  • Limited controls: spend limits, per-key rate limits and per-team model access are not provided by vLLM itself, so they must be handled in Open WebUI or not at all.
  • Single failure point: if the vLLM server is restarting or loading weights, every user of that model waits.
  • Simple testing: you can confirm the connection by listing models and sending one chat request before users arrive.
  • Proxy still needed: vLLM's security documentation recommends a reverse proxy that allowlists only user-facing endpoints, which applies to this pattern too.

Before choosing this pattern, confirm with your security team that a single shared key and direct network path to the GPU server meet your access and logging requirements.

How vLLM models, keys and access map into Open WebUI

This table shows which setting in vLLM, Open WebUI and LiteLLM controls each model name, key, permission and metric in a vLLM connection. Read each row from the vLLM server outward to the user, and check the unprotected endpoints before the server is reachable from outside the platform team. The main takeaway is that vLLM authenticates the connection, while Open WebUI groups and any gateway keys decide who can use each model.

ItemSet whereWhat to check
Model namevLLM serve command, served model nameOpen WebUI uses the name vLLM returns in its model list. Confirm the ID matches exactly before assigning access.
vLLM --api-key valuevLLM server, entered as the key on the Open WebUI OpenAI-compatible connectionProtects /v1 endpoints only. Store the value in a secret manager and rotate it on a schedule you define.
Unprotected vLLM pathsvLLM server and reverse proxy/metrics, /health, /pause, /resume, /abort_requests and /invocations need allowlisting at the proxy. Confirm the list for your vLLM version.
Group access to modelsOpen WebUI admin settings, groups and model permissionsDecides which users see each model. vLLM sees only the connection, so per-user rules live in Open WebUI.
LiteLLM virtual keyLiteLLM proxy, one key per group or teamRestricts the key to listed models and sets budgets and rate limits. Requires a PostgreSQL database.
Team budget and rate limitsLiteLLM team settingsPer-team budgets and TPM or RPM limits. Write down the group-to-team mapping, since your team maintains it.
vLLM /metrics endpointvLLM API server, scraped by PrometheusProvides request counts, token throughput, latency histograms and KV cache use. Keep scrape traffic on the monitoring network.

Protecting the vLLM endpoints

A vLLM server exposes more than the chat endpoints Open WebUI calls. The cards below cover which paths the API key actually protects, how multi-node traffic must be isolated, how keys stay out of logs, and who may read the metrics endpoint.

Know what the API key covers

The --api-key option protects the /v1, /v2, /inference and /cohere paths, but not /invocations, /pause, /resume, /abort_requests, /metrics or /health. Open WebUI only needs the /v1 routes for chat, models and embeddings, so the key should not be treated as the whole perimeter. Check each unprotected path from outside the trusted network before you go live, and confirm the list against the version you deploy because path coverage can change between releases.

vLLM security docs

Allowlist paths at a reverse proxy

The vLLM security guidance recommends a reverse proxy that forwards only the endpoints meant for users. For Open WebUI with vLLM, that usually means the model list, chat completions and, if used, embeddings and audio routes, while everything else returns a denied response. Place the proxy in front of the vLLM port so the GPU server never listens directly on a network that users or other hosts can reach. Test the allowlist with requests to each blocked path, not only to the paths Open WebUI uses.

vLLM online serving docs

Isolate inter-node traffic

In multi-node runs, communication between nodes is insecure by default, with no authorization or encryption between them. Pipeline parallelism across nodes, and the Ray or multiprocessing backend that carries it, must sit on an isolated network segment that carries no user traffic and no general corporate traffic. Ask your platform team to confirm the segment's firewall rules, and review them whenever nodes are added, because a single node placed on a shared subnet exposes the whole cluster.

vLLM parallelism docs

Keep keys out of Open WebUI logs

The vLLM API key is configured in Open WebUI as a provider connection, so it can surface in configuration exports, backups, container environment dumps and troubleshooting output. Store the key in a secret manager or an orchestrator secret, inject it at runtime, and confirm that your log pipeline does not capture request headers or environment variables from the Open WebUI container. Rotate the key on a schedule and after any staff change, and document which Open WebUI admins can view provider connection settings.

Restrict metrics to monitoring hosts

The /metrics endpoint exposes request counts, token throughput, latency histograms and KV cache use. These figures reveal usage patterns and load, which are useful to an attacker planning a denial of service and to anyone who should not see per-model activity. Allow access only from the Prometheus server or the monitoring subnet, block it at the proxy for all other sources, and confirm that the scrape job uses the same network path you expect. Keep the health endpoint on the same restricted rule set.

vLLM metrics docs

Verify exposure before go-live

Each control above can drift as the proxy, firewall or vLLM version changes. Before users connect, run an external scan of the GPU server address and a set of authenticated and unauthenticated requests against every path, then record the results. Repeat the check after each vLLM upgrade, since the security guidance and endpoint list are version-specific. Ask a security tester to confirm the result if your review requires independent evidence.

Common failures and their fixes

This table maps the failures teams most often see when connecting Open WebUI to a vLLM server, with the likely cause and fix for each. Read it by symptom: find the error you see, check the cause column, then apply the fix and confirm it against the vLLM server before changing Open WebUI.

SymptomLikely causeFix
Connection refused during model loadvLLM is still loading weights into GPU memory, so its port is not yet accepting requests, or the server is bound to 127.0.0.1 inside a container.Wait for the server log to report that the API server is ready, confirm the bind address and port, and check that the container publishes the vLLM port to the network Open WebUI uses.
Read timeouts on first requestThe first request triggers work that takes longer than Open WebUI's default timeout, such as loading or compiling the model, so the request ends before the first token arrives.Send a warm-up request directly to vLLM, wait until it completes, then retry from Open WebUI. Raise the model connection timeout in Open WebUI only after confirming load time from the vLLM log.
Model missing from Open WebUIThe model name in Open WebUI does not match the name vLLM serves, or Open WebUI has not refreshed its model list after vLLM started.Query the /v1/models endpoint on vLLM, copy the exact model ID, and refresh the connection in the Open WebUI admin settings.
401 from the API key mismatchThe key set with the vLLM --api-key option differs from the key stored for the OpenAI-compatible connection in Open WebUI.Store one key in a secret manager, pass it to both vLLM and Open WebUI from that source, and restart both after rotation. Do not rely on the key alone to protect the server.
404 on the /v1 pathThe base URL includes /v1 when Open WebUI adds it, or omits /v1 when the client expects it, so requests hit paths such as /v1/v1/chat/completions or /chat/completions.Check how the connection builds request paths in your Open WebUI version, then set the base URL to the form that yields /v1/chat/completions when called directly with curl.
Streaming responses cut off by a proxy bufferA reverse proxy in front of Open WebUI or vLLM buffers server-sent events, so partial output stops or arrives in one block.Disable response buffering for the streaming routes, raise the proxy read timeout above the longest expected generation, and test a streamed reply end to end.
Out-of-memory on loadThe model weights, KV cache and context length together exceed the free GPU memory, or another process already holds GPU memory.Lower the maximum model length, reduce the memory utilization target, use a smaller or more heavily quantized model, or add tensor parallel GPUs. Check GPU memory before each start.
Multi-replica Open WebUI missing Redis or PostgreSQLOpen WebUI runs on several replicas with SQLite, or without Redis, so sessions, websocket state and application data are not shared between instances.Move the database to PostgreSQL, add Redis for shared state, and provide shared file storage. Without Redis, sign-out does not revoke tokens until they expire, by default after 4 weeks.

Questions buyers ask before connecting Open WebUI to vLLM

What drives the cost of running vLLM behind Open WebUI?

The largest cost is accelerator capacity, because vLLM is free to use and has no paid edition. You pay for GPU or other accelerator servers, the infrastructure around them (storage, networking, load balancing, backups and monitoring), and the people who install, tune and operate the stack. Capacity needs depend on the model size, the number of concurrent users and the context lengths you allow. Ask any quote to separate one-time work (design, build, initial testing, documentation) from recurring work (upgrades, model changes, on-call support) and to show which hardware assumptions it depends on.

How long does a vLLM and Open WebUI setup take?

Duration depends on how many models you serve, whether GPU servers already exist, how many identity and network approvals are needed, and whether you run one replica or several. A single-node setup with one model is far shorter than a multi-node cluster with SSO, a reverse proxy and load testing. Model download and loading time also matters, because large models can take a long time to load before they answer requests. Ask for a timeline tied to a written scope with named milestones, and confirm which items depend on your own approvals.

Can our own team set this up without a partner?

Yes, if your team already runs GPU servers, container platforms and reverse proxies, and has someone who can read vLLM and Open WebUI release notes and act on them. The work is ordinary infrastructure engineering, but it has sharp edges: vLLM's API server does not restrict endpoints on its own, multi-node traffic is insecure by default, and Open WebUI needs shared state once it runs on more than one replica. Assess your team against those points. A partner is most useful when the scope spans identity, network controls, evidence for a compliance review, and handover to operators.

What do we need to provide for the engagement?

Plan to provide the following before work starts:

  • GPU access: servers or cloud instances with the accelerator type, driver support and capacity you intend to use
  • Model choices: the models you approve, their licenses and the context lengths and concurrency you expect
  • Network approvals: which subnets can reach the model server, the Open WebUI service and any outbound endpoints
  • Identity decisions: how users sign in, which groups map to which models, and who administers access
  • Named owners for operations, upgrades and on-call response after handover
Do we need LiteLLM between Open WebUI and vLLM?

No. Open WebUI can connect directly to vLLM because vLLM exposes OpenAI-compatible endpoints such as /v1/chat/completions. LiteLLM becomes worth considering when you need to put several providers behind one interface, enforce per-key or per-team budgets and rate limits, route requests across model replicas with failover, or keep one audit point for usage. Those controls add a PostgreSQL database and, with more than one proxy instance, Redis 7.0 or newer. Decide this from your governance needs, not from the connection itself. The related integration page covers the gateway in detail.

What changes when we run multiple Open WebUI replicas or vLLM nodes?

Open WebUI needs PostgreSQL instead of SQLite, Redis for shared sessions and websocket state, shared file storage so uploads and knowledge are reachable from every replica, and an external vector database because the default ChromaDB will crash in multi-process setups. Without Redis, signing out does not revoke tokens, which stay valid until they expire, by default after 4 weeks. On the vLLM side, nodes in a multi-node deployment communicate without authorization or encryption by default, so they must sit on an isolated network. Ask any quote to cover each of these items explicitly and to name the test that proves failover behaves as expected.

Why do requests time out while a model is loading?

Large models take time to read from storage and place on GPU memory, and Open WebUI may give up on a request before the model is ready. The usual fix is to confirm the model has finished loading (the server must be up and serving before users connect), raise the relevant timeout in Open WebUI and any reverse proxy in front of it, and keep models warm where your serving setup allows it. Check your proxy's read timeout first, because it is often the shortest limit in the path. Ask the team that delivers the setup to show the timeout values and a load test that uses your largest model.

What DeployOpen delivers in a vLLM integration

A DeployOpen vLLM integration is delivered under a written, fixed scope agreed before work starts. The scope names the GPU hosts, the models to serve, the users and groups who will reach them, and the Open WebUI instance that will connect. Deliverables cover the serving configuration for vllm serve, the connection settings in Open WebUI for the OpenAI-compatible base URL and API key, and an allowlist at a reverse proxy that exposes only the endpoints users need, such as /v1/chat/completions and /v1/models. Timeout tuning for model loading is part of the work, with the values recorded so the operations team can change them later. Whether a LiteLLM gateway is in scope is decided during scoping and written into the agreement, along with the verification steps and the handover package.

Verification is run against the agreed scope and produces records the client keeps: test results for model listing, streaming chat, a cold start after a restart, a request that exceeds the configured timeout, and a check that unlisted vLLM paths such as /metrics or /health return denied responses from outside the isolated network. Handover covers configuration files, the proxy rules with their reasons, runbooks for restarting a model server, and a list of decisions the client still owns, such as which model versions to adopt after each vLLM release. Clients should confirm the exact deliverable list, acceptance criteria and retest terms in the written scope, because these vary by environment.

DeployOpen prepares systems, configuration and evidence that a client's compliance or security reviewers can examine, including access rules, logging and network placement. DeployOpen does not issue audit reports, attestations or certifications, and that determination stays with the independent auditor or certification body the client engages. Ask for the evidence list in the quote so the auditor's requests are covered before the build begins.

How DeployOpen scopes and supports this integration

DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own infrastructure, including the GPU servers, network and identity systems this integration depends on. We start with a written scope that names the models, endpoints, users and controls involved, then build and test the connection before handing it over with documentation your operations team can run.

How we scope

  • Inventory the GPU servers, vLLM versions, model list and expected concurrent users before any build work starts
  • Agree in writing which Open WebUI connections, endpoints and gateway components are in and out of scope
  • Confirm timeout targets for model loading, the identity provider in use and where logs and metrics must go

How we build

  • Deploy vLLM behind a reverse proxy that allowlists only the endpoints users need, since the --api-key option does not cover every route
  • Connect Open WebUI to the OpenAI-compatible API and tune connection and request timeouts to match measured model load times
  • Test model listing, chat, streaming and failure behavior during a restart, then record the configuration used for each step

How we hand over

  • Deliver the written configuration, proxy rules, network placement notes and the model and version matrix used in testing
  • Provide runbooks for model loading timeouts, rolling vLLM updates and rotating the API key used between the two services
  • Walk your platform and security teams through the setup so they can review it against their own controls

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
  • Ongoing support, upgrades and continuous testing are available as a retainer, covering vLLM and Open WebUI version changes
  • Re-test the integration after upgrades or gateway changes, including whether LiteLLM is added between the two services later

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.