Skip to main content
fork creates a new machine that is an exact copy of an existing one — same filesystem, same installed packages, same data. The new machine gets its own name, IP, and HTTPS domain.

Usage

ssh boxd.sh fork myapp
       name: myapp-fork
         id: 7a3f8c12-bb41-4e09-a5d2-91c3e4f0d678
         ip: 5.135.42.19
forked from: myapp
       boot: 1.8s
Specify a custom name:
ssh boxd.sh fork myapp --name=myapp-v2
With --json:
{
  "name": "myapp-fork",
  "vm_id": "7a3f8c12-bb41-4e09-a5d2-91c3e4f0d678",
  "ip": "5.135.42.19",
  "image": "default",
  "status": "running",
  "boot_time_secs": 1.8,
  "forked_from": "myapp"
}
The fork gets its own 100 GB disk, copied from the source machine. The fork is placed on the same worker as the source machine.
If the default name {source}-fork is already taken, the command fails. Use --name to pick a different name.

Use cases

Rollback

Fork before a risky change:
ssh boxd.sh fork myapp --name=myapp-backup
# make changes to myapp...
# something broke?
ssh boxd.sh destroy myapp
# myapp-backup still has the working state

Experimentation

Try things without affecting your working machine:
ssh boxd.sh fork myapp --name=experiment
# break things freely
ssh boxd.sh destroy experiment

Scaling

Need another instance of the same app:
ssh boxd.sh fork myapp --name=myapp-2
Both machines run the same code and data from the moment of the fork. Changes after the fork are independent.