How to set up an AI agent on a Hostinger VPS, step by step
The one-click templates, the plan you actually need, the warning screen that deletes everything on your server, and the architectural mistake that makes people think a VPS is too slow for AI. A complete walkthrough.
Hostinger ships a template library that installs an AI agent on a VPS in one click — n8n, Agent Zero, OpenClaw, Hermes, Flowise and Ollama among them. The install genuinely is one click. The two decisions either side of it are where people go wrong, so we will take those first.
Read this before you click anything
Step 1 — Pick the right plan
The four KVM tiers differ on cores, memory and disk. For agent work, memory is the constraint that bites first.
- KVM 1 — 1 vCPU, 4 GB RAM, 50 GB NVMe. Enough for a bare n8n instance running a handful of flows.
- KVM 2 — 2 vCPU, 8 GB RAM, 100 GB NVMe. The tier Hostinger's own template pages mark as most popular, and the sensible default for Agent Zero, OpenClaw or a busy n8n.
- KVM 4 — 4 vCPU, 16 GB RAM, 200 GB NVMe. Worth it if you are running several agents, or a database alongside them.
- KVM 8 — 8 vCPU, 32 GB RAM, 400 GB NVMe. More than an agent needs unless you are self-hosting a model as well.
Hostinger's own n8n guide puts the minimum at 1 GB RAM and one core, and recommends 2 GB and two cores for headroom. Every KVM tier clears that, so for n8n alone the smallest plan is genuinely enough. Prices move with the term length and the current promotion — our Hostinger offer page carries the current figures and the referral discount.
Hostinger
20% off your first Hostinger plan
20% OFF
Step 2 — Install the template
The whole install is done from the panel. The exact path, as of 13 September 2026:
- Log in to hPanel and open VPS in the left-hand menu.
- Select your VPS and click Manage.
- Open the OS & Panel dropdown and choose Operating System.
- In the Change OS panel, search for the template you want — n8n, Agent Zero, OpenClaw, Hermes, Flowise — and select it.
- Click Change OS, then tick the box acknowledging that all files will be deleted. Read it rather than clicking past it.
- Set a root password and click Confirm. A progress bar runs while the template installs.
- When it finishes, go to VPS Overview and click Manage App to open the agent.
Step 3 — Put a domain and SSL in front of it
A raw IP and port works, and you should not leave it that way. Logging into an agent over plain HTTP sends the session — and any API key you paste into it — across the network in clear text.
- Point an A record for a subdomain, say agent.yourdomain.com, at the VPS IP address.
- Install Nginx as a reverse proxy in front of the app's port.
- Issue a free Let's Encrypt certificate for the subdomain and let Certbot configure the redirect.
- Confirm that plain HTTP now redirects to HTTPS before you log in for the first time.
Hostinger's own n8n tutorial covers this path with Nginx and Let's Encrypt, and a domain is mandatory for the SSL step — a certificate cannot be issued for a bare IP address.
Step 4 — The decision that actually matters
Here is where most guides go wrong. Having installed an agent on a VPS, the obvious next move seems to be installing Ollama beside it and running the model on the same box. It is one more one-click template, and it is almost always the wrong choice.
These machines have no GPU. CPU-only inference on a modern server CPU runs at roughly three to six tokens a second on a small model — slow enough that a single agent step takes minutes. And memory caps what you can even load: a 7 to 8 billion parameter model at Q4 quantisation needs around 4 to 5 GB and fits in 8 GB of RAM, while a 13 to 14 billion parameter model needs most of 16 GB. Those are the small models. The frontier models are not in the conversation.
The architecture that works is to split the two jobs:
- The agent runs on the VPS. It is a small Node or Python process, it holds state, and it needs uptime rather than horsepower. A VPS is exactly right for this.
- The model runs somewhere with GPUs — a vendor API, or a gateway. Your agent calls it over HTTPS.
That is why the $8-a-month box is enough. You are not paying it to think; you are paying it to stay up and hold your workflows.
Step 5 — Connect a model
Whichever agent you installed, it needs a model endpoint and a key. Anthropic-shaped clients take a base URL without /v1; OpenAI-shaped ones take one with it. Getting that wrong produces an error that looks like a rejected key.
# Anthropic-compatible
ANTHROPIC_BASE_URL="https://api.anthropic.com"
# OpenAI-compatible
OPENAI_BASE_URL="https://api.openai.com/v1"If you want to try several models against the same agent without opening an account per vendor, a gateway is the shortcut. We have written up AgentRouter separately, including the daily rationing on its Claude and GPT models, which you should read before relying on it for anything with a deadline.
AgentRouter
$50 of free API credit on AgentRouter
$50 FREE CREDIT
Step 6 — Lock it down
- Never run the agent on the same VPS as your website. Give it its own.
- Bind the app to 127.0.0.1 and reach it through an SSH tunnel, or require authentication at the Nginx layer. Do not leave the port open.
- Use a scoped, low-limit API key for the model, so a runaway loop or a prompt injection costs you a few dollars rather than your balance.
- Turn on the firewall and allow only 22, 80 and 443.
- Take a snapshot once it works, so a bad prompt is a restore rather than a rebuild.
The shortcut for server management
Worth knowing: Hostinger builds an MCP-powered assistant into the VPS dashboard and web terminal, which can run commands and troubleshoot configuration from a chat prompt, with no separate subscription. For the Nginx and Certbot steps above it is a reasonable way to get unstuck — with the same caution you would apply to any agent that can run commands as root: read what it proposes before you approve it.
A realistic first build
- KVM 2, fresh, nothing else on it.
- n8n template from the panel.
- Subdomain, Nginx, Let's Encrypt.
- A model API key with a low spending cap.
- One workflow: a webhook in, a model call, a message out. Get that working end to end before building anything ambitious.
That takes under an hour, most of which is DNS propagation, and it teaches you where the moving parts are. Agent Zero and the more autonomous tools are much more interesting once you already know what the boring version does.
Sources
Dashboard steps and template names from Hostinger's own VPS pages and its n8n installation tutorial; plan specifications from its VPS hosting page; Agent Zero's capability list from its own template page. All read on 13 September 2026. Model memory requirements are the widely published figures for Q4-quantised models and vary with quantisation and context length. Panels and prices change — check the live pages before buying.
Affiliate Disclosure: Some links on KuponGuru are affiliate links. We may earn a commission at no additional cost to you.
More guides
ai-tools · 3 min read
Sora 2, Veo 3.1 and Kling: where you can actually use them, and what it costs
The three video models everyone is searching for, what access to each really requires, and why the honest answer to “how do I use Sora 2 free” is not the one the round-up pages give.
Read article
savings-guides · 3 min read
One AI subscription instead of six: what the all-in-one workspaces actually include
Platforms that resell every frontier model for one monthly fee are having a moment. The maths is real, the savings claim is inflated, and the cheapest tier almost never includes the model you came for.
Read article
comparisons · 4 min read
Agent Zero, OpenClaw, n8n and Flowise: the self-hosted AI agents you can deploy in one click
Four very different things get called an AI agent. What each one actually does, how much RAM it needs, and the security question that the one-click install pages do not ask you.
Read article

