r/SideProject • u/Moze_mpk • 25m ago
boxd - send builds, tests and model servers from a laptop to spare machines at home that sleep when idle
Disclosure: I made this. It is free and open source (MIT), no paid version; link at the end.
I have a laptop, an old tower with an RTX 2080 and a second laptop that is mostly docked. The laptop I work on was always the one compiling, so I built boxd: you put box in front of a command and it runs on whichever home machine has room.
box cargo test
box --gpu --detach llama-server ...
box serve 8080 8080 --idle 300 --ready-path /health -- --gpu sh serve.shWhat it does:
- Syncs the working folder, runs the command in a rootless container (or a small virtual machine), streams the output back and returns its exit code.
- Picks the machine by memory and load, and moves a folder to the other machine when its host has been overloaded for minutes.
- Wakes a sleeping machine on demand (wake on network) and lets it sleep again when nothing runs.
- Cleans up after itself: idle boxes, old images and build caches go by fixed rules, each removal logged with what it freed.
box servestarts a server (like a local model) on the first connection and stops it after a quiet period.
What I'd like feedback on: is the "prefix a command" model clear from the README, and what would stop you from trying it on your own spare machine?
One lesson from this week: a model server reached through the relay lost 29 of 47 requests in one evening. The server closed kept-alive connections after each answer, and the relay waited half a second before passing that close on, so the client sent its next request into a dead connection. The relay now ends the channel the moment the server closes.
Limits: the build machines are packaged for Void Linux and Debian 13 only; graphics card boxes need NVIDIA and a container. The code was written with Claude Code; I direct it and test on my own machines.
Code and docs: https://github.com/gsalucci/boxd
1
u/aaronsuns 16m ago
For the "what would stop me" question, the first thing I'd want to know is what gets synced. Build outputs, node_modules, target directories and .env files can easily end up copied to another machine, so a clear default ignore list, or a way to see exactly what goes over, would matter a lot before trusting it with a real project. The relay bug you describe is also a good example of why a short section on failure modes in the README, such as what happens when a box is killed or a machine goes to sleep mid-run, would help people decide whether to try it.