Skip to content
Practical AI Guides, Reviews & Tutorials

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.

Recent entries

  1. No. 075 How I Use AI as a Chief Accountant: 5 Workflows That Save Me Hours · 3 min
  2. No. 074 Arshara Finance is Now Live on Google Play · 2 min
  3. No. 073 This week in AI: OpenAI’s Astra arrives, an AI escaped its sandbox in a safety test, and Amazon says agents will cut jobs · 5 min
  4. No. 072 This week in AI: Nvidia buys Hugging Face for $12.9 billion, NYC bans AI in classrooms, and a very bad outage day · 5 min
  5. No. 071 This week in AI: agents that book your hotel, 2 million more GPUs, and a $299 robot brain · 3 min

Leave a note

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