Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sandbox presets

Edit presets

Edit sandbox presets under Settings > Sandbox and app presets under Settings > Commands > Apps. Both reload without a rebuild. The daemon checks preset directories every two seconds. For machine settings and workspace records, see Applying changes.

Sandbox preset files default to ~/.config/slopworld/sandbox_presets/. See Paths and files for overrides. A user preset replaces a supplied preset with the same name; deleting an override restores the supplied one.

Example

Save one preset definition per file:

name = "my-tools"
description = "Tools and shared working data"
ro = ["/opt/my-tools"]
rw = ["~/shared-data"]
env = ["MY_TOOL_TOKEN"]

[setenv]
MY_TOOL_MODE = "local"

Paths expand ~ and environment variables. An unset variable omits the whole path, except in shared, where it fails validation. Nonempty paths must be absolute after expansion; relative preset paths are rejected. Missing ordinary bind sources are skipped; an invalid project directory prevents launch. Protected paths, including the daemon’s configuration and private state, cannot be mounted through ordinary path fields.

In ro, rw, and dev, a whole entry such as ${KUBECONFIG:paths} expands an environment variable containing a colon-separated path list. Empty entries are ignored. Each remaining entry must be absolute and pass the same protected-path checks as an ordinary bind. Missing files are skipped. Ordinary $VARIABLE expansion still selects one path, including any literal colons.

Mount fields

KindBehavior
roMount an existing host path read-only.
rwMount an existing host path read-write.
cacheCreate a shared host directory at launch, then mount it read-write. Creation failures prevent launch.
devBind an existing host device node with --dev-bind.
privateThe daemon stores one copy per session under the state root. It mounts the copy at the configured path.
seedCopy selected files or directories into private state on first start.
sharedMount a host-owned file read-write inside private state without copying it. Use this mode for rotating credentials.
skipExclude listed paths from the initial copy into private state.

The daemon omits ordinary preset binds when their host paths do not exist. cache directories are created at launch; previewing a preset does not create them. A private bind can use an existing session copy when its host path is missing.

Global preset and composition

The implicit global preset supplies existing /usr, /etc, /opt, and ~/.local/bin read-only. Sandboxes also have /proc, /dev, and /tmp, which uses private session state when persistent /tmp is enabled. To override the global preset with a file, copy the shipped slopd/presets/global.toml to ~/.config/slopworld/sandbox_presets/global.toml, remove the [[sandbox]] header, and edit the fields. Keep name = "global" at the top level: user files contain one flat definition, so the shipped file cannot be used verbatim.

requires adds other presets. Missing or cyclic dependencies are rejected when saving; required presets appear as disabled controls in the editor.

Overlapping mounts can cover earlier paths. Use the agent editor’s Preview tab to check the resolved result. See Sandboxing for preview and inspection workflows.

Private copies and credentials

A new private directory copies regular files directly inside the source and configured seed paths, except those excluded by skip or shared. Seeding omits symlinks and seed paths with symlinked parents inside the private source. A symlink at the private source root prevents initialization and launch.

Private roots cannot contain another selected private root, including roots from different presets. Use one private root with seed entries for its subdirectories.

Existing copies are retained and are not reseeded on restart. See Paths and files for state locations and Backup and recovery for reset and restore.

The codex preset seeds user prompts and skills into new private copies. Existing copies need the skills installed there or a private-state reset to pick them up.

shared mounts existing host credential files read-write inside private directories. Host updates reach the sandboxes, and agents can overwrite those files in place. Treat them as writable host data; see the Security model.

Access warnings

Yellow Sensitive access marks credentials, devices, or services outside project files. Deep orange Host control marks access that can run processes outside the sandbox or control host applications. Host control includes access as your user; it does not require system root privileges. Sensitive credentials can still authorize high-impact changes to remote services.

Preset selectors show the highest warning level inherited through requires, with the responsible presets in the explanation. The selected configuration also includes the global preset. Warnings remain visible on required and inherited presets. An unmarked preset has no declared warning; this is not a guarantee of safety.

Use warning_level = "sensitive" or warning_level = "host_control" and an escapes explanation in custom presets, or edit Warning level and Access warning in Settings. The default is none; escapes supplies explanatory text without changing that level. The tmux and daemon_config capabilities always show host control, regardless of the declared warning level.

