Guide
How to self-host an AI agent on a VPS
Self-hosting an AI agent is not hard, but there are more steps than most tutorials admit. This guide covers the whole path and where people usually get stuck, so you can do it yourself or decide to skip it.
The bot @YourAgentSetupBot shows everything before you pay.
01 · The path in
The path in seven steps
- Choose a runtime. Options include OpenClaw and Hermes Agent (both free and open source) or an agent that runs the unmodified Claude Code. Compare them here.
- Rent a VPS. A small Linux server is enough for the agent itself because the model runs at the provider. What to look for.
- Lock the server down first. SSH keys, no password login, a non-root user, a firewall, automatic security updates. The checklist.
- Create a Telegram bot. Talk to BotFather, create a bot and keep the token private. Limit the bot to your own Telegram user ID so strangers cannot use it.
- Install the runtime and keep it running. Use a service manager such as systemd so it restarts after a reboot or crash.
- Connect a model. Sign in with your own subscription or add an API key. Never paste keys into chats, and keep them out of git.
- Add memory and routines. Decide where memory files live, back them up, and add schedules only after the basics are stable.
02 · Where people get
Where people get stuck
| Problem | Why it happens | What helps |
|---|---|---|
| Agent dies after logout or reboot | Started in a terminal, not as a service | Run it under systemd |
| Surprise model bill | Agents loop or read large files; some users report $18 to $250 per day or night with OpenClaw (self-reported, Notebookcheck) | Use a subscription with limits, or set spending caps on API keys |
| Exposed gateway | Control port opened to the internet; researchers reported about 923 open OpenClaw gateways (The Register, February 2026) | Do not expose admin ports; firewall by default |
| Risky add-ons | Public skill marketplaces can contain malicious items; 341 malicious ClawHub skills were reported (TNW) | Install only skills you have read |
| Updates break things | No tested release path or rollback | Pin versions, snapshot the VPS before upgrades |
Facts about OpenClaw checked November 28, 2026, from the sources named in the table.
03 · The turnkey shortcut
The turnkey shortcut
If you would rather not do steps 3 to 7 by hand, our setup bot does them for you on the VPS you provide. It installs the engine, memory files and skills, connects your Telegram bot and your model, and ships updates that are checked on your server, with rollback if a new version fails to start. You still own the server and the files. The price is $99 per month, setup included.
Prefer to do it yourself? That is a fair choice, and the guide above is meant to be enough. See the cost comparison to judge whether your time or our fee is cheaper.
04 · How to start
How to start: four steps
Open the bot
It shows what the agent can do and what it costs, before you pay.
Start the setup
The bot asks for your email and sends a $99 invoice. You pay inside Telegram, in USDT through @CryptoBot.
Server and bot
A server on your own hosting account, your own Telegram bot and an AI plan. The bot guides every step.
Your agent is live
Setup takes about 15 minutes. Then the agent asks about you and your work.
05 · Questions
Frequently asked questions
How long does self-hosting an AI agent take?
By hand, plan an afternoon for a first working version and more for hardening and updates. With our setup bot, setup takes about 15 minutes: about 10 for the install and about 5 to create the server and the bot.
Which runtime should I choose?
Open-source options such as OpenClaw and Hermes Agent are free and flexible. A Claude Code based agent runs the unmodified Claude Code. See our comparison page for the trade-offs.
Do I need Docker?
Not necessarily. Many setups run directly on the host or in containers. Containers help with isolation but add moving parts.
See in the bot what your future agent can do
What happens in the bot
- In a minute it shows what the agent can do, what you need and what it costs.
- Start the setup: your email and a $99 invoice.
- Then step by step: server, your own bot, AI plan.
$99 a month, setup included. The server and the AI plan are paid to their providers, not to us.
What next
Results depend on your data and tasks; we do not quote time-saving numbers. Before irreversible actions and spending money the agent asks for your yes: this is the agent's rule, not a technical lock. Last updated November 27, 2026.