Skip to main content
mesa is configured through environment variables. Config files are deprecated and will stop being read in a future release — see Config file (deprecated) below for migration.

Required

VariableDescription
MESA_API_KEYAPI key for authenticating with Mesa.
MESA_ORGOrganization name to mount.

Optional

VariableDescription
MESA_MOUNT_POINTPath where repos are mounted (default: ~/.local/share/mesa/mnt).
MESA_REPO_REVSPer-repo revision pins, comma-separated: org/repo=bookmark:<name> or org/repo=change-id:<hex>.
MESA_MESAIGNORE_PATHPath to a global .mesaignore file. See .mesaignore.
MESA_CACHE_ENABLEDEnable the disk cache (true/false, default: true).
MESA_CACHE_MAX_SIZEMaximum disk cache size (e.g. 1GB).
MESA_CACHE_MAX_MEMORY_SIZEMaximum in-memory cache size (e.g. 256MB).
MESA_CACHE_PATHPath for the disk cache.
MESA_DAEMON_LOG_FILEFile path for daemon log output (default: stdout).
MESA_DAEMON_LOG_COLORLog color mode: auto, always, or never.
MESA_PREFETCH_ENABLEDEnable speculative prefetching (true/false).
MESA_PREFETCH_MAX_DEPTHMaximum directory depth the prefetcher walks.
MESA_PREFETCH_MAX_CONCURRENCYMaximum concurrent prefetch requests.
MESA_PREFETCH_CACHE_PRESSURE_LIMITFraction of cache budget at which prefetching backs off (0.01.0).
MESA_TELEMETRYEnable telemetry (true/false).
MESA_TELEMETRY_COLLECTOR_URLOpenTelemetry collector URL for trace export.
MESA_RUNTIME_DIRDirectory for runtime state (PID file, RPC socket).
MESA_NO_CONFIG_FILESkip reading any (deprecated) config file, even at a default search path. Recommended for sandboxes and other hermetic environments.
MESA_SERVICE_DOMAINCustom service domain for self-hosted Mesa.
MESA_UID / MESA_GIDPOSIX owner of the mounted filesystem.

Daemon mode

Run mesa mount as a background daemon:
mesa mount --daemonize
Log output goes to stdout by default. Redirect it to a file with MESA_DAEMON_LOG_FILE:
MESA_DAEMON_LOG_FILE=/var/log/mesa.log mesa mount --daemonize

Ignore rules

Set MESA_MESAIGNORE_PATH to a .mesaignore file to control which files are kept locally vs. uploaded to VCS. See .mesaignore for details.

Config file (deprecated)

TOML config files (config.toml and credentials.toml) are deprecated and will stop being read in a future release. They are never created anymore. When one is loaded, mesa logs a warning for every setting it contains, naming the environment variable to use instead.
An existing config file is still honored, searched for in the following locations (highest priority first), or at an explicit --config-path:
  • $XDG_CONFIG_HOME/mesa/config.toml (Linux only)
  • $HOME/.config/mesa/config.toml
  • /etc/mesa/config.toml
Environment variables always take precedence over config file values. Migrate each config key to its environment variable:
Config keyEnvironment variable
[organizations.<org>]MESA_ORG (+ MESA_API_KEY)
[organizations.<org>] mount = "explicit"None — explicit mounting is removed; every repo the API key can access is mounted. Scope the key to restrict access.
[organizations.<org>.repos.<repo>] rev = ...MESA_REPO_REVS
mount-pointMESA_MOUNT_POINT
service-domainMESA_SERVICE_DOMAIN
uid / gidMESA_UID / MESA_GID
[cache] enabledMESA_CACHE_ENABLED
[cache] max-sizeMESA_CACHE_MAX_SIZE
[cache] max-memory-sizeMESA_CACHE_MAX_MEMORY_SIZE
[cache] pathMESA_CACHE_PATH
[daemon] pid-fileMESA_RUNTIME_DIR (the PID file lives in the runtime directory)
[daemon.log] targetMESA_DAEMON_LOG_FILE
[daemon.log] colorMESA_DAEMON_LOG_COLOR
[telemetry] vendorMESA_TELEMETRY
[telemetry] collector-urlMESA_TELEMETRY_COLLECTOR_URL
[prefetch] *MESA_PREFETCH_*
credentials.toml api keysMESA_API_KEY
.mesaignore next to config.tomlMESA_MESAIGNORE_PATH