Register a sandbox server
Create a one-time registration token in the web app and connect a machine to your workspace.
A sandbox server is a machine that builds images and runs sandboxes for your workspace. The machine connects out to Forkspan over HTTPS. It needs no public IP address and no inbound ports.
Registration happens in two places at the same time. The web app creates a one-time token and waits. The machine installs the service and uses the token to connect.
Before you start
- You need the Owner or Admin role, or the Member role in a workspace that lets members register machines. An Owner or Admin sets this in the Who may register card on the Sandbox servers page. Viewers cannot register machines.
- The machine must meet the requirements for Linux or macOS.
- Have the
forkspanexecutable on the machine. See Get the executable.
Open the registration wizard
In the sidebar, under Machines, open Sandbox servers. Then select Register machine.
The wizard has these steps.
1. Workspace and owner
Choose who owns the machine:
| Owner | Who can use it at first | Who can choose it |
|---|---|---|
| Personal | Only you. | Every role that can register. |
| Workspace-owned | Owners and admins only. | Owners and admins. |
You can widen access after registration. The owner type is fixed once the token exists.
2. Install the service
Enter an optional Machine name, such as build-01. Without a name, the machine reports its
host name.
The wizard shows the install command for Linux and for macOS. Each command reads the token from
the TOKEN shell variable, so the token never appears as a command argument:
printf '%s\n' "$TOKEN" | sudo ./forkspan install --noninteractive \
--base-url https://app.forkspan.com --name build-01 --token-stdin--base-url is the address of the Forkspan web app you are using. A workspace-owned machine also
gets --ownership workspace. Copy the command for your platform, then select
Create registration token.
3. Token and first connection
The wizard shows the Registration token once. Copy it now. A lost token cannot be recovered, only replaced.
| Rule | Detail |
|---|---|
| One use | The token registers one machine. |
| 15 minutes | The token expires 15 minutes after the wizard creates it. The wizard shows a countdown. |
| Replacement | Create a new token replaces the token. The old token stops working. |
On the machine, set the variable and run the command you copied, from the directory that holds the
forkspan executable:
read -rs TOKEN # paste the token, then press Enter
printf '%s\n' "$TOKEN" | sudo ./forkspan install --noninteractive \
--base-url https://app.forkspan.com --name build-01 --token-stdin
unset TOKENThe Linux and macOS guides explain each step of the installer.
Keep the wizard open. It checks for the machine every 5 seconds and moves on when the machine connects.
4. Machine setup
The wizard shows what the machine reported: name, operating system, architecture, versions, CPU, memory and disk. Choose Who can use it:
| Personal machine | Workspace-owned machine |
|---|---|
| Only me (default) | Owners and admins only (default) |
| Specific members and teams | Specific members and teams |
| Everyone in your workspace | Everyone in your workspace |
Under Limits for Forkspan work, set CPU (millicores), Memory (bytes), Disk (bytes) and Simultaneous attempts. Then select Continue.
5. Activation
When the machine is active, the wizard shows that it is registered. Select Finish to open the machine page.
Cancel a registration
Select Cancel registration to remove a registration that did not finish. If you leave the page while a token is still valid, the wizard asks whether to abandon the token.
Register an installed machine
You can install the service without a token. The installer then writes the service but does not
start it, and prints registration: pending. Create a token in the wizard, then register and start
the service:
read -rs TOKEN
printf '%s\n' "$TOKEN" | sudo forkspan register --token-stdin
unset TOKEN
sudo forkspan startFor a workspace-owned token, add --ownership workspace to register.
A machine that is already registered refuses a new token. To replace its registration, add
--reregister. Forkspan deletes the stored credential before it uses the new token, so a failed
attempt leaves the machine unregistered. The new registration keeps the images that the machine
built under its previous one, so you do not have to build them again.