Skip to content
Practical AI Guides, Reviews & Tutorials Friday, 11 September 2026

Project: Building My Self-Hosted AI Assistant on a Small VPS

This is the project that turned me from an AI user into an AI tinkerer: a personal assistant running on a small cloud VPS (2 CPUs, 8 GB RAM), living in a Docker container, and answering me through a private Telegram bot. It reads my email on request, checks my calendar and spreadsheets, and greets me every morning with a briefing. Here’s how the build actually went — including the parts that broke.

The architecture

The core is an open-source agent framework running in Docker. The brain is a chain of models: a fast primary model, with two or three fallbacks that take over automatically if the first provider fails or rate-limits. For Google services, the agent shells out to a small CLI tool that handles Gmail and Sheets, and a Python script generates a daily dashboard — news headlines, exchange rates, prayer times, and my calendar — served privately over an SSH tunnel.

The battles

OAuth on a headless server was the worst one. Authorizing Google access requires a browser, which a VPS doesn’t have. The fix: complete authorization on a normal PC, then securely copy the token files to the server, with the token store switched to file-based mode. Fragile configuration was the second: one invalid character in the main JSON config could take the whole agent down — and the framework would overwrite the file on a bad restart. My rule now: validate the JSON before every restart, and keep a confirmed-good backup copy at all times. Free-tier reality was the third: one popular free provider simply couldn’t handle agent work because its context window was too small. Testing with real workloads beats reading feature lists.

The rule that makes it safe

The assistant’s personality file contains one non-negotiable instruction: it may draft emails and sheet updates, but nothing gets sent or written without my explicit approval. As an accountant, I treat this like internal controls — segregation of duties, applied to software.

Was it worth it?

Completely. The monthly cost is modest, the assistant is genuinely useful, and the debugging journey taught me more about how AI agents really work than any course could. If you’re comfortable with a terminal and patient with configuration files, this is the most educational AI project you can take on.

Mohammed Sajjad

Chief Accountant by day, automation builder by night. Building self-hosted AI tools, VBA macros, web design and Python apps that make finance work less painful.

Related entries

  1. No. 070 I’m an accountant. I built an Android app with AI. Here’s what actually took the time. · 4 min
  2. No. 068 AI got cheap while nobody was looking · 5 min
  3. No. 067 1,134 people who build AI just asked the government for a brake pedal · 5 min
  4. No. 066 An OpenAI test agent left its sandbox and hacked a real company. Nobody noticed for a week. · 6 min
  5. No. 065 10 AI Image Generators in 2026: What Each One Is Actually For · 11 min

Leave a note

Your email address will not be published. Required fields are marked *