Server deployment
The server holds the replica, the branches, and the engine processes. The CLI talks to it over an authenticated HTTP API.
Run the server
# generate an admin token and start the server
$ export ANYBRANCH_TOKEN=$(openssl rand -hex 32)
$ anybranch serve --bind 0.0.0.0:8080 --public-host branches.internal--bind— where the control API listens.--public-host— the hostname branch connection URLs are handed out with (reachable by whoever will use the branches).ANYBRANCH_HOME— where the server stores databases (default~/.anybranch). Put it on a reflink-capable volume.ANYBRANCH_TOKEN— the single admin token every request must present asAuthorization: Bearer.
One server, one token. anybranch has no accounts or tenancy. Anyone with the token is an admin. Keep it in a secret store and put the server behind your own network boundary or TLS terminator.
Point clients at it
export ANYBRANCH_SERVER=https://anybranch.example.com
export ANYBRANCH_TOKEN='…'Every command becomes an authenticated server job. The CLI submits it, waits, and prints the result; --detach returns a job id immediately and anybranch job <id> reconnects. A dropped client connection does not cancel the work — a long initial copy keeps running server-side, and status monitors it.
Reboots
After the machine restarts, run anybranch up once to bring every branch’s proxy back and restart synced roots, or install the login service (Install) to do it automatically.