docs/configuration.mdx
microsandbox reads its global configuration from ~/.microsandbox/config.json. All fields are optional. A missing file or empty JSON object is equivalent to using the defaults.
| Field | Default | Description |
|---|---|---|
home | ~/.microsandbox | Root directory for all microsandbox data |
log_level | null (silent) | Log level for sandbox processes: error, warn, info, debug, trace |
database | reference | Database connection settings |
paths | reference | Path overrides for binaries and directories |
sandbox_defaults | reference | Defaults applied to every sandbox |
registries | reference | Container registry authentication |
database| Field | Default | Description |
|---|---|---|
url | null | Database URL. Uses SQLite under home when null |
max_connections | 5 | Maximum connection pool size |
connect_timeout_secs | 30 | Timeout when acquiring a database connection from the pool |
pathsAll path fields are optional. When null, they resolve relative to home.
| Field | Default | Description |
|---|---|---|
msb | {home}/bin/msb | msb binary. Resolved via: MSB_PATH env, this field, default path, PATH |
libkrunfw | {home}/lib/libkrunfw | Path to a custom VM kernel (.so on Linux, .dylib on macOS) |
cache | {home}/cache | Image layer cache |
sandboxes | {home}/sandboxes | Per-sandbox state |
volumes | {home}/volumes | Named volumes |
logs | {home}/logs | Sandbox logs |
secrets | {home}/secrets | Secrets. Registry secrets live under secrets/registries/ |
sandbox_defaultsDefaults applied to every sandbox unless overridden per-sandbox.
| Field | Default | Description |
|---|---|---|
cpus | 1 | Number of vCPUs |
memory_mib | 512 | Guest memory in MiB |
shell | "/bin/sh" | Shell for interactive sessions and scripts |
workdir | null | Working directory inside the sandbox |
registriesregistries.authA map of registry hostnames to authentication entries. Each entry specifies a username and exactly one credential source.
{
"registries": {
"auth": {
"ghcr.io": {
"username": "octocat",
"store": "keyring"
}
}
}
}
| Field | Required | Description |
|---|---|---|
username | Yes | Registry username |
store | No | Credential store. Only "keyring" is supported (macOS Keychain, Windows Credential Manager, Linux Secret Service) |
password_env | No | Environment variable containing the password or token |
secret_name | No | Filename under {home}/secrets/registries/ containing the password or token |
When pulling from a registry, credentials are resolved in this order:
.registry_auth() on the sandbox buildermsb registry loginregistries.auth entries in config.json~/.docker/config.json credential helpers