Config file locations
oms finds its config the same way from any directory — a shell, systemd, cron or
sudo — so you never have to cd somewhere first.
Search order
Section titled “Search order”The first file that exists wins:
$OMS_CONFIG, if set — used even if the file does not exist yet../oms.tomlin the current directory.~/.config/oms/oms.toml— or$XDG_CONFIG_HOME/oms/oms.tomlwhenXDG_CONFIG_HOMEis set./etc/oms/oms.toml— for a machine-wide install.
With none of them present, the OMS runs on built-in defaults. When it then cannot reach its database, the error lists every location it searched.
Where oms init writes
Section titled “Where oms init writes”oms init writes to $OMS_CONFIG if set, otherwise to the per-user location,
~/.config/oms/oms.toml, creating the directory with mode 0700 and the file with mode
0600.
It never writes /etc/oms/oms.toml — that needs root. For a machine-wide install, run
oms init as usual and move the file there yourself:
sudo mkdir -p /etc/omssudo mv ~/.config/oms/oms.toml /etc/oms/oms.tomlMake sure the user the OMS runs as can read it, and nobody else can.
oms init refuses to run when a config already exists in any of the searched
locations, so you can never end up with two files holding different master keys.
.env files
Section titled “.env files”Environment variables can be kept in a .env file (KEY=value lines). Two are loaded:
./.envin the current directory;- the
.envnext to the config file found above — e.g.~/.config/oms/.env.
Neither overrides a variable already set in the real environment, and ./.env wins over
the one beside the config.
Use it for settings with no oms.toml key, such as OMS_OIDC_CLIENT_SECRET or
OMS_SYNC_ON_BOOT — see the reference.