Ollama lets you run language models on your own computer or server with just a few commands. It downloads a model, loads it into memory and exposes a simple HTTP API for your applications. Many people try it on a laptop first and then want to move it to an always-on VPS, which raises one question: how much memory, CPU and disk does the server need?
Model size drives the resource needs
Ollama itself is lightweight; the model creates the load. While running, the model weights are loaded fully into RAM or GPU memory, so memory directly limits which model you can use. As a rough guide, the Ollama documentation recommended at least 8 GB of RAM for 7B models, 16 GB for 13B models and 32 GB for 33B models. These figures apply to quantized models, and the exact size is shown on each model page. Remember that the operating system, context and other programs need memory too.
| Model size | Suggested RAM | Good for |
|---|---|---|
| 1B-3B | 4-8 GB | Short answers, classification, simple summaries |
| 7B-8B | at least 8 GB | General assistant, text work |
| 13B | 16 GB | Harder analysis, longer texts |
| 33B and up | 32 GB and more | Usually needs a GPU server |
CPU only, or is a GPU required?
Ollama runs on CPU without a GPU, but responses are noticeably slower. Small 1B-3B models answer short prompts at an acceptable speed on a regular multi-core VPS, which is often fine for internal tools and background jobs. Models of 7B and above will run on CPU, but live chat feels slow. With many concurrent users or a large model, a GPU server is the better choice. Plan disk space as well: each model takes several gigabytes.
Example: an internal document assistant for a school
Suppose a private school in Samarkand wants an assistant that summarizes orders and meeting minutes and drafts messages to parents. The documents contain students' personal data, so it is better not to send them to an external service. A 3B model on a VPS with 8 GB of RAM is a good starting point, and you can order such a server from the sayt.uz cabinet.
Installing Ollama and pulling a first model
The official Linux script sets Ollama up as a systemd service, so it starts automatically after a reboot.
curl -fsSL https://ollama.com/install.sh | sh
systemctl status ollama
ollama --version
Pull a model and try it. ollama ps shows loaded models and whether they run on CPU or GPU, and free -h shows remaining memory.
ollama pull llama3.2:3b
ollama run llama3.2:3b "Qisqa salom yoz"
ollama ps
free -h
By default Ollama serves its API on 127.0.0.1:11434, and the school app sends a plain HTTP request and gets JSON back.
curl http://127.0.0.1:11434/api/generate -d '{
"model": "llama3.2:3b",
"prompt": "Ushbu matnni uch gapda xulosa qil: ...",
"stream": false
}'
Saving memory and handling parallel requests
Ollama keeps a model in memory for a few minutes after the last request by default. Raising this avoids reloading the model when requests are frequent, while lowering it frees memory when usage is rare. OLLAMA_NUM_PARALLEL sets how many requests one model handles at once, but each parallel slot needs extra memory.
sudo systemctl edit ollama
[Service]
Environment="OLLAMA_KEEP_ALIVE=30m"
Environment="OLLAMA_NUM_PARALLEL=2"
sudo systemctl restart ollama
Exposing the API safely
The Ollama API has no built-in authentication, so an open port lets anyone use your server for free. Instead of setting OLLAMA_HOST=0.0.0.0, keep Ollama on the local address and put Nginx with a password in front. The example below sets up basic auth for ai.example.uz; get the SSL certificate with Certbot.
sudo apt install apache2-utils
sudo htpasswd -c /etc/nginx/.ollama_htpasswd maktab
server {
listen 443 ssl;
server_name ai.example.uz;
# Certbot adds the ssl_certificate lines
location / {
auth_basic "Ollama";
auth_basic_user_file /etc/nginx/.ollama_htpasswd;
proxy_pass http://127.0.0.1:11434;
proxy_set_header Host localhost:11434;
proxy_buffering off;
proxy_read_timeout 600s;
}
}
The proxy_set_header Host line matters because Ollama checks the host a request comes from and may reject unknown names. A longer proxy_read_timeout and disabled buffering let long answers stream in real time. Keep port 11434 closed to the outside in your firewall.
When the VPS is no longer enough
If ollama ps shows that part of the model does not fit in memory, the server starts swapping or users wait too long, you are out of resources. Switch to a smaller or more heavily quantized model, upgrade the VPS plan or move to a GPU setup. A well-chosen small model often beats a large one that crawls.