Fitting out a home dockyard
A start-to-finish walk through the setup I use to build things with an AI agent at home — the laptop you type on, an old laptop turned into an always-on server, where the projects and their state actually live, the plain-text control layer that keeps a dozen of them straight, and how it all joins into one private network once a project outgrows the house. Every term you might not know is a hover away.
This is the whole thing, laid out in order. If you have watched an coding agentAn AI you give a task and some tools, and it edits files, runs commands and iterates on its own until the task is done. Claude Code and Codex are the two I use. build you something impressive on your laptop and then wondered where it is supposed to live, this is the answer I arrived at. None of it is bought as a product. It is an old laptop, some free software, and a habit of only adding a piece when the lack of it has actually hurt.
Words you might not know have a dotted underline. Hover, tap or tab to them for a plain explanation — no need to already speak the language.
1 · The laptop is the workbench, not the yard
You type on your laptop. The agent works on your laptop. That part is fine.
The distro barely matters. I run OmarchyA pre-configured Arch Linux setup (the Hyprland tiling desktop, sensible defaults) so you get a working keyboard-driven Linux without assembling it yourself. What I run on my laptop. on mine; plenty of people use WSLWindows Subsystem for Linux. It runs a real Linux distro inside Windows, so you get a proper Linux terminal without leaving your Windows machine or dual-booting. so they never leave Windows; plain Linux distroA packaged-up version of Linux — the kernel plus a set of default tools and a way to install more. Ubuntu, Arch, Debian, Fedora are all distros. Pick one and move on. is the safe default and nothing here depends on the choice. What you need is a terminalThe black window where you type commands instead of clicking. Also called a shell or a command line. Almost everything here happens in one., gitThe tool that tracks every change to your code and lets you go back to any earlier version. The history lives in a hidden .git folder inside the project., DockerA tool that packages an app together with everything it needs to run into a "container", so it runs the same on any machine and does not collide with anything else installed., and coding agentAn AI you give a task and some tools, and it edits files, runs commands and iterates on its own until the task is done. Claude Code and Codex are the two I use. — I keep both installed and use whichever suits the job.
The trouble starts a few projects in. An agent building a web app will stand up a PostgresPostgreSQL — a widely used database. If a project stores accounts, orders, posts, anything structured, it is probably in a Postgres container. database, a RedisA fast in-memory store apps use for caching, sessions and queues. Small, common, and gone if the container restarts unless you tell it otherwise. cache and a dev server, each in its own containerOne running, sealed-off copy of an app and its dependencies. You can start, stop and throw them away without touching the machine underneath.. Do that across three projects and you have a dozen containers on your laptop fighting over portA numbered door on a machine that a program listens on. A web server is usually on port 80 and 443; two programs cannot use the same port at once, which is why running lots of things locally gets fiddly., your fan is loud, and the moment you shut the lid on the train everything you had running stops. The laptop is a great place to work. It is a bad place for things to run.
2 · A slip that stays in the water
The fix is one machine that is always on. It does not have to be a “server” — a laptop from about 2015 with a dead battery, lid shut on a shelf, does the job. Let’s call it Marina.
Two settings turn a laptop into a server. Tell logindThe systemd piece that decides what happens when you close a laptop lid. Tell it to do nothing and an old laptop becomes an always-on server. to do nothing when the lid closes, and set it to power back on after a blackout. Then install Linux distroA packaged-up version of Linux — the kernel plus a set of default tools and a way to install more. Ubuntu, Arch, Debian, Fedora are all distros. Pick one and move on., DockerA tool that packages an app together with everything it needs to run into a "container", so it runs the same on any machine and does not collide with anything else installed., and drop your laptop’s public SSH keyA pair of files — one secret, one public — that let you log in over SSH without a password. You put the public half on the machine you want to reach; the secret half stays on your laptop. onto it so you can log in without a password.
Now the split is clean. You still work on your laptop — that is where the agent runs, where you read the diffs, where you think. But the containerOne running, sealed-off copy of an app and its dependencies. You can start, stop and throw them away without touching the machine underneath. run on Marina. You SSHThe standard way to log into another machine over the network and run commands on it as if you were sitting there. "ssh caspar" opens a shell on the machine called caspar. in, bring a project up with one Docker ComposeA file (docker-compose.yml) that describes all the containers a project needs — the web app, its database, a cache — and one command to start or stop the lot together. command, and close your laptop. It keeps running. The fan noise, the port clashes and the “oh no I rebooted” all move off the machine you carry around.
3 · The strongroom
Something on Marina will eventually break, or fill up, or get deleted by a command that looked safe. The question that matters is: is there a recent copy of everything, somewhere that is not Marina?
Two halves. The code is easy: every project gets a git remoteA copy of your repository on another machine — GitHub, GitLab, or your own server — that you push changes to. It is what makes a dead laptop an inconvenience rather than a disaster., so a lost disk means a morning of cloning, not a funeral. The state is the hard half — the PostgresPostgreSQL — a widely used database. If a project stores accounts, orders, posts, anything structured, it is probably in a Postgres container. with real records in it, the folder of files people uploaded, the .env fileA plain text file of secrets and settings a project reads at startup — database passwords, API keys. Never committed to git; easy to lose because it only exists on the running machine. of secrets that only ever existed on the running machine. Git does not touch any of that.
So you need a second copy of the state. A NASNetwork-Attached Storage — a box of hard drives on your home network that other machines can write to. Or, honestly, any spare drive you copy backups onto. if you have one; a spare USB drive that Marina cronThe Linux stopwatch. It runs a command on a schedule — every night at 3am, every ten minutes — without you being there.s a nightly dump onto if you do not. It does not need to be clever. It needs to be off the box and recent. I ended up building this into the control layer so every project is held to it — that is a lifeboat for every hull — but a cron job and a cheap drive is a completely respectable start.
4 · The harbourmaster
Two projects fit in your head. Six do not — especially when each was built over weeks of coding agentAn AI you give a task and some tools, and it edits files, runs commands and iterates on its own until the task is done. Claude Code and Codex are the two I use. sessions, spread across your laptop and Marina, and half of them have not been touched in a month. Which session finished the auth work? Is this spec still true? What is even running right now?
This is what bosun-x is for. It is a folder of MarkdownPlain text with a light sprinkle of punctuation for headings, lists and links. This note is Markdown. So is every spec and handoff log bosun-x keeps. and YAMLA plain-text format for structured settings, readable by people and machines. Docker Compose files, bosun-x records and most config you will touch are YAML. — one directory per project — holding the spec, the task list, and a handoffA short written record of what was just done, what state things are in, and the next concrete step — so the next work session (a fresh agent, or you next week) picks up without re-deriving everything. note so the next session starts clean instead of re-deriving three months of context. The agent reads and writes those files directly (there is an MCPModel Context Protocol — a standard way to hand an AI agent a set of tools it can call. bosun-x ships an MCP server so an agent can read and update project state through tools instead of poking files. server so it can do it through tools). Over the top sits a dashboard that reads your DockerA tool that packages an app together with everything it needs to run into a "container", so it runs the same on any machine and does not collide with anything else installed. state live, shows every project at once, and flags the ones that have drifted below your bar — no git remoteA copy of your repository on another machine — GitHub, GitLab, or your own server — that you push changes to. It is what makes a dead laptop an inconvenience rather than a disaster., no spec, a stale handoff.
The discipline is the point; the dashboard is just the window onto it. The whole of the chart room is about this piece.
5 · When a hull is seaworthy
Sooner or later one project stops being an experiment. Real people use it. “It goes down when I reboot Marina” turns from a shrug into a problem. It wants its own address, its own uptimeThe share of time a service is actually up and answering. Nobody notices 100%; everybody notices the outage. Production needs it, experiments do not., and it should not be sharing a disk with the thing you are still hacking on.
So it graduates. It moves to a VPSVirtual Private Server — a slice of a machine you rent in a data centre, with its own public IP address. A few dollars a month gets you enough to run a small production app. — a few dollars a month for a small rented machine with a public IP. The shape does not change: DockerA tool that packages an app together with everything it needs to run into a "container", so it runs the same on any machine and does not collide with anything else installed., a reverse proxyThe doorman in front of your containers. One program takes every incoming web request, terminates HTTPS, and routes each domain to the right container. Traefik and Caddy are the usual picks. in front, the same Docker ComposeA file (docker-compose.yml) that describes all the containers a project needs — the web app, its database, a cache — and one command to start or stop the lot together. file. It is just running somewhere that is not your house, on a machine whose whole job is to stay up.
Now you have machines in more than one place. And “just ssh to it” gets complicated: the VPS has a public address, but Marina is behind your home router’s NATThe thing your home router does that lets many devices share one public IP address. Handy, except it means machines outside your network cannot start a connection to a machine inside it., your laptop moves between networks, and none of them can reliably start a connection to the others.
6 · Channel markers
The answer is an overlay networkA private network laid on top of the real internet. Every machine you enrol gets an address on it and can reach every other one directly and encrypted, wherever they physically are.: a private network laid
over the top of the real internet. You enrol each machine once — laptop, Marina,
every VPS — and each gets a fixed address on the overlay. After that any machine
can reach any other directly and encrypted, wherever they physically sit.
ssh prod-1 works from a café.
Two ways to get one. TailscaleA managed overlay network built on WireGuard. It does the introduction service for you, so setup is a login and a client install on each machine. The no-config option. is the no-config option: it runs the introduction service for you, so setup is a login and a client on each machine. NebulaAn open-source overlay network you host yourself: one small "lighthouse" server for introductions, a certificate per machine, and every node talks directly after that. What I run. is the run-it-yourself option — one tiny “lighthouse” server for introductions, a certificate per machine, direct traffic after that. Both are WireGuardA modern, fast, small VPN protocol built into the Linux kernel. Nebula and Tailscale are both ways of managing WireGuard-style tunnels across many machines. underneath. I use Nebula because I wanted to own the whole path; Tailscale is what I would tell a friend to start with.
bosun-x rides this network too. It reaches every host over the overlay with a single locked-down SSH keyA pair of files — one secret, one public — that let you log in over SSH without a password. You put the public half on the machine you want to reach; the secret half stays on your laptop. that can only list containers and nothing else — a key with one job — so one page shows the whole fleet no matter which city each machine is in.
7 · The whole harbour
Put it together and it is not complicated, just layered. You and the agent work on the laptop. Marina runs the projects and pushes their state to a drive. An overlay networkA private network laid on top of the real internet. Every machine you enrol gets an address on it and can reach every other one directly and encrypted, wherever they physically are. joins your laptop, Marina and any rented boxes into one addressable fleet. bosun-x sits across the top as the chart room — every deck visible from one page — and every project has a git remoteA copy of your repository on another machine — GitHub, GitLab, or your own server — that you push changes to. It is what makes a dead laptop an inconvenience rather than a disaster. so no single machine is a single point of failure.
You do not build it in this order on day one. You start with a laptop and an agent. You add the always-on box when the fan noise and the lost work get annoying. You add backups the first time you feel the cold at the thought of a dead drive. You add bosun-x when you lose track. You add the overlay when a project graduates. Every piece earns its place by the pain it removes.
That is the dockyard. Start with the workbench and a sharp agent; add a slip when the lost work starts to sting, a strongroom the first time you feel the cold, a harbourmaster when you lose count. Do that and you are not bailing water any more — you are running a tight ship, and you can put out to sea knowing the harbour will still be standing when you sail back in.
Fair winds.
-x