Skip to content
Dan Hopwood
Updated 8 min read

Running AI agents on a €30 Linux box

My agents don’t run on my laptop any more. They run on a €30-a-month Linux box that never turns off, where the laptop and phone are just windows into it. Close the lid mid-session, open the phone at the airport, and the agents have been working the whole time. Here’s why the hosted products didn’t fit, the stack that did, and the scripts to build your own.

Diagram: a laptop and a phone connect through a Tailscale private network to one Linux box holding three tmux sessions, each running a Claude Code process. Nothing runs on the laptop or phone.

Nothing runs on laptop/phone.

Laptop

Phone

Tailscale private network

Linux box

  • tmux: fidero-os Claude Code process
  • tmux: fidero.com Claude Code process
  • tmux: danhopwood.com Claude Code process

Why not the hosted products

I’m moving between places a lot more this year and every agent run I had depended on the laptop staying open. A 40-minute /build dies with the lid. I wanted to start multiple jobs, close the laptop, travel, and pick the same sessions up from whichever device I had on arrival.

The obvious answer is one of the hosted products, so I had six research agents look at the options in parallel (hosting, phone access, connector logins, browser testing, hosted alternatives and security) and consolidate 965 lines of findings into one runbook. Their verdict on the packaged products was the same across the board.

Every hosted agent product (Claude Code cloud sessions, Anthropic’s Managed Agents, OpenAI’s Codex cloud) runs one vendor’s agent on their own machines, which can’t see what’s set up on yours. That’s fine if everything you need is committed, but my work sits across 13 repos that read each other (a coding repo reads the knowledge vault, the vault reads specs), 16 MCP servers (the connectors that give agents Gmail, Linear, Slack and a browser) and several vendors’ CLIs pointed at the same files. None of the products runs all of that in one place.

The cloud dev environments have the opposite problem, because they’re built to switch off. Codespaces stops after 30 idle minutes, E2B caps a session at 24 hours, and the one that will stay awake (Sprites) is about $460 a month. A plain VPS with 16GB is about €30.

So the answer was the old one: a Linux box that never turns off, and every device I own is simply a terminal into it.

The stack

The mental model first, because it decides everything else: nothing runs on the laptop. The process tree lives on the box, and devices attach to it and detach from it.

The design call that mattered more than any layer is that the box is primary and nothing syncs. The tempting version is laptop-primary with a sync tool (Mutagen, Syncthing) keeping the box in step, and that’s exactly where sync tools break – agents editing uncommitted files on both sides at once. Nearly everything I work on is git-backed already, so the laptop keeps a checkout under one rule: git-backed work only, and commit and push before switching back. If it isn’t in git, it doesn’t exist on the laptop.

Day to day

box from the laptop drops me back into whichever session I was last in, and box fidero-os targets a project. From the phone, Termius reaches the same tmux sessions through t, the box-side twin. Unattended jobs go through claude agents, a supervisor that runs each job in its own worktree and shows the fleet and PR status from any login, so a /build doesn’t need a tmux window of its own. Interactive or background, locking the phone has no effect. /loop becomes always-on automation because the session never closes, and verification capacity (the first thing to build in a software factory) now runs at any hour rather than only while the laptop’s open.

iPhone screenshot of Termius attached to the cloud-box tmux session, with Claude Code running the emma agent in the fidero-os project and auto mode on
Emma (my EA agent) from the phone – the same tmux session the laptop attaches to.

Three things I didn’t expect

Remote Control needs tmux, unless it runs as a server. claude remote-control is the one native Claude feature that fits this setup – it puts a live session in the mobile app. If you start it from a terminal, Anthropic’s own docs tell you to run it inside tmux or screen so it survives a dropped connection. If you run it as a service in server mode, the app can start new sessions on the box too, and that’s how I start and pick up most of my Claude sessions now.

The sandbox only wraps Bash. Claude Code’s built-in sandbox constrains the Bash tool. MCP servers and hooks run unconstrained on the host. The control that does the work is the permission layer: auto mode, an allow-list of read-only tools, and an ask-list gating anything that sends, deletes or posts. My unattended jobs never need an ask-list tool, so they run to completion, and anything that reaches another person still stops and waits for me.

Subscription login, not an API key. The security research recommended an API key on the box – clean under the terms of service, hard spend cap. It assumed an unattended pipeline. This is my interactive environment moved to another machine, which is ordinary individual use at a fraction of the cost, and Remote Control needs the subscription login anyway.

Known gaps

Take it

The six build scripts, the tmux config and the shell helpers (box, and a sweep that checks every repo for anything uncommitted or unpushed before you leave a machine) are in dhpwd/cloud-box. The README is the install order and, more usefully, the way back in if you lock yourself out closing public SSH: that step arms a five-minute revert before it runs, because getting the firewall rule wrong otherwise means a trip to the provider’s web console.

One warning before you follow a runbook of your own: the research got the architecture right and the specifics wrong. The host it chose had no capacity, the phone app it rejected was fine, and eleven secrets wrote themselves blank without an error. Everything above is what survived the build.

If you’d rather not build it yourself, I can set up a box like this for you. You start and pick up sessions from the Claude app on your laptop or phone, and never need a terminal.

Build Notes

Every Thursday morning. Discoveries from building Fidero entirely with AI agents – the patterns, tools and decisions that actually worked.

Read the latest issue

Tags

Share

Source

Edit on GitHub