HomeBlogSelf-Hosting

How to deploy a personal AI assistant on a VPS — step by step

A laptop-hosted assistant dies the moment the lid closes. A $6-a-month server never sleeps. Here's what it actually takes to run your own AI 24/7 — every step, every common failure point, and the one-command shortcut at the end.

July 15, 2026 VPS

First, the mental model. A self-hosted AI assistant has two parts: the model (the intelligence, usually a cloud API — you can't run frontier weights on a cheap server, and you don't need to) and the agent layer (everything that makes it yours: memory, conversation history, integrations, scheduled tasks). The agent layer is what you host. It's lightweight, it needs no GPU, and it's the part that accumulates your data — which is exactly why it belongs on a machine you control.

What you need before starting: a VPS (~$5–15/month), a model source (an API key or an AI subscription), a Telegram account, and about an hour.

Step 1 — Choose the server

Any reputable VPS provider works. The honest spec for an agent layer: 1–2 vCPU, 2–4 GB RAM, 20+ GB disk. Resist the upsell — you're running a Node process and a SQLite database, not training a model. Pick a region close to you (latency) or close to your legal comfort zone (jurisdiction — for some people that's the entire point).

Step 2 — Basic hygiene, before anything else

Five minutes that prevent ninety percent of disasters: log in with SSH keys and disable password login; create a non-root user; enable unattended security updates; turn on a firewall that allows only SSH. None of this is AI-specific — it's the difference between "my server" and "someone's bot-net node".

Step 3 — Install the runtime

For most modern assistant stacks that means Node.js LTS plus git. One rule matters more than any tooling choice: secrets live in an environment file with restricted permissions, never in code. Your model API key and bot token are the keys to your assistant's identity; treat them like the password to your email.

Step 4 — Connect the interface

You don't need to build an app — you already carry the interface. Create a bot with Telegram's BotFather (it takes a minute and costs nothing), put the token in your environment file, and your assistant acquires a chat window on every device you own, with voice messages, files and photos included.

Step 5 — Give it memory that survives

An assistant without persistence is a goldfish with a server bill. Conversations, extracted facts and settings should land in a database on the VPS disk — SQLite is genuinely enough at personal scale. Then schedule a daily backup of that database to a second location. (Why memory architecture matters more than people think is its own article.)

Step 6 — The step everyone skips: process supervision

Here's where most DIY setups quietly die. Running the assistant in a terminal session means it stops when the session drops. Running it with nohup means it stops at the first unhandled crash — silently, at 3 a.m., and you find out days later. The real answer is a systemd service with Restart=always: crashes restart it, reboots restart it, and the machine's init system — not your memory — is responsible for it being alive. This single step is the difference between "a script I ran once" and "an assistant that answers at any hour".

What the mistakes cost

Each skipped step has a price tag. Skipped hygiene: a compromised server that reads your assistant's entire memory. Skipped persistence: months of accumulated context gone with one process restart. Skipped supervision: an assistant you slowly stop trusting, because sometimes it just… isn't there. And hosting on the laptop after all: reminders that don't fire, messages that sit unanswered, scheduled work that never runs — the exact things you wanted an assistant for.

The shortcut

Everything above is one afternoon if you enjoy infrastructure — and a recurring chore if you don't. Avelina AI is this exact architecture, packaged: a guided installer puts the agent on your VPS with the Telegram interface, the persistent memory database, process supervision and daily backups already wired, and signed updates after that. You end up with everything this guide builds — including the part where all accumulated data stays on your server — without assembling it by hand.

FAQ

Do I need a GPU?
No. The agent layer is lightweight; the model is called via API. A GPU only matters if you later choose to run local model weights.

Can't I just use my laptop?
Until the lid closes, yes. An always-on assistant needs an always-on machine — that's the entire case for a VPS.

Total running cost?
$5–15/month for the server plus your model usage. Infrastructure ≈ two coffees a month.

What actually makes it "24/7"?
Process supervision (systemd, Restart=always) — not the server itself. Machines stay up; unsupervised processes don't.

Can I get this without the manual setup?
Yes — that's precisely what Avelina AI's installer does, same architecture, one command.

The finished version of this guide, in one command