Configuration
Where each value comes from — variables, the config file, what an admin sets — and which ones need a restart.
Everything has a default, so a Fontego runs without any configuration. Values come from three places.
The server's config
FONTEGO_* environment variables, or a TOML file whose path is in FONTEGO_CONFIG. A variable wins over the same key
in the file. The server reference has the file with every key, commented.
What the server needs before it starts lives only here, and a change needs a restart:
- where it listens (
host,port) and its public address (publicUrl); - the data folder (
dataDir); - where workspaces are stored (
[storage]; onlydiskexists for now) and how people sign in ([identity]; onlylocal, accounts with a password); - the file policy (
[policy]: the size limit and blocking secrets); - your own templates (
templatesDir), the proxy's header with the caller's address (clientIpHeader), Git imports from private networks ([import]) and the backups check ([backups]).
A bad value stops the server at start, with a message that doesn't print the value.
Settings
The visible name, mail, how long sessions last and the default protected and rejected paths are settings: a server admin can change them while the server runs, from the web app or with the CLI, and the change applies at once.
fontego admin settings # every setting, its value and where it comes from
fontego admin settings set displayName "Our team"
fontego admin settings reset displayName # back to the config's value or the defaultEach setting takes its value from the first place that has one:
- The server's config. A setting in the config (its variable, or its key in the file) is pinned: it wins, and admins can't change it.
- What an admin set, kept in the database.
- The default.
So a deployment can fix some values for good (say, its SMTP server) and leave the rest to its admins. The settings table lists each one with its default, its variable and its key in the file.
The SMTP password can be set, never read back. FONTEGO_SMTP_PASSWORD_FILE (or passwordFile in [smtp]) reads it
from a file, so it stays out of the database and the environment.