This guide shows you how to do yourself, for a few euros a month, roughly what we sell. That is deliberate: if you enjoy running your own infrastructure you should, and the people who do it themselves first tend to know exactly what they are buying if they later stop.

1. Pick a server

Claude Code is compute-light — the model runs remotely, so you are paying for a shell, a filesystem and enough RAM to run your project's tooling. What actually drives the size is your workload: a Node build, a test database and a headless browser will use far more than the agent itself.

Sensible floor: 2 vCPU and 4 GB. Comfortable: 4 vCPU and 8 GB. If you plan to run Postgres and a browser alongside a big TypeScript build, go to 16 GB.

On Hetzner in mid-2026 that is roughly €5.49, €8.49 and €15.99 a month respectively. We wrote up which instance families still make sense after the June 2026 price rises, because the answer changed.

2. Create a user and lock down SSH

Do not work as root. Create a user, give it sudo, and copy your key:

adduser --disabled-password --gecos "" dev
usermod -aG sudo dev
rsync --archive --chown=dev:dev ~/.ssh /home/dev/

Then disable password login entirely in /etc/ssh/sshd_config:

PasswordAuthentication no
PermitRootLogin no

systemctl restart ssh. Keep your current session open while you test the new one from another terminal — locking yourself out of a fresh box is a rite of passage you can skip.

3. Install the runtime and the agent

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt-get install -y nodejs git
npm install -g @anthropic-ai/claude-code

Authenticate once with claude and follow the prompts. Your credentials live in the user's home directory, which is one good reason to give each person their own account rather than sharing one.

4. Make it survive disconnects

This is the whole point:

# start your agent inside a persistent session, then detach
claude
# Ctrl-b d to detach; the agent keeps running

Reconnect later with ssh dev@your-box and reattach to the session. The habits that make this survive a train tunnel and a second device are in keeping Claude Code running after you disconnect.

5. Reaching it from a phone

An SSH client like Blink (iOS) or Termux (Android) is enough. The experience is workable rather than pleasant: a soft keyboard with no Ctrl key fights a terminal at every step. Consider mosh, which handles roaming between networks far better than raw SSH.

6. The parts people forget

  • Backups. A box you keep for months holds work that exists nowhere else. Enable your provider's snapshots — usually about 20% on top — and do it on day one.
  • Unattended upgrades. sudo apt install unattended-upgrades. A long-lived internet-facing box that nobody patches becomes someone else's box.
  • A firewall. Allow 22 in, and consider blocking outbound SMTP (25, 465, 587). If the machine is ever compromised, the first thing it will try to be is a spam relay, and that is what gets your whole account suspended.
  • Disk. node_modules, Docker images and agent logs grow quietly. Check df -h occasionally, or find out when a build fails at 2am.

What this does not give you

Being honest about the gap: no browser terminal, no team accounts, no one-click rollback, and every one of these steps repeated for each teammate. For one person who likes servers, that is a fine trade. For a team of five it stops being a trade and starts being a job.