Ollama on a VPS: What It Costs Per Million Tokens
Every “cheap VPS for Ollama” guide quotes a monthly price. That’s the wrong unit, and it’s why so many people end up disappointed by a server that looked like a bargain.
The right unit is dollars per million tokens generated, because that’s what you’re actually buying. Convert all three options to it and the picture changes completely.
The three options in one column
| Option | Cost | $/1M tokens |
|---|---|---|
| Commercial API (Llama 3.1 8B) | per token | $0.02 – $0.18 |
| CPU-only VPS, 8GB, saturated | $14.99/mo | $1.14 – $1.90 |
| Rented GPU (RTX 4090, community) | $0.34/hr | $1.89 – $3.15 |
| CPU-only VPS, 8GB, 10% duty cycle | $14.99/mo | $11 – $57 |
A commercial API is 20 to 200 times cheaper per token than anything you can self-host. That is the single most important fact in this article, and almost no guide on this keyword says it.
Groq lists Llama 3.1 8B at $0.05 per million input tokens and $0.08 output. DeepInfra goes to $0.02 on input. You cannot approach that by renting hardware, because those providers are running batched inference on datacentre GPUs at utilisation you will never achieve with one model serving one user.
So if your reason for self-hosting is cost, stop here — the arithmetic doesn’t support it. (The break-even, calculated shows why: at 70B scale it isn’t a high threshold, it’s one the hardware physically cannot reach.) If your reason is privacy, control, offline operation or a hard requirement that data never leaves your infrastructure, read on, because the rest of this article is about doing that as cheaply as possible.
Why the CPU-only number swings so wildly
The CPU VPS is a flat $14.99/month whether you use it or not. Its cost per token is therefore entirely a function of how busy you keep it.
An 8GB VPS running a quantised 7–8B model produces a few tokens per second — call it 1 to 5 depending on the model, the quantisation and the host’s CPU. At that rate:
| Throughput | 100% duty | 25% duty | 10% duty |
|---|---|---|---|
| 1 tok/s | $5.70 | $22.82 | $57.04 |
| 3 tok/s | $1.90 | $7.61 | $19.01 |
| 5 tok/s | $1.14 | $4.56 | $11.41 |
Saturated, a CPU VPS is competitive with a rented GPU per token. At 3 tokens a second running continuously, it produces about 7.9 million tokens a month for $14.99 — $1.90 per million, which beats a community-cloud 4090 at 30 tokens per second.
Idle, it’s the worst option on the page. At 10% duty — which is what “I ask it things occasionally” looks like — you’re paying $19 per million tokens, more than 200 times the API rate.
This is the whole argument, and it explains the disappointment: the cheap monthly price is only cheap if you never stop feeding it.
The GPU path, and its hidden line item
Renting a GPU flips the economics: you pay by the hour, so idle time costs nothing, and throughput is roughly ten times higher.
RunPod’s published rates put an RTX 4090 at $0.34/hour on Community Cloud and $0.74/hour on Secure Cloud. An A5000 is $0.16 and $0.27; an A100 PCIe is $1.19 and $1.39; an H100 PCIe is $1.99 and $2.89.
At 30–50 tokens per second, a community 4090 works out at $1.89–3.15 per million tokens — and critically, only while it’s running. For bursty work that’s far better than a permanently-on VPS.
Left running 24/7, a $0.34/hour GPU is $248 a month. The hourly rate is the appeal and also the trap: it’s cheap because you turn it off.
There’s one cost that isn’t in the hourly rate, and it caught my attention because nobody mentions it:

