vLLM serves language models as an OpenAI-compatible API. Your applications, scripts or AI agents then call a model on your own server instead of the cloud; all it takes is changing the address. Unlike Ollama, vLLM handles many requests at once, which makes it a good fit for use by several people.
For production use, we recommend a Hukot.net GPU-VPS: graphics cards with 24 to 96 GB of VRAM, a datacentre in the Czech Republic and a fixed monthly price instead of paying per token.
Prerequisites #
- A GPU-VPS with Ubuntu 24.04 LTS and SSH access with
sudorights. - NVIDIA driver 580 or newer. The current vLLM is built for CUDA 13, which older drivers don't support.
- A Hugging Face account if you want gated models (for example Llama).
Check the driver version with nvidia-smi. If it's older than 580, install a newer one and restart the server:
sudo ubuntu-drivers list --gpgpu
sudo ubuntu-drivers install --gpgpu nvidia:580-server
sudo reboot
Driver installation is covered in more detail in Ollama and Open WebUI on a GPU-VPS. For the RTX PRO 6000 Blackwell, choose the variant with open kernel modules, nvidia:580-server-open.
Installation #
-
Create a system user
vllmwith the home directory/opt/vllmand switch to it:sudo useradd --system --create-home --home-dir /opt/vllm --shell /bin/bash vllm sudo -iu vllm -
Install the
uvpackage manager:curl -LsSf https://astral.sh/uv/install.sh | sh source ~/.local/bin/env -
Create a Python virtual environment and install vLLM:
uv venv --python 3.12 --seed --managed-python source .venv/bin/activate uv pip install vllm --torch-backend=auto vllm download-kernelsvllm download-kernelsdownloads prebuilt kernels for the graphics card; otherwise they would be compiled at every start. -
For gated models, log in with a Hugging Face token:
hf auth login
Choosing a model #
vLLM loads models without quantization (16 bits), so they take more memory than in Ollama. It also needs part of the VRAM for requests in progress, so on 24 GB the context is limited to 16,384 tokens.
| GPU-VPS | VRAM | Suitable model |
|---|---|---|
| GPU‑VPS1, GPU‑VPS3 | 24 GB | Qwen/Qwen3-8B |
| GPU‑VPS2 | 2 × 24 GB | Qwen/Qwen3-14B split across both cards |
| GPU‑VPS5 | 96 GB | Qwen/Qwen3-32B, openai/gpt-oss-120b |
The plans' specs are in Which VPS plan to choose for OpenClaw and Hermes Agent.
First start #
-
As the user
vllm, start the model:vllm serve Qwen/Qwen3-8B --host 127.0.0.1 --port 8000 --max-model-len 16384 --api-key <api-key>Replace
<api-key>with a long random string, for example fromopenssl rand -hex 32. The first start takes longer because the model is downloaded into~/.cache/huggingface. -
In the output, find the lines
GPU KV cache sizeandMaximum concurrency. They tell you how much memory is left for requests and how many the model can handle at once. If vLLM reports at startup that the context length doesn't fit into memory, lower--max-model-len. -
In a second terminal, check that the API responds:
curl http://127.0.0.1:8000/v1/chat/completions \ -H "Authorization: Bearer <api-key>" \ -H "Content-Type: application/json" \ -d '{"model": "Qwen/Qwen3-8B", "messages": [{"role": "user", "content": "Hi, are you online?"}]}'
Stop the server with Ctrl + C, and return to your own user with exit.
Two graphics cards
On GPU-VPS2, split the model across both cards with --tensor-parallel-size 2:
vllm serve Qwen/Qwen3-14B --host 127.0.0.1 --port 8000 --max-model-len 32768 --tensor-parallel-size 2 --api-key <api-key>
The cards in GPU-VPS2 are connected with NVLink, which suits splitting a model. nvidia-smi topo -m shows the connection.
Tool calling
AI agents such as Hermes Agent need the model to support tool calling. Turn it on with --enable-auto-tool-choice and --tool-call-parser with the parser for the model family, for example openai for gpt-oss or hermes for Qwen2.5. The list of parsers is in the vLLM documentation.
Running in the background #
-
As your own user, create the file
/opt/vllm/vllm.env(for example withsudo nano /opt/vllm/vllm.env) containing the API key:VLLM_API_KEY=<api-key> -
Make the file readable only by the user
vllm:sudo chown vllm:vllm /opt/vllm/vllm.env sudo chmod 600 /opt/vllm/vllm.env -
Create the service
/etc/systemd/system/vllm.service:[Unit] Description=vLLM OpenAI-compatible server After=network-online.target Wants=network-online.target [Service] User=vllm WorkingDirectory=/opt/vllm EnvironmentFile=/opt/vllm/vllm.env ExecStart=/opt/vllm/.venv/bin/vllm serve Qwen/Qwen3-8B --host 127.0.0.1 --port 8000 --max-model-len 16384 Restart=always [Install] WantedBy=multi-user.target -
Start it and enable it at boot:
sudo systemctl daemon-reload sudo systemctl enable --now vllm
Access from applications #
vLLM listens only on 127.0.0.1:8000. The API key protects only the paths starting with /v1; others such as /metrics or /pause are unprotected. So expose only /v1 to the internet, through Nginx with HTTPS.
-
Install Nginx and Certbot:
sudo apt install -y nginx certbot python3-certbot-nginx -
Create the file
/etc/nginx/sites-available/vllm:server { listen 80; server_name <domain>; location /v1/ { proxy_pass http://127.0.0.1:8000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_buffering off; proxy_read_timeout 300s; } location / { return 404; } }Replace
<domain>with the domain pointing to the server, for exampleapi.example.com. -
Enable the site and issue the certificate:
sudo ln -s /etc/nginx/sites-available/vllm /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx sudo certbot --nginx -d <domain>
More on certificates in Setting Up Let's Encrypt with Nginx Server, on the firewall in Setting up firewall with UFW on linux.
Applications then use the address https://<domain>/v1 and the API key, for example in Python with the openai library:
from openai import OpenAI
client = OpenAI(base_url="https://<domain>/v1", api_key="<api-key>")
response = client.chat.completions.create(
model="Qwen/Qwen3-8B",
messages=[{"role": "user", "content": "Summarise this text for me."}],
)
print(response.choices[0].message.content)
Verification #
Show the state of the service and its log with:
sudo systemctl status vllm
sudo journalctl -u vllm -f
Updates #
sudo -iu vllm
source .venv/bin/activate
uv pip install -U vllm --torch-backend=auto
vllm download-kernels
exit
sudo systemctl restart vllm
Before a bigger update, create a snapshot in your Hukot.net VPS administration. If a new vLLM version doesn't work with your model, you can restore the server to its previous state.
Why choose our GPU-VPS? #
Your own API means a fixed monthly price regardless of the number of tokens, and data that never leaves the Czech Republic. A Hukot.net GPU-VPS gives you the power of graphics cards without buying your own hardware.
Want your own AI API without paying per token? #
Order a Hukot.net GPU-VPS and have your first model running today.