Host Your Own AI Assistant: The Server Part, Step by Step

Axel Grubba, September 18, 2026
Start selling digital products with Crevio
Crevio E-Commerce Platforms logo
Crevio
Sponsored
5.0
(1)
Free plan available
Crevio is an AI-powered platform that runs your business while you sleep. Describe what you want to se... Learn more about Crevio
Get an AI summary of this post on:

Every guide to running your own AI assistant covers the software and stops at “you’ll need a server.” This is the server part.

What the thing actually needs

Four items, and only one is a decision.

Requirement What to get
RAM 4GB minimum, 8GB if it will use a browser
Docker Comes preinstalled on the right template
A domain Optional — you may not need one at all
An LLM API key Free tier is fine to start

The RAM number is the only one that matters, and it’s the one people get wrong. 4GB runs a text-and-messaging assistant comfortably. The moment it drives a web browser, a headless Chromium instance wants 1–2GB entirely to itself — which is the whole of a 4GB box once the assistant is running.

You probably don’t need a domain. The common messaging channels connect outward from your server, so there’s nothing for the internet to reach. A domain matters only if an external service must send you webhooks.

Buy this

Hostinger with a one-click AI or Docker template — 4GB at $6.49/month promotional and $11.99 at renewal, 8GB at $8.79 and $14.99.

The template is the reason to pick it rather than the price. Most first attempts fail during installation, not during operation — Docker networking, a broken dependency, a container that won’t start. A template deploys a known-good configuration on a correctly-sized machine and removes that entire category of problem.

Buy the 8GB tier if a browser is anywhere in your plan. It’s $3/month more and it’s the difference between working and being killed by the kernel at an unpredictable moment.

Alternatives if you’d rather: Hetzner has the best hardware per euro when its cost-optimized tier is in stock (check — it’s been unavailable, and the fallback line is €19.99 for 4GB); Cloudzy bills monthly with no term at $17.37 for 4GB, which suits a project you might abandon. DigitalOcean is the documentation-heavy choice at $24 for 4GB — its tracked link isn’t working on our end, so we’ve named it without linking.

Then do this, before anything else

This is the part the videos skip, and it’s why this article exists.

At the last major disclosure of a vulnerability in one popular assistant, over 40,000 instances were found publicly exposed on the internet, and roughly 63% were assessed as vulnerable to a flaw that gave an attacker remote code execution from a single link. Every one of those was set up by someone who meant to secure it later.

Your assistant will hold API keys, possibly your email, possibly shell access. Do these six things first. They take about twenty minutes and none requires prior experience.

1. Create a user that isn’t root

Log in as root the first time, then:

adduser yourname
usermod -aG sudo yourname

It will ask for a password. Use a long one from your password manager. From now on you log in as yourname and use sudo when you need admin rights.

2. Set up key-only login

On your own computer, not the server:

ssh-keygen -t ed25519
ssh-copy-id yourname@your-server-ip

Then confirm ssh yourname@your-server-ip logs you in without asking for a password. Do not proceed until that works — the next step will lock out password logins.

3. Turn off password and root login

On the server:

sudo nano /etc/ssh/sshd_config

