1. Set up the machine
Create a machine and install your app on it the way you would set up a fresh laptop:systemd, pm2, or docker compose, so it also comes back after a reboot.
Point the machine’s proxy at your app’s port and check it serves:
2. Snapshot it
Save a snapshot, then start a machine from it. Booted in 4ms.
my-workspace therefore stays one name your scripts and teammates can rely on while the content moves forward. While a new version is saving, creating a machine from that name fails until the save is ready.
3. Refresh it on every push to main
Keep the snapshot current by re-syncing the machine and re-saving the snapshot whenever main changes. The recommended way to automate this is through the TypeScript or Python SDK, which reads aBOXD_API_KEY from the environment and handles authentication for you. The whole refresh is a few lines:
- TypeScript
- Python
refresh-snapshot.ts
pip install, cargo build, docker compose up -d --build, a migration step). The exec also wakes the machine if it was hibernated, and the save requires it running, which it then is.
Run the script from anything that reacts to a push to main. Wiring it into GitHub Actions is one small job: run it on push to your default branch with BOXD_API_KEY stored as a repo secret. Mint the key once, without it touching your clipboard:
4. Create machines from it
From now on, a ready copy of your app is one command away:A fork also copies a running machine, directly and in milliseconds, but it copies the machine as it is right now. A snapshot gives you a named starting point that stays the same while the source machine moves on, and that outlives the machine.