7 Habits for Keeping Headless Boxes Reachable
Lessons from my machines that have no screen

I've worked as a sysadmin, network engineer and developer for years. Some of my machines sit at sites with no monitor. Claude Code, my main AI agent, works on them over SSH on my Tailscale network.
On my go, Claude once wiped a small board at one of those sites to put a new Ubuntu image on it. It booted, but SSH accepted the connection and closed it with no banner, most likely because there were no host keys. The image relied on making them at first boot. There was no screen there, and no other way in. It came back only after I pulled the plug and powered it back on.
How to prepare an image before a wipe like that is in 7 Habits for Letting an AI Agent Work on Your Machines. These are the other seven habits I use to keep boxes with no screen reachable.
Habit 1: Power a flaky box off. Don't warm-reboot it
A laptop I run as an always-on box hung at POST on a warm reboot: about 1 in 5 times on defaults, about 1 in 41 with reboot=pci. Cold boots never failed.
So it never warm-reboots. It powers off, and its own firmware wakes it. For example, to wake two minutes later:
sudo rtcwake -m off -s 120
With the timer I set in my test, it was back in about 96 seconds, with no other device involved. Not every machine can wake from a full power-off, so test yours while you can still reach it by hand.
Then check that nothing warm-reboots it behind your back. On that laptop, unattended upgrades had no automatic reboot, and nothing in cron or systemd called reboot.
Habit 2: A headless app must never wait for a person
OBS runs on one of my machines with no screen. After an unclean stop, OBS asks whether to start in Safe Mode. With no screen, that dialog waits forever. Safe Mode also turns off its websocket, the remote control. So it can look running, with no way to control it.
A restart policy doesn't help. Nothing crashed, so nothing restarts it. The fix is launch flags that skip those dialogs:
obs --disable-shutdown-check --disable-missing-files-check
With the flags set and the service restarting it, a kill -9 test came back in about 13 seconds, with its settings intact and the websocket answering.
Habit 3: Name what a fix depends on
That laptop also woke with Wake-on-LAN from a clean power-off, in about 36 seconds. But in my setup, the packet had to come from a device on that network. The only other always-on box there was the one I was planning to remove. The firmware timer needs nothing else.
An earlier test had said Wake-on-LAN was broken. That packet was sent while the box was hung, so it tested nothing.
Habit 4: Fix the network address so it can't change
After the plug was pulled, the board came back on a different address. It has no fixed MAC address, and the OS made up a new one on every boot.
The MAC is pinned in the network config now, cloud-init's network config is turned off, and the router has a DHCP reservation for it. A reboot test came back on the same address, with the same MAC.
An example with netplan. Use your own interface name, and the MAC the board has right now:
network:
version: 2
ethernets:
end1:
macaddress: "<your MAC>"
dhcp4: true
dhcp-identifier: mac
dhcp-identifier: mac makes the DHCP request use the MAC, so a reservation by MAC matches. It works with networkd, Ubuntu Server's default; NetworkManager ignores it. To stop cloud-init rewriting the network config, put this in /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg:
network: {config: disabled}
That doesn't remove a netplan file cloud-init already wrote, like /etc/netplan/50-cloud-init.yaml. It still applies, so edit it or replace it. Run sudo netplan try before a reboot test. If the network drops, it rolls back by itself. If it works, accept the prompt, or it rolls back anyway.
Habit 5: Wake it from inside the site
My site routers sit behind carrier-grade NAT, so nothing on the internet can dial in to them. They dial out, so I can still reach them. The router is the always-on device inside the site, so it sends the wake. When a site moved, that was the only way to bring a box back, and it worked the first time.
Habit 6: Plan for hands on the box
Some failures need a person. The board needed its plug pulled. A reflash would have needed an SD card or a USB cable from another machine at the site.
I keep a rescue USB stick, built as an image file and tested under QEMU before it was ever flashed. It still needs someone to plug it in and pick the boot device.
So before a risky change on a box with no screen, say plainly that there's no undo without hands on the box.
Habit 7: Start a service only after what it needs
At boot, OBS could start before the GPU driver was ready. It came up without hardware encoding, and nothing crashed, so nothing restarted it. Now its service waits for the GPU device first, with a time limit, and is ordered after Tailscale. A simplified version of that service (/dev/nvidia0 is the NVIDIA GPU's device):
[Unit]
After=tailscaled.service
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
ExecStartPre=/bin/sh -c 'for i in $(seq 60); do [ -e /dev/nvidia0 ] && exit 0; sleep 1; done; exit 1'
ExecStart=/usr/bin/obs --disable-shutdown-check --disable-missing-files-check
Restart=always
After= only sets the order. It doesn't wait for a Tailscale address. The start limit stops it retrying forever if the GPU never shows up.
A remote desktop service on a headless box is bound to its Tailscale address. That address has to exist before the service starts, or it fails on every reboot. So its start waits for the address itself. A config line that looked right there, address=, did nothing and left it listening on every address. Check what's actually listening with sudo ss -ltnp.
The checklist
- Flaky warm reboots? Power off and let the firmware wake it, tested first. Nothing reboots it on its own.
- No dialog that waits for a click. Recovery tested with
kill -9. - Every fix checked for what it depends on.
- MAC pinned, DHCP by MAC, cloud-init kept off the network config, reservation set. Proved with a reboot.
- A way to wake it from inside the site.
- Know what needs a person, and say it before a risky change.
- Services wait for the devices and addresses they need. What's listening, checked.
How my machines are watched over Tailscale is in 7 Habits for Securing Your AI Agents and Systems.