Skip to content
COMA

Environment variables

Every environment variable COMA reads, what it changes and its default.

Settings resolve in this order, later winning: built-in defaults, the config file, environment variables, then flags. coma doctor --json shows the paths COMA resolved.

COMA variables

VariableEffectDefault
COMA_HOMEKeeps all of COMA's local files in this directory (see Files)Per-OS locations
COMA_CONFIGPath of the config file. Only the config file moves. --config winsSee Files
COMA_CONTEXTThe COMA context to use. --context winsThe config file's current context
COMA_NO_COLORAny non-empty value turns colour off, like --no-colorColour on a terminal
COMA_NO_INPUTAny non-empty value forbids prompts, like --no-inputPrompts allowed on a terminal
COMA_NON_INTERACTIVESame as COMA_NO_INPUT
COMA_LOG_LEVELerror, warn, info, debug or trace. --quiet, --verbose, --debug and --trace winwarn
COMA_LOG_FORMATtext or json. --log-format winstext
COMA_SYNC_ALLOW_BIDIRECTIONAL1 or true lets a coma.yaml use bidirectional sync; 0 or false forbids it. Overrides sync.allowBidirectional in the config fileNot allowed
COMA_SYNC_ENGINEbuiltin makes comad sync with COMA's own engine instead of MutagenMutagen, through coma-sync
COMA_SYNC_HELPERPath of the coma-sync helperNext to coma, then ../lib/coma/coma-sync relative to it
COMA_LOCAL_ENGINESoff stops comad watching local engines for fallback; a colon-separated list of socket paths replaces the default listDocker Desktop, Podman machine, rootless Podman, Colima, OrbStack, /var/run/docker.sock

An invalid value for COMA_LOG_LEVEL, COMA_LOG_FORMAT or COMA_SYNC_ALLOW_BIDIRECTIONAL fails the command with invalid_argument (exit 2).

COMA_SYNC_ENGINE, COMA_SYNC_HELPER and COMA_LOCAL_ENGINES are read by comad, which takes its environment from the coma command that starts it. Set them before comad starts, or run coma daemon stop and connect again.

The built-in sync engine never deletes files on the machine, cannot report conflicts and polls for changes. The one-way-mirror and bidirectional sync modes need Mutagen.

Colour and terminals

VariableEffect
NO_COLORAny non-empty value turns colour off
FORCE_COLORAny non-empty value forces colour. NO_COLOR and COMA_NO_COLOR win if also set
TERMTERM=dumb turns colour off. coma docker and coma podman pass TERM to the machine for interactive commands (default xterm-256color)

Output that is not a terminal, and all --json output, has no colour.

Standard variables COMA reads

VariableUsed for
HOMEDefault file locations, ~/.ssh keys and Docker's config directory
XDG_CONFIG_HOME, XDG_STATE_HOME, XDG_CACHE_HOME, XDG_RUNTIME_DIRFile locations on Linux, when set to absolute paths
DOCKER_CONFIGWhere COMA writes the coma Docker context, as the Docker CLI does. Default ~/.docker
SSH_AUTH_SOCKSSH keys held by ssh-agent
USERThe SSH user when neither the machine's address nor ~/.ssh/config names one
SHELLThe default syntax of coma endpoint env
PATHFinding docker-compose and credential helpers for coma doctor and coma connect

coma connect also warns when DOCKER_HOST or DOCKER_CONTEXT is set, and, for a Podman engine, CONTAINER_HOST or CONTAINER_CONNECTION: each overrides the default that connect switches. coma endpoint env prints commands that set them. See Tools that ignore Docker contexts.

Files

FileCOMA_HOME setmacOSLinux
Config$COMA_HOME/config.yaml~/Library/Application Support/coma/config.yaml$XDG_CONFIG_HOME/coma/config.yaml
State database, known_hosts$COMA_HOME/~/Library/Application Support/coma/$XDG_STATE_HOME/coma/
Logs$COMA_HOME/logs/~/Library/Logs/coma/$XDG_STATE_HOME/coma/logs/
Cache$COMA_HOME/cache/~/Library/Caches/coma/$XDG_CACHE_HOME/coma/
Sockets$COMA_HOME/run/~/.coma/run/$XDG_RUNTIME_DIR/coma/

On Linux, unset XDG variables fall back to ~/.config, ~/.local/state and ~/.cache, and the socket directory to ~/.coma/run. When the socket directory's path is too long for Unix sockets, COMA uses a short directory under /tmp/coma-<uid>/ instead.

Tests and experiments can use a throwaway home:

COMA_HOME=$(mktemp -d) coma doctor

On this page