Skip to content

Sandboxes

Tobias Vorwachs edited this page Nov 23, 2026 · 2 revisions

Sandboxes

A sandbox is a microVM with its own disk, kernel, network rules and secrets.

One sandbox: system, connections, load and addresses

Create

boxquell new mybox --workspace . --cpus 4 --ram 8192 --disk 40 --os ubuntu --with claude,node@22
Option Meaning Default
-w, --workspace <dir> Host directory shared at /workspace none
--cpus <n> CPUs 2
--ram <MiB> Memory in MiB 4096
--disk <GiB> Disk size in GiB 20
--os <id> Operating system, see boxquell os ls debian
--backend <krun|qemu> VM backend chosen for you
--mode <whitelist|blacklist> Network mode whitelist
--allow <HOST[:PORT]> Destination to allow (repeatable) none
--secret <NAME> Host secret to make usable (repeatable) none
--with <RECIPE> Recipes to install right away none
--review Review mode, see Review Mode off
--template <NAME> Start from a template, see Snapshots and Templates none

Without a name, boxquell new opens an interactive form. The desktop app and web UI have a wizard with operating system tiles (see Operating Systems).

Start, stop, pause

boxquell up mybox        # start
boxquell down mybox      # stop
boxquell pause mybox     # freeze: keeps memory and programs, uses no CPU
boxquell resume mybox
boxquell ls
boxquell rm mybox        # delete the sandbox and its disk

shell and run start a sandbox if needed. Pausing works on Linux and macOS only.

Resources, working directory, autostart

boxquell set mybox --cpus 4 --ram 8192 --disk 40
boxquell set mybox --workdir /workspace/backend
boxquell set mybox --autostart claude
boxquell set mybox --env KEY=value

Changes apply from the next start. A disk can only grow. --workdir default returns to /workspace. --autostart takes an installed agent's name such as orca, or a command; repeat it for several, and none clears. --env KEY= removes a variable.

Stop when idle

A sandbox with no terminal open, hardly any CPU use and no data to or from outside is stopped after a time you set.

boxquell config idle-stop-minutes 30     # for all sandboxes
boxquell set mybox --idle-stop 60        # for one sandbox
boxquell set mybox --idle-stop -1        # back to the setting of all sandboxes

0 means never. In the app: Settings, General for all sandboxes, and the sandbox's Settings for one.

Remove and update software

boxquell add mybox node@22               # install
boxquell remove mybox node               # take it out again
boxquell add mybox node --again          # run the install again, e.g. to update it

In the app, a software card has Remove, and Update when its recipe offers a newer version or has changed. Removing runs the recipe's uninstall script. Without one, removing only takes the recipe off the list. Software that something else installed requires cannot be removed first. See Writing Recipes.

Snapshots, templates, project file

Save the disk with boxquell snapshot and start new sandboxes from a template: Snapshots and Templates. Describe a sandbox in the project folder: Project File.

Project root and shares

The folder you pass with --workspace appears at /workspace. The rest of your files are not visible. Share more directories (libkrun backend):

boxquell share add mybox ~/data /mnt/data --ro
boxquell share ls mybox
boxquell share rm mybox /mnt/data

Warning

--ro guards against accidents. Root inside the sandbox can remount the folder writable. The qemu backend does not share folders yet.

Port forwards

boxquell port add mybox 3000          # same port on this computer
boxquell port add mybox 8080:3000     # this computer:sandbox
boxquell port add mybox 3000 --bind 192.168.1.20
boxquell port ls mybox
boxquell port rm mybox 8080

By default a forward listens on 127.0.0.1 only. --bind lets other devices reach it. The forwards are also listed under Network in the app.

Network tab with rules and port forwards

SSH access and IDEs

boxquell ssh-config --install      # once: writes ~/.ssh/boxquell_config and includes it
ssh boxquell-mybox

Every sandbox is then an ssh host named boxquell-<name>, started on demand. VS Code (Remote-SSH), VSCodium (Open Remote - SSH) and JetBrains Gateway connect to that host; scp and rsync work too. Each sandbox has its own key, and the connection never leaves your computer.

The IDE needs network access inside the sandbox. Install the recipes vscode-remote or jetbrains-remote, which open the hosts the IDE needs. code-server runs VS Code in the browser. See Software. Without --install, ssh-config prints the configuration instead.

Next: Project File | Review Mode | Network | Software | Secrets

Clone this wiki locally