Self-Hosted AI Agents: What to Run and Where (2026)
The open-source AI agents worth self-hosting in 2026, what each needs, where to host one from $6.49 a month, 3-year costs and safe defaults. Nov 27, 2026.
Quick comparison
| Provider | From | Starting plan | Free tier | Our rating | Link |
|---|---|---|---|---|---|
Hetzner CloudChecked | $6.49/mo | CX23 (Cost-Optimized, Intel/AMD)2 vCPU · 4 GB RAM · 40 GB NVMe | No | Not rated | Visit |
HostingerChecked | $2.49/mo | Premium (web hosting)20 GB SSD | No (30-day money-back guarantee) | Not rated | Visit |
VultrChecked | $2.50/mo | Cloud Compute Regular Performance, IPv6-only 0.5 GB1 vCPU · 0.5 GB RAM · 10 GB SSD | No free tier | Not rated | Visit |
DigitalOceanChecked | $4/mo | Basic Droplet 512 MiB1 vCPU · 0.5 GB RAM · 10 GiB SSD | Occasional promo credit for new users | Not rated | Visit |
ElestioChecked | $11/mo | Linode 'Micro' (cheapest shown)1 vCPU · 1 GB RAM · 25 GB SSD | 3-day trial with $20 credit | Not rated | Visit |
RunPodChecked | $0.34/hr | RTX 4090 24GB (Community Cloud) | No free credits; small referral bonus after a $10 top-up | Not rated | Visit |
Vast.aiChecked | $0.47/hr | RTX 4090 24GB | No free credits | Not rated | Visit |
To self-host an AI agent, run the agent on a small always-on server, and get the model from an API or from a GPU you rent only when needed. As of November 27, 2026, an API-backed agent such as Hermes Agent, OpenClaw or n8n runs on a 2 vCPU / 4-8 GB VPS from $6.49 to $24 a month, plus token costs that can be under $1 a month on a small model. A local model adds a GPU from about $0.34 an hour.
At a glance
| Question | Answer (checked November 27, 2026) |
|---|---|
| Best agent for a personal assistant you text | Hermes Agent (MIT); OpenClaw if you need one of its skills |
| Best for automations with AI steps | n8n (fair-code), 320 MB-2 GB RAM per n8n’s sizing |
| Server an API-backed agent needs | 2 vCPU and 4 GB RAM covers every agent below; 8 GB if it sandboxes tools in Docker |
| Cheapest 2 vCPU server you can order today | Hostinger KVM 2, 2 vCPU / 8 GB, $8.79/mo intro, renews at $14.99 (Hetzner’s $6.49 CX23 shows “Currently not available”) |
| Token cost, 300 tasks a month | $0.75 on Claude Haiku 5.5, $15 on Claude Sonnet 5.5 (prices as of November 2, 2026) |
| GPU for a local model | RTX 4090 24 GB from $0.34/hr (RunPod Community Cloud, October 2026) |
Prices are in US dollars from the site’s price data, which records each provider’s own pricing page and the date it was read. AskGPU hasn’t run these agents or servers itself; the picks rest on each project’s documented requirements and on published prices (see how we work).
What a self-hosted AI agent is
An AI agent takes a goal (“summarize my inbox every morning”, “fix this failing test”), plans the steps and carries them out with tools: a browser, a shell, your calendar, other apps’ APIs. A chatbot answers; an agent acts.
Self-hosted means the agent runs on a machine you control, so its memory, settings and the logins you give it stay there, and it can run jobs around the clock. It still needs a language model:
- An API model (Claude, Gemini, OpenAI’s models, DeepSeek and others). You pay per token, and the server can be small because the heavy work happens elsewhere. Your prompts do go to that provider.
- A model you host with a runner such as Ollama or vLLM. Nothing leaves your servers, but you need a GPU.
For open models, runners and chat front-ends, see the complete guide to self-hosted AI.
Which agents to run
These are the open-source agents and agent builders people most often self-host. The last column is what each project documents for the agent itself, with an API model; where a project publishes no figure, we say so. Read on November 27, 2026.
| Agent | What it does | License | Install | Documented minimum |
|---|---|---|---|---|
| Hermes Agent | Personal assistant on Telegram, Discord, Slack, WhatsApp, Signal or email; long-term memory, writes its own skills | MIT | Installer script (Linux, macOS, WSL2, Windows), Docker files in the repo | No RAM figure; the project says it runs “on a $5 VPS” |
| OpenClaw | Personal assistant across messaging apps, with a large community skill library | MIT | Installer script, npm (Node 24.16+ or 26.1+), Docker | 1 vCPU / 1 GB plus 2 GB swap in its DigitalOcean guide; 6 GB RAM to build its Docker image from source (Hetzner guide) |
| n8n | Workflow automation with an AI Agent node and hundreds of app integrations | Sustainable Use License (fair-code) | Docker | 320 MB-2 GB RAM; “n8n isn’t CPU intensive” (sizing) |
| Dify | Visual builder for chatbots, document Q&A (RAG), agents and workflows | Dify Open Source License (Apache 2.0 with extra conditions) | Docker Compose v2.35+ | 2 CPU cores, 4 GiB RAM |
| Agent Zero | General-purpose agent with its own Linux workspace, browser, desktop and terminal | MIT | Installer script, one Docker command, or desktop launcher | No figure; runs wherever Docker runs |
| AnythingLLM | Chat with your documents, plus a no-code agent builder | MIT | Desktop app or Docker | 2 GB RAM, 2-core CPU with AVX2, 5 GB disk (docs) |
| OpenHands | Coding agent that writes, runs and fixes code in a sandbox | MIT | uv/pip or Docker; the docs now point new users to Agent Canvas | 4 GB RAM |
| Langflow | Visual, Python-based builder for agents and multi-step flows | MIT | uv, Docker or desktop app | No figure; needs Python 3.10-3.14 |
All of these run on a CPU-only server when they use an API model.
Avoid for new projects: Flowise. Its team froze the code on July 29, 2026, archived the GitHub repository on August 10 and ended support on August 31 (Flowise sunset notice). The code stays on GitHub, but its npm packages and Docker images are marked deprecated and no official fixes are planned.
On OpenClaw: it is still the most-starred project here (about 395,000 GitHub stars on November 27, 2026, against about 266,000 for Hermes Agent), and it had security problems early on. Read its server security guidance before you install it. The OpenClaw, analyzed series covers its costs, security and alternatives in depth; for where to run it, see OpenClaw hosting compared.
Pick the agent by job
- A personal assistant you text from your phone: Hermes Agent, or OpenClaw if you need a skill only its larger library has. Hermes denies every user until you allowlist them or approve an 8-character pairing code, and its default “smart” approval mode refuses dangerous commands, sends unclear ones to you, and denies them if you don’t answer within 300 seconds (Hermes security docs).
- Automations with AI steps (sort email, update a CRM, post summaries to Slack): n8n, the lightest to run. See how to self-host n8n.
- A chatbot or internal AI app for a team: Dify, or Langflow if you’d rather have an MIT license and Python.
- Questions over your own documents: AnythingLLM.
- A coding agent: OpenHands.
- An agent with its own sandboxed computer for browsing and running code: Agent Zero.
Self-host, managed, or your own computer?
The three ways to run an agent differ in who patches the server and what it costs:
| Option | Monthly cost (site data) | You maintain | Best for |
|---|---|---|---|
| Your own PC, Mac or home server | $0 beyond power | Everything; it’s only up while the machine is on | Trying agents out; local models on a GPU you own |
| A VPS with a one-click template (Hostinger) | From $6.49 intro (KVM 1) | OS and agent updates after setup | Most people: always on, cheap, quick start |
| A plain cloud VPS (Hetzner, Vultr, DigitalOcean) | $6.49-$24 | Everything | Developers who want hourly billing and no lock-in |
| Managed app hosting (Elestio) | OpenClaw from $16, n8n from $11 | Nothing at the OS level | People who don’t want to patch Linux |
Elestio says its price covers “installation, configuration, encryption, security, backups, live monitoring, software & OS updates” (Elestio OpenClaw), and that page says it is “Free to start”. You pay more per gigabyte of RAM for that.
A home machine works for testing, but an agent that answers messages or runs scheduled jobs needs to stay on and reachable. Keep it off the public internet: the safe defaults below apply at home too.
How to install Agent Zero
Agent Zero is the agent most people look up by name after searching for a self-hosted agent. Its GitHub page gives three routes (read November 27, 2026):
- Installer:
curl -fsSL https://bash.agent-zero.ai | bashon macOS or Linux, orirm https://ps.agent-zero.ai | iexin Windows PowerShell. Read any script before you pipe it to a shell. - Docker:
docker run -d -p 127.0.0.1:5080:80 -v a0_usr:/a0/usr agent0ai/agent-zero, then openhttp://localhost:5080. The command publishes the port on 127.0.0.1 only, which keeps the web UI off the internet; on a VPS, reach it through an SSH tunnel. - A0 Launcher, a desktop app for Windows, macOS and Linux.
Agent Zero works inside its own Linux workspace with a browser, terminal and desktop apps, keeps snapshots of the workspace under /a0/usr, and connects to external tools through MCP plugins and to Telegram. Its page states no hardware minimum. Add your model’s API key in its settings, or point it at an Ollama server for a local model. On Hostinger, Agent Zero is also a one-click VPS template.
Do you need a GPU?
Not if the agent uses an API model. The agent mostly waits on network calls, so 2 vCPUs and 4-8 GB of RAM cover any agent above, with room for a database and a reverse proxy.
You need a GPU when the model runs on your own server, and agents are harder on local models than chat is:
- They need long context. Every step re-sends the instructions, tool definitions and results so far. Ollama says agents and coding tools “should be set to at least 64000 tokens,” but it defaults to 4k tokens on GPUs with less than 24 GiB of VRAM, 32k on 24-48 GiB and 256k on 48 GiB or more (Ollama docs).
- They need capable models. OpenHands warns that “effective use of local models for agent tasks requires capable hardware” and models tuned for agent work.
Plan for a model that fits in GPU memory with room left for that context. Sizes below are the 4-bit (q4_K_M) downloads in Ollama’s library:
| Model (Ollama tag) | Download size | GPU memory to plan for | Rentable example (site data, October-November 2026) |
|---|---|---|---|
| qwen3.5:9b | 6.6 GB | 16 GB | RTX 4090 24 GB: $0.34/hr (RunPod Community Cloud) |
| gpt-oss:20b | 14 GB | 24 GB (Ollama says it runs with as little as 16 GB) | RTX 4090 24 GB: $0.34/hr (RunPod Community), $0.47/hr (Vast.ai median) |
| qwen3.5:27b, gemma4:31b | 17 GB, 20 GB | 32-48 GB | RTX 5090 32 GB: $0.69/hr; L40S 48 GB: $0.79/hr (RunPod Community) |
| gpt-oss:120b | 65 GB | 80 GB (fits a single 80 GB GPU) | A100 80 GB: $1.19/hr; H100 80 GB PCIe: $1.99/hr (RunPod Community) |
| qwen3.5:122b | 81 GB | More than 80 GB | H200 141 GB: $3.59/hr (RunPod Community) |
Sizes come from Ollama’s pages for gpt-oss, Qwen 3.5 and Gemma 4. The memory column is a rule of thumb, not a measurement. On a 24 GB card, raise Ollama’s context setting yourself, or an agent will run with 4k-32k tokens and lose track of long tasks.
Without a GPU, small models (4B to 9B parameters) run on a CPU with enough RAM, but slowly, and an agent makes many model calls per task. Treat that as an experiment.
Where to host it
Cheapest home for an API-backed agent
| Provider | Plan | vCPU / RAM / disk | Price (site data) | Watch out for |
|---|---|---|---|---|
| Hetzner Cloud | CX23 | 2 / 4 GB / 40 GB NVMe | $6.49/mo, billed hourly (Nov 2, 2026) | Excludes VAT and the IPv4 address; Germany and Finland only; Hetzner’s cloud page showed its Cost-Optimized plans as “Currently not available” on November 27, 2026 |
| Hostinger | KVM 1 | 1 / 4 GB / 50 GB NVMe | $6.49/mo intro (Nov 2, 2026) | Paid upfront; renews at $11.99/mo; one vCPU is below Dify’s 2-core minimum |
| Hostinger | KVM 2 | 2 / 8 GB / 100 GB NVMe | $8.79/mo intro (Nov 2, 2026) | Paid upfront ($210.96 for 24 months); renews at $14.99/mo |
| Vultr | Regular Performance 4 GB | 2 / 4 GB / 80 GB SSD | $20/mo, billed hourly (Oct 17, 2026) | Previous-generation Intel CPUs |
| DigitalOcean | Basic Droplet 4 GiB | 2 / 4 GiB / 80 GiB SSD | $24/mo, billed per second (Nov 2, 2026) | Highest price for the spec |
Hostinger’s VPS page (read November 27, 2026) lists one-click templates for Hermes Agent, OpenClaw, Agent Zero, Dify and n8n, and ten data centers “from Boston to Jakarta.” It also offers an Ollama template that comes “pre-installed with Ollama, the Llama3 model, and Open WebUI” (template guide). After setup, the server is yours to maintain.
If you let Hermes run tools in a Docker sandbox, note its defaults: 1 CPU, 5,120 MB of memory and 51,200 MB of disk per container. A 4 GB server is too small for that; choose 8 GB.
For a local model: an hourly GPU next to a small VPS
Keep the agent on a cheap, always-on VPS and rent a GPU only for the model. Connect the agent to the GPU’s model server (Ollama or vLLM) through a private tunnel, and stop the GPU when idle.
- RunPod is the simplest start: an RTX 4090 24 GB costs $0.34/hr in Community Cloud (vetted third-party data centers) or $0.89/hr in Secure Cloud, and an L40S 48 GB $0.79/hr or $1.09/hr (October 18, 2026).
- Vast.ai is a marketplace where hosts set the price. The median RTX 4090 offer was $0.47/hr on November 2, 2026, and the cheapest started at $0.14/hr. Reliability varies by host.
More options: how to rent a GPU, cheapest cloud GPUs, RunPod alternatives and the GPU cloud comparison.
What it costs per month and over 3 years
Assume 300 tasks a month at 20,000 input and 1,000 output tokens each: 6 million input and 0.3 million output tokens. The token counts are illustrative, not measured; try your own in the AI token cost calculator. Agents re-send their context at every step, so input tokens dominate; prompt caching, where offered, cuts that part sharply.
API prices from the site’s data, checked November 2, 2026:
- Claude Haiku 5.5 ($0.10 input / $0.50 output per million): 6 × $0.10 + 0.3 × $0.50 = $0.75 a month
- DeepSeek V4.1 Flash ($0.30 / $1.20, peak-hour price): 6 × $0.30 + 0.3 × $1.20 = $2.16 a month
- Claude Sonnet 5.5 ($2 / $10): 6 × $2 + 0.3 × $10 = $15 a month
| Setup | Per month | 3 years (36 months) |
|---|---|---|
| Hostinger KVM 2 + Haiku 5.5 | $8.79 + $0.75 = $9.54 intro | $210.96 (24 months upfront) + 12 × $14.99 + 36 × $0.75 = $417.84 |
| Hostinger KVM 2 + Sonnet 5.5 | $8.79 + $15 = $23.79 intro | $210.96 + $179.88 + 36 × $15 = $930.84 |
| Hetzner CX23 + Sonnet 5.5 (when in stock) | $6.49 + $15 = $21.49 | 36 × $21.49 = $773.64, plus VAT and IPv4 |
| Vultr 4 GB + Sonnet 5.5 | $20 + $15 = $35 | $1,260 |
| DigitalOcean 4 GiB + Sonnet 5.5 | $24 + $15 = $39 | $1,404 |
| Hostinger KVM 2 + RunPod RTX 4090 (Community), 4 hours a day | $8.79 + 120 h × $0.34 = $49.59 intro | $210.96 + $179.88 + 36 × $40.80 = $1,859.64 |
| RunPod RTX 4090 running 24/7 | 730 h × $0.34 = $248.20 (Community) or $649.70 (Secure) | $8,935.20 (Community) |
Hostinger’s renewal is shown for months 25-36 at the KVM 2 renewal price; the GPU rows exclude storage. The model choice moves the total more than the server does: over three years, Sonnet instead of Haiku adds $513 at this volume.
For one person or a small team, a small VPS plus an API model is the cheapest setup by a wide margin. A local model makes sense when data must not leave your servers, or when your volume is high enough that an hourly GPU beats per-token prices. For OpenClaw’s own running costs, including its scheduled check-ins, see how much OpenClaw costs to run.
Setup outline: safe defaults
Agents hold API keys and can run commands, so a sloppy setup costs more than a sloppy website. Use your agent’s official docs for the exact commands, in this order:
- Start clean. Use a current Ubuntu LTS release, log in with an SSH key, turn off password logins and run the agent as its own non-root user.
- Firewall first. Allow SSH only, with UFW (Ubuntu firewall guide) or your host’s cloud firewall. Ports published by Docker bypass UFW rules (Docker docs), so publish container ports on 127.0.0.1 only, as Agent Zero’s command does, and use the cloud firewall as well.
- Keep dashboards private. OpenClaw’s docs say to “keep the Gateway on loopback and access it via SSH tunnel or Tailscale Serve” (OpenClaw on a VPS); do the same for other agents until they sit behind HTTPS and a login.
- Keep automatic security updates on. Ubuntu applies security updates automatically through unattended-upgrades, installed by default (Ubuntu docs); leave it on, and update the agent itself on a schedule.
- Control who can talk to it. Hermes denies everyone until you allowlist them or approve a pairing code; OpenClaw makes unknown senders pair first by default. Keep it that way.
- Keep secrets out of prompts and Git. Store API keys in an env file only the agent’s user can read (Hermes suggests
chmod 600 ~/.hermes/.env), use a separate key per agent, and set a spending limit with your API provider where it offers one. - Limit what it can do. Keep command approval on and use a container sandbox where the agent supports one: OpenClaw runs tools on the host for its main session unless you configure sandboxing, and Hermes skips its command checks inside Docker because the container is the boundary. Give the agent its own email and calendar accounts, not yours.
- Back up the agent’s data (memory, skills, settings, database) with your host’s snapshots plus a copy off the server, and test a restore once.
Which to choose
- You want a personal AI assistant on your phone and a working setup tonight: Hermes Agent on a Hostinger KVM 2 with its one-click template, using Claude Haiku 5.5 or another low-cost API model. About $9.54 a month at the intro price; budget for the $14.99 renewal.
- You’re a developer who wants hourly billing and no upfront term: a Vultr 4 GB ($20) or DigitalOcean 4 GiB ($24) server, or Hetzner CX23 ($6.49) if you’re in Europe and it’s back in stock. Delete it when you stop.
- You automate business work (email, CRM, Slack): n8n on any of these servers; it needs the least RAM. Our n8n self-hosting guide compares it with n8n Cloud.
- You don’t want to maintain Linux: Elestio, from $11 a month for n8n or $16 for OpenClaw, with updates and backups handled.
- Your data must stay on your servers: the agent on a small VPS plus a rented RTX 4090 for gpt-oss:20b or qwen3.5:9b, set to at least 64k tokens of context. Four hours a day costs about $40.80 a month at RunPod’s Community price.
- You only want to try agents: Agent Zero or AnythingLLM on your own computer with Docker, for free apart from tokens.
FAQ
What is the best self-hosted AI agent?
It depends on the job. For a personal assistant you message from your phone, start with Hermes Agent (or OpenClaw if you need one of its skills). For automations, use n8n; for team AI apps, Dify; for coding, OpenHands; for an agent with its own sandboxed computer, Agent Zero.
How much RAM does a self-hosted AI agent need?
With an API model, 2-4 GB covers most agents (see the table above). Choose 8 GB if you’ll run several agents, build Docker images on the server (OpenClaw asks for 6 GB to build from source) or let Hermes sandbox tools in Docker. A local model needs GPU memory on top.
Can I self-host an AI agent for free?
The software is free: everything in the table is open source or fair-code. You still pay for a server (or keep your own PC on) and for API tokens, unless you run a local model on hardware you own. A small agent can also run on a free VPS tier; the free VPS comparison sets out what Oracle, Google, AWS and Azure give and the limits that come with it.
Is it safe to give an agent access to my accounts?
Only with limits: separate accounts and API keys, command approval on, the dashboard off the public internet and spending caps set. Agents read untrusted text (emails, web pages) that can try to steer them; OpenClaw’s own README says to treat inbound messages as untrusted input. Give an agent no more access than a new assistant on day one.
Sources
All read November 27, 2026, unless noted. Prices for Hetzner, Hostinger, Vultr, DigitalOcean, Elestio, RunPod, Vast.ai and the API models come from the site’s price data, with the dates shown above.
- Nous Research: Hermes Agent on GitHub
- Nous Research: Hermes Agent security
- OpenClaw on GitHub
- OpenClaw: VPS hosting
- OpenClaw: DigitalOcean install guide
- OpenClaw: Hetzner install guide
- n8n: OEM deployment prerequisites (sizing)
- Dify on GitHub
- Agent Zero on GitHub
- AnythingLLM: Docker system requirements
- OpenHands: local setup
- Langflow on GitHub
- Flowise: sunset notice
- Ollama: context length
- Ollama: gpt-oss, Qwen 3.5 tags, Gemma 4 tags
- Hostinger: VPS hosting
- Hostinger: how to use the Ollama VPS template
- Hetzner: Cloud servers
- Elestio: OpenClaw
- Ubuntu: firewalls and automatic updates
- Docker: packet filtering and firewalls