Quick answer: VPS specs for Ollama depend on model size, quantization, context length, concurrency, and whether the workload is CPU-only or GPU-backed. For small local LLM testing, 4 vCPU, 8 GB RAM, and NVMe storage can be enough. For practical 7B to 8B use, 8 vCPU and 16 GB RAM is a safer starting point. Larger models, RAG workflows, and multiple users need more RAM, more storage, and stricter access controls.
Ollama makes local model deployment easier, but it does not remove hardware limits. A VPS still needs enough memory to load the model, enough CPU or GPU capacity to generate tokens, enough storage for model files and logs, and a secure way to expose any API or web interface.
| Spec | Why it matters | What to watch |
|---|---|---|
| RAM | The model and context need memory before useful inference can happen. | Model size, context length, concurrent requests, swap usage. |
| CPU | CPU-based inference depends on available threads and sustained compute. | Token speed, worker load, other services on the same VPS. |
| Storage | Models, containers, indexes, logs, and documents can grow quickly. | NVMe space, cleanup policy, backup coverage. |
| Network | Needed for model downloads, APIs, web UIs, and RAG document flows. | Upload/download size, remote users, firewall exposure. |
| Security | An exposed model API can leak data or be abused. | Authentication, reverse proxy, private network, logs. |
RAM is usually the first limit on a CPU VPS. The model file size is only part of the picture; the runtime, context window, operating system, API layer, web UI, vector database, and logs also need memory. Leave headroom instead of sizing the VPS exactly to the model file.
| Model class | Practical VPS direction | Use case |
|---|---|---|
| 1B to 3B | 4 vCPU and 8 GB RAM can support learning and light testing. | CLI testing, small chat, automation experiments. |
| 7B to 8B | 8 vCPU and 16 GB RAM is a more comfortable baseline. | Private assistants, small APIs, developer tests. |
| 12B to 14B | Plan for 24 GB to 32 GB RAM or more. | Longer prompts, stronger reasoning, internal workflows. |
| 27B to 32B | High-memory VPS or dedicated AI infrastructure. | Advanced testing and heavier RAG workflows. |
| 70B class | Specialized high-memory or GPU-backed infrastructure. | Research and heavy model evaluation. |
A CPU VPS can be useful for private tools, small models, prototypes, RAG orchestration, and internal automation. It is not the right expectation for fast public inference at scale. GPU infrastructure is better when response speed, concurrency, or larger models are central to the product.
A practical architecture often separates responsibilities: the VPS hosts the web app, queue, logs, authentication, vector database, or agent control plane, while heavy model inference runs on dedicated GPU or temporary cloud GPU capacity when needed.
Ollama model files can consume several gigabytes each, and larger workflows add embeddings, document chunks, logs, Docker layers, backups, and temporary files. NVMe storage helps with model loading and indexing, but it does not replace RAM. For RAG, plan storage for original documents, parsed text, vector indexes, backups, and rebuild space.
| Use case | Practical direction | Notes |
|---|---|---|
| Learning Ollama | Small model, modest VPS, local-only API. | Focus on installation, commands, and resource observation. |
| Private assistant | 7B to 8B class model with enough RAM headroom. | Keep context moderate and log failed requests. |
| RAG prototype | More storage, vector database, document processing room. | Plan rebuild space and backups for indexes. |
| Internal team tool | Authentication, queueing, monitoring, and rate limits. | Concurrency matters more than a single prompt test. |
| Public AI app | Consider GPU-backed inference or a dedicated model service. | Protect the VPS as the app/control plane if GPU runs elsewhere. |
After the first model runs, watch the server under real prompts. Check memory during model load, CPU during generation, disk after pulling models, and log growth after API usage. A short test prompt is not enough to validate a workload that will later process long documents or multiple users.
free -h
df -h
ollama ps
journalctl -u ollama --no-pager -n 100
If memory pressure appears, reduce model size, reduce context length, stop unused models, or move to a larger plan. If disk pressure appears, remove unused models and check whether vector indexes or logs are growing faster than expected.
Treat Ollama like a backend API, not a public webpage. Keep the service bound to localhost unless remote access is required. If another app needs access, put a small authenticated backend, VPN, private network, or reverse proxy in front of it. Log usage and apply rate limits where multiple users or external apps send prompts.
Hassan Tahir wrote the original article. This version was manually reviewed and rebuilt by the Voxfor editorial team for practical Ollama VPS sizing, CPU/GPU expectations, storage planning, RAG workflows, and API security.
Yes. Small and medium open models can run on a CPU VPS for private use, testing, and internal tools. Performance depends on RAM, CPU, model size, context length, and concurrent users.
For small 3B to 7B models, 8 GB RAM can support testing. For practical 7B to 8B use, 16 GB RAM is a safer baseline. Larger models and long context need more.
Yes. Fast storage helps with model loading, Docker layers, updates, logs, and vector indexes. It improves the system experience but does not replace RAM.
No. Put it behind authentication, a reverse proxy, VPN, private network, or application backend. Avoid exposing an unauthenticated model API publicly.
Often yes. RAG workflows may need storage for documents, vector indexes, parsed text, logs, and rebuild space, plus memory for the model and retrieval layer.
Consider GPU infrastructure when response speed, concurrency, larger models, or public inference quality matter more than simple private testing.