ghcr.io/archil-data/sandbox-desktop image, so pause and resume,
forks, mounted disks, and the firewall all work the same way.
Create a desktop
desktop: true (--desktop in the CLI) starts from the desktop image with 2 vCPUs, 4 GiB of memory, the idle
timeout turned off, and a 4-hour session cap. Any of those you pass yourself take precedence. The idle timeout is off
because viewer traffic doesn’t count as sandbox activity; without that, a desktop would pause partway through a session.
archil sandbox desktop resumes the sandbox if it’s paused or stopped, starts the desktop, and opens it in your
browser. It runs until you press Ctrl-C.
View a desktop
There are two ways to open a desktop. Both need the desktop’s viewer token, which the sandbox generates. Anyone who has the token and can reach the desktop’s port can see and control the desktop.Privately, on your machine
By default,archil sandbox desktop serves the desktop on 127.0.0.1 through a tunnel. Port 6080 stays private: the
tunnel authenticates with a short-lived port token that
renews itself, and it keeps the sandbox awake while it runs. From code, use openDesktopTunnel from disk/tunnel
(Node.js only):
With a shared link
--share publishes the desktop on a public HTTPS hostname and prints a link that includes the viewer token.
--unshare removes the hostname, replaces the token so old links stop working, and disconnects everyone viewing.
Drive a desktop from code
The TypeScript SDK can operate the desktop directly, which is what computer-use agents need. Each call runs one command in the sandbox and takes well under a second.launch to start programs. Anything an exec command starts in the background ends when that command returns;
launch detaches the program so it keeps running on the desktop.
From other languages, run the same commands with exec: desktopctl up starts the desktop and prints its token, and
xdotool and scrot run against display :1.
Forks
A fork copies its parent’s disk, viewer token included. Rotate the fork’s token before you share it:Customize the image
Build on the published image to add your own software, then create desktops from it:imageId with
desktop: true.
Good to know
- The desktop runs as the unprivileged
desktopuser, who has passwordlesssudo. The sandbox VM is the security boundary. - The desktop comes back by itself after a stop and start, and a pause and resume keeps open windows intact.
- Desktops include
openssh-server, so SSH works right away. - A paused desktop costs only storage. Delete desktops you’re finished with.