Installing a self-hosted AI agent on a VPS takes four ingredients: a small Linux server (about $5-15 CAD/month), Docker, an AI API key from a provider you choose, and the agent software itself. With a modern installer, the distance from "empty server" to "first conversation with your agent" is measured in minutes. This guide covers the decisions that matter before you run anything.
Step 1: Pick a server
A personal AI agent is light. The model does the heavy thinking at the API provider's end; your server runs the agent's logic, memory, and integrations.
| Spec | Minimum | Comfortable |
|---|---|---|
| RAM | 2 GB | 4 GB |
| CPU | 1 vCPU | 2 vCPU |
| Storage | 20 GB | 40 GB |
| OS | Ubuntu 22.04 | Ubuntu 24.04 or 26.04 |
Any mainstream VPS provider works - Hetzner, DigitalOcean, OVH, Oracle, Contabo. Pick a region near you for snappier chat. If you want to try before renting anything, agents like AIDA also run on a Windows or macOS machine with Docker Desktop - a zero-cost way to explore before committing to a server.
Step 2: Get an API key
Your agent needs a language model. With your own key you pay the provider's raw rates and can switch models anytime:
- Anthropic (Claude) or OpenAI (GPT) - strongest general performance
- Google (Gemini) - competitive pricing, large context windows
- OpenRouter - one key that routes to 200+ models, convenient for experimenting
Typical personal-use spend is $5-30/month, billed directly by the provider with no middleman markup.
Step 3: Install Docker and the agent
On Ubuntu, Docker is one command (curl -fsSL https://get.docker.com | sh), and most 2026-era agents ship as Docker images so the install itself is a script that pulls the image, asks for your API key, and starts the service. AIDA's installer follows this pattern: run it, answer the prompts, and the agent is online - the step-by-step guide walks every screen, and no prior server experience is assumed.
What a good installer handles for you: pulling a pinned, verified image; generating configuration; setting the service to restart on reboot; and HTTPS for the web interface.
Step 4: Connect your accounts
An agent earns its keep through your real accounts - Gmail or Outlook, Google Calendar, Drive or OneDrive, Tasks. The safe pattern here is OAuth: you approve access on Google's or Microsoft's own consent screen, the agent stores a revocable token, and your password is never typed into anything. You can revoke that token from your Google or Microsoft account page at any moment.
Step 5: Lock the basics down
Self-hosting means the security housekeeping is yours. The essentials are short:
- Firewall: allow SSH (ideally key-only) and HTTPS; close everything else.
- HTTPS on the web interface - handled automatically if your agent sits behind a proxy like Caddy.
- Updates on purpose: update the agent when releases ship, and let Ubuntu apply unattended security patches.
- Least privilege: connect only the accounts you actually want the agent using.
Realistic timeline
- Renting the VPS and pointing DNS (optional): 15-30 minutes
- Docker + agent install: 5-15 minutes with a scripted installer
- OAuth account connections: 10-20 minutes, mostly clicking consent screens
- First useful automation (a morning briefing, inbox triage): the same evening
The era when self-hosting an AI assistant meant a weekend of YAML is over. The decisions above - server, model, what to connect - are the real work; the installation itself has become the easy part.