Find and set these two lines (remove any leading #):

PasswordAuthentication no
PermitRootLogin no

Save with Ctrl+O, Enter, then Ctrl+X. Apply it:

sudo systemctl restart ssh

Keep your current session open and test a new one in another window. If you can still get in, you’re fine. If not, your provider’s web console will let you undo it.

4. Turn on the firewall

sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw enable

That blocks everything inbound except SSH. Your assistant doesn’t need inbound ports for messaging channels, so this is usually all it ever needs.

5. Turn on automatic security updates

sudo apt update
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades

Choose Yes. This is the step that would have protected most of those 40,000 instances.

6. Reach it privately instead of publicly

If you need to open the assistant’s web interface, do not put it on the public internet. Install Tailscale on the server and on your laptop:

curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

Both devices join a private network. You reach the interface at its Tailscale address, and the internet cannot see it at all. The fuller pattern is here.

Then, and only then, install the assistant.

The three things that go wrong

It dies and there’s nothing in the log

Almost always the memory. The assistant vanishes mid-task, and its own log ends without an error, because the process didn’t decide to stop — the kernel killed it. Confirm with:

sudo dmesg -T | grep -i -E 'killed process|out of memory'

A line naming your process is your answer. The fix is the 8GB tier, and the trigger is nearly always browser automation.

The API bill is bigger than the server bill

This surprises people who budgeted for hosting. The model API is usually the larger half, and the variance is enormous: typical personal use runs $2–15/month, while a frontier model with an unmodified background check-in interval can reach around $85 before you ask it to do anything.

Two things to check on day one: how often it wakes itself up, and whether prompt caching is on. Both are settings, both are free, and together they’re the difference between $2 and $85. The full breakdown is here.

Your keys are sitting in plaintext

They will be, in a config file or an environment file, because that’s how these tools work. Three things make that acceptable:

  • The box has no inbound ports open — step 4
  • Only you can reach the interface — step 6
  • Every key is scoped to the minimum it needs. If a key only needs read access, give it read access. The damage from a compromise is exactly the sum of the permissions you granted.

A fourth thing, if you run the assistant in Docker: don’t pass the key as an environment variable. We tested it and docker inspect prints environment values in plain text — even when they came from a file with 600 permissions. Mount the secret as a read-only file instead. The same article covers the container flags that stop a compromised assistant writing to your host files.

And check whether you’re exposed rather than assuming: is my agent reachable from the internet takes ten minutes.

If this looks like too much

That’s a legitimate conclusion, and there’s an honest alternative.

Managed hosting for these assistants starts around $2.99–55/month, and the strongest argument for it isn’t convenience — it’s that the provider patches centrally. If you know you won’t apply security updates, managed is worth it at almost any price in that range. We compared the ladder.

The one thing managed cannot give you is an assistant with access to your own files and shell. If that’s the point of the exercise, a one-click VPS with the six steps above is the answer, and there’s no shortcut.

How we checked this

The RAM guidance — 4GB as the floor, 8GB once browser automation is enabled because a headless Chromium instance wants 1–2GB by itself — is the figure used across our AI hosting coverage. The token-spend range of $2–15 for typical use rising to around $85 for a frontier model with an unmodified heartbeat is from our cost analysis.

The exposure figures — over 40,000 instances publicly reachable with roughly 63% assessed vulnerable — are from security reporting of the CVE-2026-25253 disclosure in February 2026, cited consistently across our security coverage.

Hostinger’s, Hetzner’s, Cloudzy’s and DigitalOcean’s pricing is those providers’ published figures read in August 2026 across this series.

On the commands: they’re standard Debian/Ubuntu administration — adduser, usermod, ssh-keygen, ssh-copy-id, sshd_config directives, ufw, unattended-upgrades — and we confirmed that ufw and unattended-upgrades are real packages and that the Tailscale install URL resolves. We have not run this exact sequence end to end on a fresh server for this article. They’re ordered so that nothing locks you out before you’ve verified the replacement works — which is why step 2 insists you confirm key login before step 3 disables passwords — but if your provider’s image differs, particularly on the SSH service name, adapt rather than paste blindly.

What we did not do: we haven’t installed any specific assistant, timed the setup, or tested recovery from a lockout. The claim that most first attempts fail at installation rather than operation reflects what users report rather than a dataset we hold.

The hosting links above are affiliate links. The six hardening steps are free, and the section suggesting you may be better off with managed hosting points at products we don’t earn from.

FAQ

What do I need to host my own AI assistant?

A 4GB server (8GB if it will use a browser), Docker, an LLM API key, and about twenty minutes of security setup. A domain is usually unnecessary because the messaging channels connect outward.

How much does it cost to run a personal AI assistant?

About $6.49–14.99/month for the server plus $2–15 for model API usage — so $14–27 all in for typical use. The API is the larger and much more variable half.

Why does my AI assistant keep crashing with no error?

The kernel is killing it for using too much memory, which produces no entry in the application’s own log. Check sudo dmesg -T | grep -i 'killed process'. The usual trigger is browser automation on a 4GB box.

Do I need a domain name for a self-hosted assistant?

Usually not. The common messaging channels are outbound connections, so nothing needs to reach your server. You need a domain only for genuine third-party webhooks.

How do I secure a self-hosted AI assistant?

Non-root user, key-only SSH with passwords disabled, a default-deny firewall, automatic security updates, and reach the web interface over Tailscale rather than the public internet. Twenty minutes, no experience required.

Is it safe to keep API keys on the server?

It’s unavoidable, and acceptable if the box has no inbound ports open, only you can reach the interface, and every key is scoped to the minimum permissions it needs.

Should I just pay for managed hosting instead?

If you know you won’t apply security updates, yes — central patching is the real argument, and managed starts around $2.99–55/month. But managed can’t give an assistant access to your own files and shell.

Founder & Software Review Editor
Axel Grubba is the founder of Findstack, a B2B software comparison platform, with his background spanning management consulting and venture capital where he invested in software. Recently, Axel has developed a passion for coding and enjoys traveling when he is not building and improving Findstack.
Business Software Reviews SaaS Product Evaluation CRM Software
Subscribe, get software deals straight to your inbox.
Join 7,900+ other entrepreneurs staying up-to-date on all the latest deals.
Zero spam. Unsubscribe at any time.