Xavier Fok
← All writing

· 6 min read

The first thing I install before anything else on a new machine

A concrete new machine setup checklist from someone running AI agents and MCP servers in production every day, starting with the one tool that has nothing to do with AI.

Every time I spin up a new machine, whether it’s a cloud box for rendering or a spare mini PC I’m turning into a worker node, people assume the first thing I install is some AI tool. A model runner, an agent framework, an MCP client. It isn’t. The first thing I install is tmux, and I set up SSH keys before I do anything else with a graphical interface. That’s it. No hype here, just a habit that came from getting burned enough times to stop skipping it.

it’s not a model, and it’s not an agent

The instinct when you’re setting up a machine to run AI automation is to jump straight to the interesting part. Pull down a model, install an agent CLI, wire up an MCP server, and start testing. I get the impulse. But agents and automation pipelines aren’t really “install and go” software. They’re long running processes. A render job might run for twenty minutes. An agent loop watching a queue might run for hours. A script polling an API for new content might run indefinitely in the background. None of that survives a dropped connection if the only thing running it is a plain SSH session.

That’s the actual problem new machine setup solves for. Not “how do I get AI running fast,” but “how do I make sure the thing I start now is still running when I check back later.”

what actually breaks first

Here’s the specific failure that taught me this. You SSH into a fresh box, kick off a process directly in that shell, walk away from your laptop, and your Wi-Fi drops, or your laptop sleeps, or your ISP hiccups for two seconds. SSH doesn’t gracefully pause. The connection dies, and by default so does everything you were running inside it, because the shell that owned that process is gone. If you were mid-render, mid-scrape, or mid-agent-run, you lose the whole session and have to start over.

This isn’t an AI-specific problem. It’s an ancient Unix problem. But it hits AI workloads harder than most other things people run on a server, because AI jobs tend to be long, and they tend to run unattended precisely because the entire point of automating something is that you’re not supposed to have to sit there watching it.

tmux, not habit

tmux is a terminal multiplexer. It’s free and open source, and it’s been around for close to two decades, so this isn’t some exotic tool I’m evangelizing. What it does is simple: it lets you start a session on the server that keeps running independently of your SSH connection. You attach to it, work inside it, detach when you’re done for now, and the processes inside keep going. Close your laptop, come back an hour later, SSH back in, run tmux attach, and you’re looking at the exact same terminal state, mid-render or mid-agent-loop, as if you never left.

It also gives you panes and windows inside a single SSH connection, so you can watch a log file in one pane while you poke at a process in another, without opening five separate SSH sessions. That matters more than it sounds like once you’re running more than one thing on a box, which on an automation server is basically always.

screen does roughly the same job and predates tmux. Either one works. The point isn’t the specific tool, it’s the category: a persistence layer between you and whatever you’re running, so a dropped connection is an inconvenience and not a reset button.

ssh keys before anything with a UI

Right alongside tmux, before I touch any GUI tool or dashboard, I get SSH key auth working and password auth turned off. Two reasons, and neither of them is about security theater.

First, practical speed. If I’m managing more than one machine, which is the normal case once you’re running any kind of automation fleet, typing a password every time I connect is friction that adds up fast. Key-based auth means one command gets me in, every time, from any machine that has the private key.

Second, and more important for anything facing the open internet even briefly during setup: password auth on SSH gets brute forced constantly, automatically, by bots that scan for open port 22 and never stop trying. It’s not a targeted attack, it’s background noise on the internet. Turning off password auth and requiring a key removes that entire attack surface instead of trying to detect and block it after the fact.

Neither of these is glamorous. Neither of them has anything to do with AI. But they’re both things that, if skipped, turn into a bad afternoon later. Setting them up takes about five minutes on day one. Fixing the mess they prevent takes a lot longer.

the boring stack that makes agents survivable

Once those two things are in place, the rest of new machine setup starts making more sense, because now you have a foundation that can actually hold what you build on top of it.

Agents and MCP servers, when you strip away the interesting parts, are just processes talking to other processes. An agent process calls out to an MCP server process, which might call out to a local tool or an API. If any of those pieces is running as a bare foreground process in a terminal that dies the moment your connection drops, the whole chain is fragile in a way that has nothing to do with how good the model is or how well you wrote the agent’s instructions. It’s an infrastructure problem wearing an AI costume.

So the actual order I follow is: get a persistent terminal layer working, get key-based remote access working, then set up whatever package manager the OS uses, get git configured, and only after that start pulling down the tools that are specific to the job the machine is for. If it’s a rendering box, that’s the render pipeline. If it’s an agent host, that’s the runtime for whatever framework I’m using and the MCP servers it needs to talk to. But those come after the boring stack, not before it, because the boring stack is what keeps the interesting stack from quietly dying every time a connection blips.

what this has nothing to do with hype

I want to be direct about what this post isn’t. It isn’t a claim that AI agents are close to running themselves without anyone watching, and it isn’t a claim that any of this setup makes automation “hands off.” It doesn’t. Long running jobs still fail for reasons that have nothing to do with your terminal setup: a model returns something unexpected, an API changes its response shape, a rate limit gets hit. tmux doesn’t fix any of that. What it fixes is one specific, narrow failure mode: losing a running process because the connection that started it disappeared. That’s a real problem, it’s a common one, and it’s cheap to solve, which is exactly why it’s worth talking about instead of skipping past it to get to the more exciting parts of a setup.

If you’re setting up a machine to run any kind of automation, AI or otherwise, and you find yourself reaching for the AI tool first, it’s worth pausing and asking whether the thing running it can survive you closing your laptop. If the answer’s no, that’s the actual first install, not whatever model or agent you were about to grab.

If you want to see how this plays out in practice, on real machines running real render and agent pipelines, that’s what the channel and the rest of the site cover. Check out the homepage for more.

Get new guides and videos first — join the Telegram channel.

Keep reading