Sandbox configuration controls the runtime environment of individual sandboxes. Many settings can be defined in a repository configuration and applied automatically, but you can also override or extend them with CLI flags and platform settings.Documentation Index
Fetch the complete documentation index at: https://docs.amika.dev/llms.txt
Use this file to discover all available pages before exploring further.
Setup scripts
Use--setup-script to mount a script at /usr/local/etc/amikad/setup/setup.sh. Amika runs this script before the container command starts.
Script requirements
- Make the script executable with
chmod +x. - Setup scripts run with the working directory set to the agent’s working directory (
$AMIKA_AGENT_CWD). - Exit with status code
0on success. - Keep setup deterministic so sandbox startup stays predictable.
How it works
Preset images include a no-op/usr/local/etc/amikad/setup/setup.sh and an entrypoint that runs it before CMD.
When you pass --setup-script, your file is mounted over the no-op script.
Git repository cloning
--git clones a git repository into the sandbox at /home/amika/workspace/<repo-name>.
--git is used, Amika also looks for a .amika/config.toml file at the root of the repository and applies it automatically.
- The volume name is derived from the sandbox name and repo name, e.g.
amika-git-teal-tokyo-Hello-World-<timestamp>. - Deleting the sandbox does not automatically delete the git volume; use
amika volume deletewhen you no longer need it.
Overriding repository configuration
When a sandbox is created from a repository, settings from.amika/config.toml are applied as defaults. You can override any of these at creation time:
.amika/config.toml values. See configuration resolution for the full precedence order.
Agent credential auto-mounting
Amika auto-discovers credential files on your host and mounts them into the sandbox. This gives agents access to credentials without modifying host files.Supported files
Claude Code~/.claude.json.api~/.claude.json~/.claude/.credentials.json~/.claude-oauth-credentials.json
~/.codex/auth.json
~/.local/share/opencode/auth.json~/.local/state/opencode/model.json
/home/amika/ with matching relative paths.
Sandbox lifecycle
Hosted sandboxes have two idle-timeout knobs that control when they stop and when they’re deleted:| Setting | Default | Range | Behavior |
|---|---|---|---|
| Auto-stop interval | 30 minutes | 0–10080 (7 days) | Time of idleness before the sandbox is stopped. 0 disables auto-stop. |
| Auto-delete interval | Keep on stop | 0–10080 (7 days) | Time after stopping before the sandbox is deleted. The default keeps stopped sandboxes indefinitely. |
amika sandbox start <name>.
Auto-stop and auto-delete intervals are currently settable only when creating a sandbox through the web UI or by passing
auto_stop_interval / auto_delete_interval to POST /api/sandboxes. There’s no CLI flag and no .amika/config.toml field for these yet.Reserved ports
Amika reserves container ports 60899–60999 (101 ports) for internal services that run inside sandboxes. User workloads and setup scripts should avoid binding to ports in this range.| Port | Service | Status |
|---|---|---|
| 60999 | amikad daemon | Reserved |
| 60998 | OpenCode web UI | Active |
| 60899–60997 | (unassigned, reserved for use) | Reserved |
AMIKA_OPENCODE_WEB is not set to 0. The port number is written to /run/amikad/opencode-web.port at startup.
Related docs
- Repository configuration —
.amika/config.tomland per-repo settings - Services — named service definitions with port mappings
- Presets — preset images and container layout