For example, aws, gh, kube, and psql expose credentials and show sensitive access. Docker, Podman, D-Bus, systemd, X11, and slopworld-debug show host control. android-dev shares writable Gradle initialization scripts and shows host control. android-debug also inherits host control through X11. Warnings describe capabilities; they do not add or remove sandbox permissions.

Android development

Use android-dev for builds and android-debug for connected devices and emulators. Both share the host’s writable ~/.android and ~/.gradle directories, creating these directories at launch if needed. This keeps ADB device keys, emulator state, Gradle configuration and caches consistent with host tools. SDK and NDK mounts are read-only; install or update toolchains on the host.

android-debug also forwards ADB server and device selection variables and exposes paths selected by ADB_VENDOR_KEYS. With shared networking, host and sandbox clients can use the same ADB server. Restarting that server affects both clients. Private networking does not expose a host loopback ADB server.

Preset changes apply to new agent processes. Restart the agent to change its mounts; an existing process retains its original Android directory.

SlopWorld development

Use slopworld-dev for editing, builds, and game-free tests. It provides read-only RimWorld files from SLOPWORLD_GAME or the standard installation locations, plus Git configuration, Python packages, .NET and Rust tooling, and shared compiler caches. Rust access comes through rust-sccache, including writable installed toolchains from rust-cache. The project directory supplies write access for source and build outputs.

slopworld-debug depends on slopworld-dev and adds installation and live debugging: writable game files, profiles and host installation directories, desktop services, Docker, host terminals, and the daemon root credential. Select it only when those host-control capabilities are needed. The base preset does not grant them; other selected presets and the implicit global preset still contribute access.

Tool configuration

The dotnet preset mounts user-installed SDKs and tools under ~/.dotnet read-only. It sets DOTNET_CLI_HOME to /tmp/slopworld-dotnet-cli, backed by persistent private session state, so CLI writes do not change the host installation. Selected NuGet configuration and plugin mounts are also available read-only beneath that CLI home. With nuget-cache, its package and download paths use the shared host caches there as well; without it, NuGet caches remain private to the session.

The kube preset mounts ~/.kube and each existing file listed in the daemon’s KUBECONFIG read-only. Configuration references to credentials or executables outside mounted paths require additional mounts.

Preset mounts beneath /tmp, including X11 sockets, remain available when the agent enables persistent /tmp. Private preset copies still take precedence.

SSH agents

Select ssh for SSH configuration and known hosts. Add ssh-agent to expose the socket named by the daemon’s SSH_AUTH_SOCK, or 1password when your SSH config selects ~/.1password/agent.sock.

An explicit IdentityAgent in ~/.ssh/config overrides SSH_AUTH_SOCK. Selecting ssh-agent does not change that configuration or make the 1Password socket available when SSH_AUTH_SOCK points to another agent. Use ssh -G HOST to check the effective identityagent setting. ssh-add -l queries the agent named by SSH_AUTH_SOCK, so its success alone does not prove SSH uses that agent.

Network and DNS

Agents own their network mode:

ModeBehavior
noneThe agent has a private network namespace with no network access.
privatepasta provides synthetic DNS and outbound access. It forwards only the daemon TCP port back to the host when the daemon listens on 127.0.0.1 or all IPv4 interfaces.
hostUses the host network and can reach local services.

With private, pasta routes DNS requests. resolved uses the daemon’s current resolver. An explicit dns value supplies one or two IPv4 servers to pasta.

With host, resolved uses the host resolver. The daemon writes explicit server addresses to a resolver file and mounts it in the sandbox. With none, the sandbox has no network access. DNS settings have no effect. Network and DNS changes take effect on the next agent start.

Resource limits

Set process limits in the agent editor. Limits do not provide an isolation boundary.

Environment

Bubblewrap (bwrap) starts with --clearenv. The daemon forwards PATH, LANG, USER, LOGNAME, and SHELL, plus all LC_* variables. It sets TERM and COLORTERM explicitly. Preset env forwards named variables from the daemon. Preset setenv values override forwarded variables. The daemon then sets SHELL to the agent’s configured shell.

Default presets do not forward configuration-root variables such as CODEX_HOME. The Codex preset stores ~/.codex in private state.