Self-Hosted AI: What You Need and Where to Run It
Run AI agents, models, and automation on your own VPS instead of paying for a hosted API. Here's what each layer needs.
Self-hosted AI in five points
- There are four layers, not one: agent frameworks, model runtimes, automation platforms, and chat interfaces. Most real setups combine two of them.
- The model decides your specs. If you call a hosted API, almost any VPS works. If you run the model locally, RAM or GPU becomes the entire cost.
- Cheap tier (2 vCPU / 4 GB): agents, chat interfaces, and automation platforms that call an external API.
- Serious tier (4 vCPU / 16 GB+): running a 7B–13B model yourself, fully private, no external API calls.
- GPU tier: only genuinely required for image generation, high-throughput serving, or large models at speed.

The three layers of self-hosted AI
Almost every confusion about self-hosted AI comes from treating these as one category.
They solve different problems, and they have very different hardware requirements.
software that thinks
software that talks
What actually determines your VPS specs
One question decides your bill: are you hosting the model, or calling someone else’s?
- If you call a hosted API (OpenAI, Anthropic, Gemini, OpenRouter), your server only runs the interface or agent. That is a small, cheap workload — 2 vCPU and 4 GB of RAM is comfortable for most setups, and the AI cost shows up as API usage instead of hardware.
- If you host the model too, the model's size becomes your spec sheet. As a working rule, a quantised 7B model needs roughly 5 GB of RAM, so 8 GB is a realistic floor and 16 GB gives you room for the model plus everything around it. Larger models scale from there. CPU-only inference works and is genuinely usable for personal workloads, but it is slower than GPU inference — that trade is the real decision, not whether it runs at all.
- You need a GPU when you are generating images, serving many concurrent users, or running larger models at conversational speed. For a single user chatting with a 7B model, a CPU VPS with enough RAM is usually sufficient.
Four self-hosted AI stacks that actually get used
STACK 1
Agent + hosted API
STACK 2
Automation + hosted API
STACK 3
Agent + local model
offline AI
STACK 4
Full local stack
Running AI in the EU?
See automation comparisons
Frequently asked questions
Can you run self-hosted AI on a VPS?
Yes. Self-hosted AI runs well on a standard VPS. Agent frameworks, chat interfaces, and automation platforms run comfortably on 2 vCPU and 4 GB of RAM. Hosting the language model yourself requires more — typically 8 to 16 GB of RAM for a 7B model.
How much RAM do you need for self-hosted AI?
It depends on the layer. Self-hosted AI tools that call an external API need 2 to 4 GB. Running a quantised 7B model locally needs roughly 8 GB minimum, with 16 GB recommended. Larger models and image generation require substantially more, usually with a GPU.
Do you need a GPU for self-hosted AI?
Not always. Self-hosted AI on CPU works for single-user chat with small and mid-size models, using tools like Ollama or llama.cpp. A GPU becomes necessary for image generation, serving multiple concurrent users, or running larger models at conversational speed.
What is the difference between an AI agent framework and a model runtime?
In self-hosted AI, an agent framework such as OpenClaw or CrewAI orchestrates actions — calling tools, reading files, running tasks. A model runtime such as Ollama or LocalAI serves the language model itself. The framework needs a model, so the two are commonly run together.
Is self-hosted AI free?
The software usually is. Most self-hosted AI tools are open source, though some use source-available licences with conditions on commercial or embedded use — worth checking each project’s current terms. You still pay for the server, and for API usage if you call an external model.
What is the cheapest way to self-host AI?
The cheapest self-hosted AI setup is a lightweight agent or automation platform on a small VPS, calling a hosted model API. That runs on 2 vCPU and 4 GB of RAM. Hosting the model yourself removes API costs but requires a considerably larger server.