Skip to content

Configuration

lasboltd takes settings from flags and from environment variables. This page groups the settings that matter by task. For every flag and its default, see the configuration reference and the lasboltd reference.

How settings work

  • Each flag has a variable. The name is LASBOLT_ and the flag name in upper case, with _ for -. Example: --data-dir is LASBOLT_DATA_DIR.
  • A flag wins over a variable.
  • A bad value stops the start with an error. The error text names the flag.
  • Time values use Go durations: 30s, 15m, 24h.
  • The server has no config file of its own and does not reload settings. Restart the service after a change.

The settings file

With systemd, keep the variables in an EnvironmentFile. The file has paths and addresses, no secrets:

LASBOLT_ADDR=127.0.0.1:8080
LASBOLT_DATA_DIR=/var/lib/lasbolt
LASBOLT_UNSEAL_PASSPHRASE_FILE=/etc/lasbolt/passphrase
LASBOLT_TRUSTED_PROXY=127.0.0.1/32
LASBOLT_PUBLIC_URL=https://vault.example.org
LASBOLT_CTL_SOCKET=/run/lasbolt/ctl.sock
LASBOLT_BACKUP_RECIPIENT=/etc/lasbolt/backup.key.pub

The commands lasboltd backup, lasboltd restore and lasboltd user read the same variables. To run them by hand, load the file first:

sudo -u lasbolt sh -c 'set -a; . /etc/lasbolt/lasboltd.env; set +a; exec lasboltd backup list'

Listen and data

FlagVariableDefaultUse
--addrLASBOLT_ADDR:8080Listen address. Use 127.0.0.1:8080 behind a proxy.
--data-dirLASBOLT_DATA_DIR./dataFolder of the database and the backups. Set an absolute path.
--public-urlLASBOLT_PUBLIC_URLnonePublic origin. It must start with https:// or http://.
--trusted-proxyLASBOLT_TRUSTED_PROXYnoneProxy ranges. See TLS and proxy.

Unseal and keys

FlagVariableDefaultUse
--key-providerLASBOLT_KEY_PROVIDERpassphrasepassphrase or file.
--unseal-passphrase-fileLASBOLT_UNSEAL_PASSPHRASE_FILEask on the terminalA file with the passphrase. Mode 0600.
--key-fileLASBOLT_KEY_FILEnoneA file with 32 raw bytes. For provider file.

See Sealing and keys.

Users and the control socket

FlagVariableDefaultUse
--ctl-socketLASBOLT_CTL_SOCKEToffPath of the socket for lasboltctl, for example /run/lasbolt/ctl.sock.
--allow-registrationLASBOLT_ALLOW_REGISTRATIONoffOld flag. It sets the registration to open once. See First owner and users.
--user-purge-intervalLASBOLT_USER_PURGE_INTERVAL1hHow often the job removes deleted accounts.

Backups

FlagVariableDefaultUse
--backup-intervalLASBOLT_BACKUP_INTERVAL24hTime between backups. 0 turns backups off.
--backup-keepLASBOLT_BACKUP_KEEP14Number of backups to keep. 0 keeps all.
--backup-dirLASBOLT_BACKUP_DIR<data-dir>/backupsFolder of the backups.
--backup-recipientLASBOLT_BACKUP_RECIPIENTnonePublic key file. Seals the backups.
--backup-identityLASBOLT_BACKUP_IDENTITYnonePrivate key file. For verify and restore only.

See Backups and restore.

Peer sync

FlagVariableDefaultUse
--peer-syncLASBOLT_PEER_SYNConoff turns the peer registry off.
--peer-udpLASBOLT_PEER_UDP7849UDP port that tells a device its public address. off closes it.
--peer-udp-publicLASBOLT_PEER_UDP_PUBLICthe bound portThe port that devices are told, if a NAT changes it.
--peer-stunLASBOLT_PEER_STUNnoneA public STUN server host:port. Repeat or separate by commas.
--peer-list-max-ageLASBOLT_PEER_LIST_MAX_AGE168hLongest age of a peer list on a device.

Settings for tests

These flags exist for tests: --http-read-timeout, --http-write-timeout, --sse-heartbeat, --sse-write-window, --device-poll-interval, --e2e-idle, --approval-wait. Do not change them on a real server. One exception is --e2e-idle (default 15m): it sets how long a browser tab keeps its end-to-end unlock without use.

Settings that you change in the app

Some settings live in the database and not in a flag. An owner or admin changes them in Settings › Organisation or with lasboltctl: the registration mode (closed, invite, open) and the invitations.

Last updated on