Configuration
Fret has two levels of configuration:
- startup options, read once when Fret starts: addresses, folders, authentication, logs. They are
set with environment variables or options of
fret serve, and need a restart to change; - everything else (doors, gauge, dock hours, accounts, collection, unpacking…), stored in the database and changed live in Settings or through the API.
Startup options
Section titled “Startup options”| Variable | Option | Default | Docker image | Purpose |
|---|---|---|---|---|
FRET_ADDR |
-addr |
:8080 |
:8080 |
Address of the interface and the API |
FRET_COLLECT_ADDR |
-collect-addr |
127.0.0.1:9666 |
:9666 |
Address of collection; off to disable it |
FRET_DATA_DIR |
-data-dir |
./data |
/data |
Folder of the database and the encryption key |
FRET_DOWNLOAD_DIR |
-download-dir |
./downloads |
/downloads |
The warehouse: root of every download |
FRET_AUTH |
-auth |
password |
password |
password, or none behind an authenticating proxy |
FRET_LOG_LEVEL |
-log-level |
info |
info |
debug, info, warn or error |
FRET_LOG_FORMAT |
-log-format |
text |
text |
text or json |
TZ |
system | UTC | Time zone of the dock hours, such as Europe/Paris |
An option given to fret serve wins over its environment variable:
FRET_ADDR=:9000 fret serve -addr :7000 # listens on :7000An invalid value (FRET_AUTH=ldap, FRET_LOG_LEVEL=chatty) stops Fret at startup with a message that
names the option.
Addresses
Section titled “Addresses”An address is host:port. :8080 listens on every interface; 127.0.0.1:8080 only on the machine
itself, which is what you want behind a reverse proxy on the same host.
Folders
Section titled “Folders”Fret creates both folders if they do not exist. The data folder must be writable, otherwise Fret stops at startup. What it holds is described in Backup and restore.
Authentication
Section titled “Authentication”password(default): a single password, chosen on the first visit, protects the interface and the API. Scripts use API tokens.none: no sign-in at all. Only use it when a reverse proxy in front of Fret authenticates every request, and Fret cannot be reached any other way. See Security.
Fret writes its logs to the standard error output: docker logs fret, or journalctl -u fret with
systemd. debug details every request and every decision of the dock; json suits log collectors.
Logs may contain file names and links: check them before sharing them in a bug report.
Development option
Section titled “Development option”FRET_DEV_CORS (-dev-cors) allows the development server of the interface (make dev-web, on
http://localhost:5173) to call the API. Leave it empty in production. See
Development.
Live settings
Section titled “Live settings”| Setting | Where | Default |
|---|---|---|
| Dock doors | Settings › Dock doors | 3 |
| Segments per parcel | Settings › Dock doors | 4 |
| Gauge | Settings › Gauge | No limit |
| Dock open | Dock band, Settings | Open |
| Dock hours | Settings › Dock hours | None |
| Store delivered shipments | Settings › Warehouse | After 24 hours |
| Collection | Settings › Collection and unpacking | On, with confirmation |
| Unpacking | Settings › Collection and unpacking | Automatic, archives kept |
| Accounts | Carriers | None |
They are also available through the API: GET and PUT on /settings/queue, /settings/unpack and
/settings/collect. See the API reference.