Volume storage costs more when the pod is idle than when it’s running — $0.20/GB/month against $0.10. That’s the price of parking your model weights between sessions, and it’s charged whether you use the GPU or not:
| Model | Approx. size | Idle storage/month |
|---|---|---|
| 8B quantised | ~5GB | $1.00 |
| 13B quantised | ~9GB | $1.80 |
| 70B quantised | ~40GB | $8.00 |
Eight dollars a month to keep a 70B model on disk you’re not using isn’t ruinous, but it turns “I only pay when it runs” into something less absolute. Either budget it, or re-download the weights each session and pay in time instead.
The three cases where CPU-only is right
Given all of the above, CPU-only Ollama on a cheap VPS is rational in exactly three situations. Each is a case where the per-token cost stops mattering.
1. Overnight batch work. Summarising a day’s documents, tagging a backlog, generating embeddings. Latency is irrelevant, so you can run the box at high duty overnight — which is precisely the condition that makes the per-token cost good. 4GB works for a small model; 8GB is the comfortable floor for a quantised 7–8B.
2. Low-volume classification. Routing tickets, labelling records, yes/no decisions on a few thousand items a month. The volumes are so small that the per-token rate is irrelevant and the flat $14.99 is simply the cost of the capability. 4GB is usually enough.
3. Privacy or offline requirements. If data cannot leave your infrastructure, cost per token was never the criterion. You’re buying a property the API cannot sell you. Size to the model you’re required to run, which usually means 8GB or more.
Outside those three, use an API. And if you need interactive speed at any volume, rent a GPU by the hour rather than buying a permanent CPU box that will frustrate you at three tokens a second.
What to buy
For the CPU-only path, Hostinger is the value pick — its 8GB KVM 2 is $8.79 promotional and $14.99 at renewal, which is the figure used throughout this article, and its 16GB tier at $28.99 covers larger quantised models. Hetzner has excellent hardware and would normally lead on price, but check stock: its cheap CX tier has been showing as unavailable, and the CPX line you’d fall back to is €35.99 for 8GB, well above Hostinger.
Contabo dominates the search results for this topic and is worth knowing about factually — it sells unusually large amounts of RAM per euro, which suits CPU inference, with the widely-noted trade-off of variable performance and slower support. We have no affiliate relationship with Contabo and no tracked link for it, so we’ve named it without one and haven’t priced it here, as its site blocked our requests.
For the GPU path, RunPod is the one we’d point you at — hourly billing, community and secure tiers, and published rates rather than a sales call. We compared it head-to-head with Hetzner’s GPU offering in RunPod vs Hetzner for Ollama, where the answer depends on duty cycle rather than hourly rate.
DigitalOcean is a reasonable CPU host for this at $48/month for 8GB — over three times Hostinger’s rate for the same memory. Its tracked link isn’t working on our end, so we’ve named it without linking.
For the practical side, installing Ollama on a VPS covers the setup, and best VPS for Ollama ranks the hosts rather than the economics. If your instance is dying mid-generation rather than running slowly, that’s the out-of-memory killer, not a performance problem.
How we checked this
RunPod’s GPU rates — RTX 4090 at $0.34/hour community and $0.74 secure, A5000 at $0.16 and $0.27, A100 PCIe at $1.19 and $1.39, H100 PCIe at $1.99 and $2.89 — are from its published pricing page in August 2026, as is the storage pricing of $0.10/GB/month for container disk and $0.10 running versus $0.20 idle for volume disk. The storage screenshot is that page.
VPS pricing is Hostinger’s KVM 2 renewal rate of $14.99 and DigitalOcean’s published $48 for 8GB. API rates for Llama 3.1 8B — roughly $0.02 per million input tokens at DeepInfra, $0.05 input and $0.08 output at Groq, $0.18 at Together — are from published provider comparisons rather than from each vendor’s own page.
The throughput figures are brackets, not measurements, and they carry the whole calculation. We have not benchmarked Ollama on any of these machines. “A few tokens per second” for a quantised 7–8B model on CPU is the range our hosting coverage has used consistently and matches widely reported experience, and 30–50 tokens per second on a 4090 is a conventional figure for the same model class. Your actual throughput depends on the model, the quantisation, the CPU generation and how much of a shared vCPU you really get — and every per-token number in this article moves proportionally with it. Treat the tables as showing the shape of the comparison, which is robust, rather than precise costs, which are not.
The 20-to-200× gap between API and self-hosted is large enough to survive any plausible error in those brackets. The narrower comparison between a saturated CPU VPS and a rented GPU is not, so don’t make a decision on the strength of that one without measuring your own workload.
Model sizes for the storage table are approximate for common quantisations and vary by quantisation level.
What we did not do: no benchmarks, no measured tokens per second, no test of any provider’s actual delivered performance. This is a cost model built on published prices and conventional throughput ranges.
The hosting links above are affiliate links. The cheapest option in this article — a commercial API — earns us nothing.
FAQ
How much does it cost to run Ollama on a VPS?
About $8.79–14.99 a month for an 8GB CPU-only server that handles a quantised 7–8B model. Per token, that’s $1.14–1.90 per million if you keep it busy, and $11–57 per million if you use it occasionally.
Is it cheaper to self-host Ollama than use an API?
No. Commercial APIs run Llama 3.1 8B at $0.02–0.18 per million tokens, which is 20 to 200 times cheaper than anything you can self-host. Self-hosting is about privacy, control and offline operation, not cost.
Can Ollama run without a GPU?
Yes, for quantised models up to about 7–8B, at a few tokens per second. That’s fine for batch and background work and frustrating for anything interactive.
How much RAM do I need for Ollama on a VPS?
4GB for a small model and low-volume classification, 8GB as the comfortable floor for a quantised 7–8B, and 16GB or more for larger models. Running out of memory kills the process rather than slowing it.
Is renting a GPU by the hour cheaper than a VPS?
For bursty work, yes — you pay only while it runs, and an RTX 4090 at $0.34/hour delivers roughly ten times the throughput. Left running continuously it’s about $248/month, so the saving depends entirely on turning it off.
What’s the hidden cost of a rented GPU?
Volume storage for your model weights, billed whether or not the pod is running — and at a higher rate when idle. A 70B quantised model at around 40GB costs roughly $8/month just to keep on disk.
When does a CPU-only Ollama server actually make sense?
Three cases: overnight batch jobs where latency doesn’t matter, low-volume classification where the flat fee is the whole cost, and situations where data isn’t permitted to leave your infrastructure.