Configuration
Where loot keeps its settings and tokens, which environment variables exist, how server addresses are derived, what the exit codes mean and what helps when something goes wrong.
Configuration folder and files#
loot keeps its settings per user in a folder that it creates on the first loot login:
| System | Folder |
|---|---|
| Windows | %APPDATA%\LooT |
| Linux and macOS | $XDG_CONFIG_HOME/loot, otherwise ~/.config/loot |
| everywhere | the folder named by the environment variable LOOT_CONFIG_DIR, if it is set |
The folder holds two files:
| File | Content |
|---|---|
config.json | the server addresses and – when signed in as a service account – the client id and the path of the secret file |
tokens.bin | the sign-in tokens (Token storage) |
config.json is a plain JSON file with these keys; you do not have to edit it by hand, loot login writes it:
{
"authority": "https://auth.loot.example.org/realms/loot",
"nodeServerUrl": "https://api.loot.example.org",
"ingestServerUrl": "https://ingest.loot.example.org",
"queryServerUrl": "https://query.loot.example.org",
"analysisServerUrl": null,
"clientId": null,
"clientSecretFile": null
}As long as config.json is missing or incomplete, every command reports "Die Server-Adressen sind nicht konfiguriert" (the server addresses are not configured) and points to loot login. The easiest way to manage several installations or accounts is a folder of their own for each:
$ export LOOT_CONFIG_DIR=$HOME/.loot-test
$ loot login --server loot.example.orgEnvironment variables#
| Variable | Effect |
|---|---|
LOOT_CONFIG_DIR | Configuration folder (see above); takes precedence over all other locations |
XDG_CONFIG_HOME | on Linux and macOS the folder in which loot/ is created when LOOT_CONFIG_DIR is missing |
| freely chosen | loot values export --password-env <NAME> reads the password for the ZIP from the variable you name there (loot values export) |
loot reads no other environment variables; addresses and sign-in are controlled with loot login.
Derived server addresses#
A LooT installation consists of several services, each reachable under its own name. From one base address loot derives the others:
$ loot login --server loot.example.org| Service | Derived address | Used by |
|---|---|---|
Sign-in (Keycloak, realm loot) | https://auth.loot.example.org/realms/loot | loot login, every command (token) |
| Node server | https://api.loot.example.org | tenants, nodes, permissions, charts, dashboards, Exchange export and import, stack |
| Ingest server | https://ingest.loot.example.org | loot write, loot import, sources, devices |
| Query server | https://query.loot.example.org | loot query, loot live, loot values |
| Analysis service | https://analysis.loot.example.org | loot spectrum, loot forecast, loot ask |
| Component server | https://components.loot.example.org | loot component, loot library, loot run, loot script |
| Exchange server | https://exchange.loot.example.org | loot exchange target, job, run, runs, snapshots, store |
| Stack administration | same as the node server | loot stack |
Rules:
- The base address is just a server name (with a port if necessary), without a path:
loot.example.orgorloot.example.org:8443. Without a schemehttpsapplies.httpis allowed only forlocalhostand loopback addresses. - Analysis service, component server and Exchange server are derived from the address of the query server (
query.is replaced byanalysis.,components.orexchange.). If the query address does not start withquery., the address cannot be derived, and the commands that need it end with a notice and exit code 2. - Stack administration has no address of its own: it lives under the node server's address.
Overriding addresses#
If your installation deviates from the naming scheme, set the addresses individually. All values are saved and apply to the following calls:
Option of loot login | Overrides |
|---|---|
--authority <url> | Keycloak realm URL, e.g. https://auth.example.org/realms/loot |
--node-server <url> | Node server |
--ingest-server <url> | Ingest server |
--query-server <url> | Query server (and with it the addresses derived from it) |
--analysis-server <url> | Analysis service; derived from the query server if omitted |
$ loot login --authority https://sso.example.org/realms/loot --node-server https://loot-api.example.org --ingest-server https://loot-in.example.org --query-server https://query.example.orgFor a development environment there is loot login --dev, which sets the addresses of the local development setup (not for normal operation). Details of signing in are in Signing in.
Token storage#
After signing in, loot stores the tokens in tokens.bin so you do not have to sign in on every call. loot renews the access token itself as long as the session is valid.
- Windows: the file is encrypted with the Windows user account (DPAPI) and useless to other accounts.
- Linux and macOS: the file is readable only by your user account (file mode
0600). loot logoutends the session at the sign-in service and deletes the tokens.
When signed in as a service account (loot login --client-id … --client-secret-file …), loot stores no tokens but only the client id and the path of the secret file in config.json. Every call fetches a fresh token, so the sign-in never expires. Protect the secret file so that only the executing account can read it, and see Signing in for how to set up the service account.
Times and output formats#
- Timestamps appear in ISO 8601 in your local system time with offset, e.g.
2026-11-30T14:00:00.000000+01:00. The global option--utcswitches output and input to UTC and may appear anywhere on the line. Input with an offset (Z,+02:00) is taken as it is; input without an offset counts as local time (with--utcas UTC). The timestamps of a CSV file forloot import, by contrast, always count as UTC when they carry no offset. - Tables are the default output of lists. Columns are aligned with spaces.
- JSON:
--jsonprints the response as JSON instead of a table for many commands:loot query,loot spectrum,loot forecast,loot ask,loot values export,loot component list|get|runs,loot run get,loot workflow list|show,loot chart list,loot dashboard list,loot connection listandloot script list|show|versions. That suitsjqand other tools. - Value files:
loot values export --format csv|ndjsonwrites CSV (default) or NDJSON (loot values). - Standard output and error output are separate: results go to standard output, errors (
Fehler: …, German for "error") to the error output. In scripts you can use2>/dev/nullwithout losing results. - The messages of
lootare currently in German.
Exit codes#
| Code | Meaning |
|---|---|
0 | success |
1 | the server or the data rejected the request (missing rights, conflict, invalid input file, rejected values, failed run) |
2 | wrong invocation or missing configuration (unknown option, missing address, service cannot be derived) |
Commands that wait for an end (for example loot stack rollout, loot component start --wait, loot exchange import) return 0 only if the work ended successfully. In scripts, check the code with if loot …; then … or set -e.
Troubleshooting#
Sign-in problems#
| Message or symptom | Cause and remedy |
|---|---|
| "Die Server-Adressen sind nicht konfiguriert" (addresses not configured) | config.json is missing. Sign in with loot login --server loot.example.org; check that LOOT_CONFIG_DIR points to the right folder. |
| "Nicht angemeldet oder die Sitzung ist abgelaufen." (not signed in or session expired) | The session has ended (for example after a long break). Run loot login again. Service accounts do not expire; check the secret file and the client secret there. |
| "Der Code ist abgelaufen. Bitte erneut anmelden." (the code has expired) | The sign-in code was not confirmed in the browser in time. Repeat loot login and confirm the code right away. |
| "Dafür fehlt die Berechtigung." (no permission, 403) | Your account lacks the required right. Ask the tenant admin (Permissions); loot stack … and loot exchange store … are for system admins only. |
Certificates#
loot verifies the servers' certificates and offers no option to switch the check off. If it reports that the server cannot be reached although it works in the browser, the certificate is usually the reason: the operating system does not know the issuing authority (internal CA) or the certificate has expired. Install the certificate authority in the operating system's certificate store; on Linux the environment variable SSL_CERT_FILE can additionally point to a file with the trusted certificates. The exact error message of the system follows "Der Server ist nicht erreichbar." (the server cannot be reached).
Timeouts and slow sign-in#
- The first access to the sign-in service can take a good 20 seconds if
localhostresolves to an IPv6 address (::1) first and WSL does not forward the port. Use the address127.0.0.1or the real server name instead. - Transfers of large files (archives, blobs) may take up to 30 minutes, normal requests considerably less. If a large query times out, narrow the time range or use
loot values export, which works in the background. - Long-running jobs such as imports (
loot exchange import) and deletions continue in the server even if you endlootwith Ctrl+C.loot exchange import-job getand the commands of the respective area show the state.
Service cannot be derived#
If loot exchange job …, loot component …, loot library …, loot run …, loot script … or loot spectrum end with a notice about a missing server address and exit code 2, your query address does not start with query. (see Derived server addresses). Map the services to the naming scheme or ask your operator for the addresses. For the analysis service you can set --analysis-server.
Commands in the workbench console#
The workbench console runs the same commands without file access. Commands with file arguments or file output (loot upload, loot download, loot import, loot stream download, loot exchange export, loot exchange verify, loot exchange store download, loot values export, loot stack pull, options such as --file, --output, --map) are blocked there. Use loot on your own computer for these.