~/.microsandbox/config.json. All fields are optional. A missing file or empty JSON object is equivalent to using the defaults.
Full example
Full example
Top-level fields
database
paths
All path fields are optional. When null, they resolve relative to home.
On Windows, the default home is %USERPROFILE%\.microsandbox. JSON strings can use escaped backslashes such as "C:\\Users\\you\\.microsandbox\\lib\\libkrunfw.dll" or forward slashes such as "C:/Users/you/.microsandbox/lib/libkrunfw.dll".
Rust SDK path helpers
Rust callers can inspect the active local config and resolve runtime paths with the same precedence used by sandbox startup.microsandbox::config::config() uses the active default backend and returns Unsupported when that backend is cloud.
LocalBackend has two plain constructors alongside the builder. LocalBackend::lazy() is synchronous and defers opening (and migrating) the local sandbox database until the first operation; it is what backend resolution uses when no backend is set explicitly. LocalBackend::new().await? opens the database up front, so startup fails fast if the database is unusable.
sandbox_defaults
Defaults applied to every sandbox unless overridden per-sandbox.
sandbox_defaults.oci
Defaults applied only when the sandbox rootfs is an OCI image.
registries
registries.hosts
A map of registry hostnames to settings. Each host entry can mark the registry as insecure (plain HTTP) and can include an auth entry. Each auth entry specifies a username and exactly one credential source.
Host entry fields
Auth entry fields
Exactly one of
store, password_env, or secret_name must be set per entry. Setting none or more than one is an error.Auth resolution order
When pulling from a registry, microsandbox resolves credentials in this order:- Explicit SDK auth via
.registry(|r| r.auth(...))on the sandbox builder - OS keyring entries created by
msb registry login - Config file
registries.hosts.<host>.authentries inconfig.json - Docker config
~/.docker/config.jsoncredential helpers - Anonymous (no authentication)
metrics
profiles
Named backend profiles keyed by profile name; active_profile selects the default. How profiles participate in backend selection, including the full resolution order, is documented in Backends.
Supported credential references for
api_key_ref: