Client configuration¶
The SimDB command line client is configured through an INI-style file named
simdb.cfg. This page documents where that file lives, how settings are
resolved, and which options it understands. For the server’s app.cfg, see
Server configuration.
Where the configuration lives¶
SimDB reads up to two simdb.cfg files, plus environment variables:
Source |
Typical location |
Notes |
|---|---|---|
Site config |
system config directory for |
Optional, shared by all users on the machine. |
User config |
per-user config directory for |
Created automatically on first run. |
Environment |
|
To print the exact path of your user config file:
simdb config path
On Linux this is usually ~/.config/simdb/simdb.cfg; on macOS it is
~/Library/Application Support/simdb/simdb.cfg.
Important
On Linux and macOS the user config file must have 0600 permissions (read
and write for the owner only). SimDB refuses to start if the permissions are
wrong, because the file can contain authentication tokens. The CLI sets these
permissions for you when it writes the file; if you edit it by hand, run
chmod 600 "$(simdb config path)" afterwards.
How settings are resolved¶
Settings are applied in order, with later sources overriding earlier ones:
Environment variables (
SIMDB_*).The site config file.
The user config file.
Passing -c/--config-file FILE to simdb reads FILE instead of the site and
user files (environment variables still apply).
Managing configuration from the CLI¶
It is recommended to manage the file through the CLI rather than editing it by hand, so it always stays valid:
simdb config list # show all options
simdb config get user.email # read one option
simdb config set user.email me@example.org
simdb config delete user.email
Option names use dotted notation. A name like remote.iter.url maps to the
url option of the [remote "iter"] section. Tokens are masked in
simdb config list output.
Remotes have dedicated commands; prefer those over config set for remote
options. See Configure remotes.
Options¶
[user]¶
Option |
Description |
|---|---|
|
Your username, used as the default when authenticating to remotes. |
|
Your email address, used when registering as a watcher. |
[remote "NAME"]¶
One section per configured remote server. Manage these with
simdb remote config (see Configure remotes).
Option |
Description |
|---|---|
|
Base URL of the remote SimDB API. Required. |
|
|
|
Username to authenticate with for this remote. |
|
Authentication token, set by |
|
Firewall login type in front of the server, for example |
[db]¶
Option |
Description |
|---|---|
|
Path to the local SQLite catalogue. Defaults to |
[development]¶
Option |
Description |
|---|---|
|
|
Environment variables¶
Any configuration option can be set with an environment variable. Take the
dotted option name, replace dots with underscores, prefix with SIMDB_, and
uppercase it:
Option |
Environment variable |
|---|---|
|
|
|
|
SimDB also recognises these special variables:
Variable |
Effect |
|---|---|
|
Path to a config file to load (same as |
|
Override the location of the user config file. |
|
Override the location of the site config file. |
|
Path to a CA certificate bundle for verifying HTTPS connections to remotes. See Connect to ITER. |