When a vLLM Docker deployment fits a single GPU host
A single container is the right choice when one team needs an OpenAI-compatible endpoint on one GPU server, serves one model or a small set of models, and accepts that a host failure means downtime. The official vllm/vllm-openai image starts the vLLM server with vllm serve, which exposes /v1/completions, /v1/chat/completions, /v1/responses and /v1/embeddings, so existing OpenAI client code can point at the host with a base URL change. The container packages the engine and its Python dependencies, but it does not decide whether the GPU, driver and container runtime on the host are sized and configured for the model. Confirm the driver and CUDA stack against the vLLM installation requirements for the image tag you choose before anything else is built on top.
Move beyond one container when the model no longer fits on the GPUs in one node, when you need replicas for availability or load balancing, or when platform teams already run Kubernetes and expect declarative deployment, rollouts and health probes. vLLM supports tensor parallelism within a node and pipeline parallelism across nodes, and multi-node runs use Ray or vLLM's own multiprocessing backend. The vLLM security documentation states that node-to-node traffic is insecure by default, so a multi-node design needs an isolated network before it needs anything else. Those are separate projects with their own planning, and this page covers only the single-host case.
Pin the image tag from the first day. vLLM ships new minor releases about every two weeks, for example v0.28.0 on August 26, v0.29.0 on September 9, v0.30.0 on September 22 and v0.31.0 on October 5, 2026, so an unpinned latest tag can change the engine, default flags and supported models between one restart and the next. Record the exact tag, the model revision and the flags in version control, and plan a scheduled test of each new release against your model and client calls before you move production to it. Check the vLLM GitHub releases page for the release notes that apply to your tag.
How the container, GPU, cache and proxy fit together
The diagram starts at the client, which reaches the reverse proxy as the only public entry point. The proxy forwards only the endpoints meant for users to the vLLM container, which uses the GPU device and reads model files from the Hugging Face cache volume. Shared memory is set on the container itself, not on the host. Prometheus scrapes /metrics on the API server, so the proxy should not expose that path publicly. Check that the proxy allowlist and the scrape path are configured separately.
Traffic flows through the proxy into the container, with metrics scraped internally.
Which Docker run options to set and when each fits
This table compares the Docker run options a single GPU host needs for vLLM, what each one solves, and when to use it. Read each row as a decision: the option, what it costs you if you skip it, and the condition that makes it necessary.
| Option | When it fits | Trade-off to weigh |
|---|---|---|
| GPU device access | Every deployment that runs vLLM on NVIDIA CUDA, AMD ROCm or Intel XPU hardware; the container must see the accelerator to load weights | Grant access to the specific GPUs the workload needs so other containers on the host are not starved |
| Shared memory size (--shm-size or ipc host) | Multi-GPU tensor parallel runs, where worker processes exchange data through shared memory; confirm the value against your vLLM version's guidance | A large shared memory allocation uses host RAM; host IPC sharing removes container isolation between processes |
| Model cache volume | Any host that restarts or redeploys containers and should not download weights again; mount the Hugging Face cache path to persistent storage | Weights occupy disk space that grows with each model; cache permissions and ownership must match the container user |
| Hugging Face token variable | Gated models that require accepting a license on the Hub before download; pass the token as an environment variable from a secret store | The token grants access to the account's gated models; rotate it and avoid baking it into images or shell history |
| --api-key flag | A single-tenant host where a shared bearer token is an acceptable first control on /v1 endpoints | It does not protect /metrics, /health or control endpoints such as /pause, so pair it with a reverse proxy that allowlists user-facing routes |
| --chat-template | Models that ship without a chat template, so the chat completions API can format messages; take the template from the model's documentation | A wrong template produces poor or malformed outputs without an obvious error, so test chat requests after setting it |
| --enable-offline-docs | Hosts without internet access where the API documentation pages must load from local assets | Adds a small surface to the server; enable it only when the documentation is needed inside the boundary |
| Image tag: pinned versus latest | Pinned tags suit production and change control; latest suits short-lived test hosts only | vLLM publishes minor releases about every two weeks, so unpinned hosts can change behavior on restart; confirm the tag in release notes before upgrading |
How to set up vLLM in Docker step by step
This sequence takes a single GPU host from a bare driver setup to a running vLLM OpenAI-compatible server with a pinned image, a persistent model cache and verified endpoints. Each step ends with a check so the next one starts from a known state.
Confirm the NVIDIA container runtime and driver
The platform engineer confirms that the host NVIDIA driver is installed, that the container toolkit is registered with Docker, and that a test container can see the GPUs. Check the CUDA and driver requirements against the vLLM installation docs for the release you intend to run, because the image bundles its own CUDA libraries but still depends on a compatible host driver. Done means
nvidia-smilists every expected GPU both on the host and inside a throwaway container started with GPU access.Pin an image tag from the release list
Choose a specific tag for the official vllm/vllm-openai image instead of using a floating tag such as latest. Take the candidate version from the vLLM GitHub releases page, record the tag and its digest in your change record, and confirm in the installation docs that the image matches your driver and GPU generation. Done means the image reference in your compose file or run script names an exact version, and
docker image inspectshows the same digest you recorded.Create the model cache directory
The platform engineer creates a host directory for Hugging Face model downloads and mounts it into the container at the cache path the vLLM docs describe, so weights survive container restarts and are not downloaded again on each start. Set ownership so the container user can write to it, and size the volume for the model weights you plan to serve, plus room for model updates. Done means a test file written inside the container appears in the host directory and survives a container restart.
Pass the gated model token as an environment variable
If the model is gated on Hugging Face, the platform engineer passes a read-scoped access token into the container as an environment variable, typically from a secrets file or the host secret store rather than a literal value in a shared script. Confirm the variable name in the vLLM docs for your release and confirm that the account has accepted the model license. Done means the container can download the gated model without an authentication error, and the token does not appear in shell history or image layers.
Start the container with the serve arguments
Start the container with the required GPU access, the shared memory setting that the docs recommend for multi-worker operation, the cache volume, the token variable, a published port bound to the interface you intend to use, and the serve arguments for your model, such as the model name, maximum context length and tensor parallel size. Keep the API bound to a private interface where possible, because the security docs say the API key option does not protect every endpoint. Done means the container logs show the model loaded and the server listening on the expected port.
Verify the model list endpoint
From a client host that is allowed to reach the server, call the models endpoint on the OpenAI-compatible server and confirm that the served model name appears in the response. Check the online serving docs if the path or authentication header differs in your release. Done means the request returns HTTP 200 and lists exactly the model name you passed to the server, with no unexpected entries.
Send a chat completion request
Send one short chat completion request to the chat endpoint with the served model name and a fixed test prompt. If the request fails with a chat template error, the model needs a chat template or a --chat-template argument, so confirm that requirement in the online serving docs before changing the model. Done means the response contains generated text and a usage block with token counts, which shows the model ran on the GPU.
Check the metrics endpoint and record the baseline
Call the Prometheus metrics endpoint on the API server and confirm that request counters, token throughput, latency histograms and KV cache usage are present after the test request. Check the metrics docs for the exact metric names in your release and decide who scrapes the endpoint, because metrics should be reachable by monitoring but not by end users. Done means the metrics page shows counters that increased after your test request, and the image tag, model name and arguments are saved as the baseline for later upgrades.
When a custom image beats the official image
Use the official vllm/vllm-openai image as-is until something in your deployment needs a dependency it does not carry. The usual triggers are an extra Python package that your tokenizer, preprocessing step or custom logic imports, a system library needed by a multimedia or document dependency, or a vLLM plugin you have chosen to load. In those cases, build a derived image with a Dockerfile whose first line is FROM vllm/vllm-openai followed by an exact tag. Keep the additions small and install them with pinned versions, so the only difference between your image and the upstream image is the set of changes you can list and defend in a change review. If a dependency can be satisfied by mounting a file or setting an environment variable, prefer that, because it keeps the image identical to upstream.
Pin the base tag to a specific release, such as the version you tested, and never use latest as the base. The vLLM project ships new minor releases about every two weeks, and the releases page at vLLM GitHub releases is where you confirm which tags exist and what changed in each. A derived image that rebuilds on every upstream release drifts quietly: the Python packages, CUDA runtime and engine flags change under your model, and a rebuild that worked last month may fail or behave differently today. Rebuild on a schedule you control, run the same load and API tests against each candidate base, and promote only the image that passes.
Hardware plugins are a separate question. vLLM runs on several accelerator families, and some of them are supported through plugins that live outside the main repository, so the base image may not contain the runtime your accelerator needs. Do not assume a derived image on the NVIDIA-oriented base will work on other hardware. Ask the plugin maintainer and your hardware vendor which base image, driver and runtime versions they support, and confirm those pairings in a test environment before you write the FROM line. Record the base tag, the plugin version and every extra package in your build file, so an auditor or on-call engineer can reproduce the image later.
Security settings the Docker host needs before exposure
A vLLM container is only as protected as the host and proxy around it. The settings below decide which endpoints users can reach, which interfaces listen, and who can read the cache and token files. Check each one before the server accepts traffic from anything beyond the host.
Do not rely on the API key alone
The --api-key option protects the /v1, /v2, /inference and /cohere paths, but not /invocations, /pause, /resume, /abort_requests, /metrics or /health. vLLM's security documentation warns against relying on the key alone. Place a reverse proxy in front of the container and allowlist only the endpoints meant for users, then test from outside the host that the others return nothing usable.
vLLM security docsKeep the container off public interfaces
Publish the container port only on the interface the proxy uses, typically a loopback or private address, rather than on all interfaces. Confirm the host firewall and any cloud security group expose only the proxy's listening port. Run a port scan from outside the network after each change to the Docker run command or Compose file.
Restrict admin and control endpoints
Endpoints such as /pause, /resume, /abort_requests and /metrics change server state or reveal operational detail, and they sit outside the --api-key check. Block them at the proxy for all user-facing routes, and allow them only from an administrative network segment or a monitoring host. Ask whoever owns the proxy to confirm the rules in writing.
Protect cache and token file permissions
The model cache volume holds downloaded weights, and any Hugging Face token used for gated models is stored on the host or passed as an environment variable. Set owner-only permissions on the host directories and token files, and mount the cache read-write only into the container that needs it. Confirm that the token does not appear in shell history, image layers or logs.
Keep single-host deployments off inter-node ports
vLLM's security documentation states that communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. A single-GPU host has no such traffic, so do not publish distributed-serving ports or Ray ports from the container. If you later add a second node, place the nodes on an isolated network before enabling that traffic.
Parallelism and scaling docsPin and patch the image
The vllm/vllm-openai image changes with each release, and vLLM ships new minor versions about every two weeks. Pin the image to a specific tag or digest, record it in your change log, and test each upgrade in a staging host before production. Confirm your patch process covers the base image and any custom image layers you build on top.
vLLM releasesQuestions teams ask before running vLLM in Docker
What does running vLLM in Docker actually cost?
vLLM has no paid edition, so the license adds nothing to the bill. The cost comes from four places: the GPU or other accelerator capacity the host uses, the server and storage around it, the implementation work to validate the setup, and the people who operate it afterward. GPU capacity is usually the largest line and recurs for as long as the host runs, whether it is owned or rented. Implementation is one-time work that depends on the model, the hardware and how much verification the team requires. Ask any quote to separate hardware, one-time build work and recurring operations, and to state which items are included and which the client buys directly. The license itself is Apache-2.0, so no license fee appears in any of these lines.
How long does a single-host vLLM setup take to validate?
The duration depends on the model, the GPU generation and memory, the number of endpoints in use, and how far the validation goes. A setup that loads one model, serves a single application and needs only a basic smoke test is much shorter than one that also covers gated model access, custom images, metrics collection and a load test against target latency. The work is fixed-scope, so the timeline is agreed in writing before the build starts and tied to the deliverables listed in that scope. No duration applies until the scope is known, so ask for a written timeline that lists each validation step and the client action each step depends on.
What does the client team need to provide for a Docker deployment?
The client provides the inputs that only they control. In practice this means:
- Access to the GPU host, with root or sudo rights for installing the container runtime and GPU support.
- A supported NVIDIA, AMD or Intel GPU driver and container toolkit version approved by the client's platform team.
- Access to the model weights, including a Hugging Face token with permission for any gated model, and a decision on where weights are stored.
- Network policy that allows the image pull and the model download, or an approved internal registry and model mirror for air-gapped sites.
- A named owner for the endpoint, the API keys and the reverse proxy in front of it.
Confirm each item before scoping, because a missing model license or a blocked registry is the most common reason a single-host build stalls.
Can an internal team run vLLM in Docker without outside help?
Yes, many teams can, provided they have someone comfortable with Linux, GPU drivers, container runtimes and the vLLM server's options. The documented path is short: run the official image with GPU access, mount a model cache volume, set shared memory for the container, and place the endpoint behind a proxy. The harder work sits in the details: choosing the GPU memory and context limits for the model, confirming the chat template, setting an authentication and exposure policy, collecting metrics, and writing runbooks for failures. An internal team should ask whether it has time to test these under load and whether it can keep pace with the release cadence. Outside help makes most sense when the timeline is tight, the security review needs documented evidence, or the team has no one to own the host after handover.
How often should a self-hosted vLLM container be upgraded?
vLLM ships new minor releases about every two weeks, so a host pinned to one version falls behind quickly. Pinning the image to a specific version tag is the right default, because it makes behavior reproducible and lets the team test before any change reaches users. Plan a regular review cadence, read the release notes for each candidate version, and retest the model, the chat template, the API calls your applications use and the metrics before promoting an image. Security fixes also need a path that does not wait for the next scheduled window. Agree the cadence and the rollback steps in writing, and note that moving across larger engine changes may need its own plan.
When should a team move vLLM from Docker to Kubernetes?
Move to Kubernetes when the single host can no longer meet the availability, scaling or multi-team needs of the service. Typical signals include more than one GPU host that must be managed as a pool, a need for automated restarts and rolling upgrades across replicas, several models or teams sharing capacity, or a platform team that already runs cluster operations. The vLLM documentation lists several Kubernetes options, including native manifests, Helm and a production stack, so the choice of tooling is a separate decision. A single-host Docker setup is still a sound base for that move, because the image, model cache and runtime flags carry over. Ask whether the cluster, the GPU operator and the network policy already exist before estimating that migration.
How DeployOpen scopes and delivers a vLLM Docker deployment
DeployOpen plans, builds, documents and supports self-hosted vLLM inside your own infrastructure, so the container, model cache, network path and API access are set up for your single GPU host. The work starts with a written scope that defines the hardware, model, image version and access rules before any build begins.
How we scope
- Inventory the GPU host, driver stack, CUDA or ROCm version and the container runtime you already operate.
- Agree the model list, the vllm/vllm-openai image tag to pin, and whether a custom image is needed for extra dependencies.
- Define who reaches the API, where the model cache volume lives, and how gated model tokens are issued and stored.
How we build
- Configure shared memory, the model cache volume and the serving flags in a reproducible Docker or Compose definition.
- Build any custom image on a pinned base, with dependencies recorded so later rebuilds produce the same result.
- Test the OpenAI-compatible endpoints from the applications that will call them, and confirm the chat template behaves as expected.
How we hand over
- Deliver the image definition, run configuration, environment file layout and secret handling in your repository.
- Document the pinned version, the upgrade steps and the rollback procedure your team will follow after handover.
- Walk your operators through startup, model loading checks, log locations and the /metrics endpoint.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, version upgrades and continuous testing are available as a retainer after handover.
- Ask for a quote built from the written scope, and confirm which items your own team will run after handover.

