Self-hosting · Guide
Sizing a VPS for an AI agent stack
A practical RAM budget for a gateway, a small local model, a vector store, and n8n on one VPS.
Verdict
Put the model API off-box unless you enjoy slow tokens. Size the VPS for the gateway and the agent runner.
An agent stack is a handful of processes that do not add linearly until you co-locate the model. A gateway plus n8n plus a small vector store is an 8 GB plan. A local 7B-class model pushes the same stack to 16 GB and still is not a GPU. Concurrency and context length, not the marketing request count, are what blow the budget.
-
Gateway stack
8 GB, destroyable, while you are still changing which agent framework stays.
-
Stack you will keep, model stays remote
KVM 2 on a term, once the processes are boring and the API bill is a known monthly number.
Intro price and the price after it
As of 2026-11-30 · USD · tax excluded
Pulled from src/data/pricing.ts, the same file the calculator uses. A dash means that column does not apply.
| Plan | Spec | Intro / mo | Then / mo | Checkout |
|---|---|---|---|---|
| KVM 1 | 1 vCPU · 4 GB · 50 GB NVMe 4 TB | $6.49 | $11.99 | $155.76 |
| KVM 2 | 2 vCPU · 8 GB · 100 GB NVMe 8 TB | $8.79 | $14.99 | $210.96 |
| KVM 4 | 4 vCPU · 16 GB · 200 GB NVMe 16 TB | $12.99 | $28.99 | $311.76 |
| KVM 8 | 8 vCPU · 32 GB · 400 GB NVMe 32 TB | $25.99 | $49.99 | $623.76 |
| Plan | Spec | Intro / mo | Then / mo | Checkout |
|---|---|---|---|---|
| CX23 | 2 vCPU · 4 GB · 40 GB NVMe 20 TB | — | $6.49 | Monthly cap |
| CX33 | 4 vCPU · 8 GB · 80 GB NVMe 20 TB | — | $9.99 | Monthly cap |
| Plan | Spec | Intro / mo | Then / mo | Checkout |
|---|---|---|---|---|
| Basic 1 GiB | 1 vCPU · 1 GB · 25 GB SSD 1,000 GiB | — | $6.00 | Monthly cap |
| Basic 2 GiB | 1 vCPU · 2 GB · 50 GB SSD 2,000 GiB | — | $12.00 | Monthly cap |
| Basic 2 GiB / 2 vCPU | 2 vCPU · 2 GB · 60 GB SSD 3,000 GiB | — | $18.00 | Monthly cap |
| Basic 4 GiB | 2 vCPU · 4 GB · 80 GB SSD 4,000 GiB | — | $24.00 | Monthly cap |
| Basic 8 GiB | 4 vCPU · 8 GB · 160 GB SSD 5,000 GiB | — | $48.00 | Monthly cap |
| Basic 16 GiB | 8 vCPU · 16 GB · 320 GB SSD 6,000 GiB | — | $96.00 | Monthly cap |
Self-hosted software on this page has no license fee in the model. The bill is the VPS plus your time.
An “AI agent stack” on a VPS is usually four things pretending to be one product: a chat UI, an agent runner, a place to remember documents, and a workflow tool that calls them. Write the RAM down as a sum. Then decide which of those four is allowed to be large.
A worksheet, not a benchmark
Start with the operating system and a reverse proxy. Call that 0.5 to 1 GB you do not get back.
Open WebUI or another gateway. A few hundred megabytes when it is only a UI. It becomes a disk problem, not a RAM problem, when you point it at local weights. See best VPS for Open WebUI.
Agent runner. A Python or Node process plus its dependencies. One concurrent run is cheap. Ten concurrent tool-calls are how a 2 GB estimate becomes 6 GB of RSS. Size for the overlap you will actually allow, and put a limit in the process supervisor so a loop cannot take the whole box.
Vector store. SQLite or Postgres with embeddings is fine on the same VPS for a personal corpus. A separate vector database plus an embedding model loaded in memory is a second product. If the embedding model is local, add its weight size to RAM the same way you would add a chat model. If embeddings are an API, the store is mostly disk and a modest cache.
n8n. Use the n8n size cuts if workflows are part of the agent rather than a side automation. Do not also assume the 4 GB n8n floor is free when the UI is already on the machine. The floors do not stack by magic. They overlap. If both are busy, start at 8 GB even when each guide alone would allow 4.
The model. This is the line that dominates. A hosted model API adds dollars and almost no RAM. A local 7B-class GGUF adds gigabytes of RAM and a latency you should try before you promise it to anyone. Context length multiplies the pain. A short prompt and a 32k context are not the same machine.
Three stacks we would actually buy
Personal gateway. Open WebUI, one agent process, hosted models, no local weights. 8 GB. KVM 2, CX33 if you can order it, VPS-2, or the $48 Droplet. Disk at 80 GB or better so logs and chat exports are boring.
Gateway plus n8n. Same 8 GB if workflows are light. Move to 16 GB when n8n is over 25,000 executions or the agent runner keeps a browser or a headless tool in memory. KVM 4 or OVHcloud VPS-4. The Droplet at 16 GiB is $96, which is the price of refusing a commit.
Local model in the loop. 16 GB minimum for a small quantized model and a single user, and a written note to yourself that tokens will be slow. Do not put this on a 4 GB promo because the promo was cheap. If the demo needs to feel like an API, stop and buy API tokens. The GPU checkbox in the calculator exists to make that stop visible.
Failure modes that are not RAM
Disk fills with weights, container images, and n8n execution data. A 40 GB volume is a demo disk.
The CPU credit or the shared core saturates during a long tool loop and the UI times out. That is not fixed by a benchmark screenshot from another host. It is fixed by a concurrency limit or by moving the model.
Backups of a vector index you cannot rebuild are different from backups of a cache you can. Decide which one you have before you rely on a weekly snapshot.
Secrets in a .env on the same box as a public UI need a firewall and an update habit. That habit is the hours field in the calculator. An agent stack is a worse “set and forget” than a static site, because the frameworks move. Two to four hours a month is a sane opening bid if you are the only operator. It is low if several people can break a workflow.
Price the gateway version, with the GPU off, and read the ops share of the total before you pick a logo. The logos are in Hostinger versus Hetzner and Hostinger versus DigitalOcean. The method is on the methodology page, including the list of costs this worksheet leaves out.
- Open WebUI documentation — project site, not an affiliate link.
- n8n self-hosted documentation — project site, not an affiliate link.
Questions worth answering
+Can one 4 GB VPS run Open WebUI, n8n, and a local model?
Open WebUI and a very quiet n8n can share 4 GB if the model is an API. Add a local model and the answer is no. Add a vector database with a real embedding model and 4 GB is over.
+Where does the GPU go?
Not on the KVM, CX, Basic Droplet, or OVHcloud VPS rows in this file. If the agent must run a local model at interactive speed, budget a GPU instance as its own quote. The calculator will not fabricate that quote.
+Do monthly request counts change the RAM tier?
Only past 100,000 requests in our rule, which moves the floor from 8 GB to 16 GB. Below that, request count is a latency and API-cost question. A single fat context can use more RAM than a day of short ones.