Configuration Reference#

Configure your agent’s isolated environment. Each setting controls what the container can access — from filesystem mounts to network rules — so you stay in control while your agent works freely.

Overview#

Alcatraz uses TOML format for configuration. The configuration file should be named .alca.toml and placed in your project root.

Field Reference#

FieldTypeRequiredDefaultDescription
extendsarrayNo[]Config files to extend (declaring file wins)
includesarrayNo[]Config files to include (included files win)
imagestringYes-Container image to use
workdirstringNo"/workspace"Working directory inside container
workdir_excludearrayNo[]Patterns to exclude from workdir mount
runtimestringNo"auto"Runtime selection mode
commands.upstring or objectNo-Setup command (run once on container creation)
commands.enterstring or objectNo"[ -f flake.nix ] && exec nix develop"Entry command (run on each shell entry)
mountsarrayNo[]Additional mount points
resources.memorystringNo-Memory limit (e.g., “4g”, “512m”)
resources.cpusintNo-CPU limit (e.g., 2, 4)
envstableNoSee belowEnvironment variables for the container
network.lan-accessarrayNo[]LAN access configuration
capsarray/tableNoSee belowContainer Linux capabilities configuration

Full Example#

# Container image
image = "nixos/nix"

# Working directory inside container
workdir = "/workspace"

# Runtime selection: auto, docker, or podman
runtime = "auto"

# Lifecycle commands
[commands]
up = "nix-channel --update"
enter = "[ -f flake.nix ] && exec nix develop"

# Additional mounts
mounts = [
  "~/.gitconfig:/root/.gitconfig:ro",
  "~/.ssh:/root/.ssh:ro"
]

# Resource limits
[resources]
memory = "16g"
cpus = 8

# Environment variables
[envs]
NIXPKGS_ALLOW_UNFREE = "1"
EDITOR = { value = "${EDITOR}", override_on_enter = true }

# Network configuration
[network]
# lan-access = ["*"]  # Uncomment to allow LAN access (blocked by default)