Settings
The Settings page is organised into tabs across the top and a section sidebar on the left. There is always a General tab, plus one tab per enabled module — Flights and Cruises — so flight-specific and cruise-specific options only appear when you use those modules.
Everything auto-saves as you change it: there’s no global “Save” button, just a small green “saved” strip at the bottom of each page.
Most settings are per-user (your own account). A few are
instance-wide and live behind the admin panel, visible only to users
with isAdmin: true.
General tab
Section titled “General tab”User Profile
Section titled “User Profile”- Username, contact info, profile picture — edit your account details and upload an avatar.
- Change password — current password + new password (8+ characters). There’s no second factor by default; use a password manager.
- Force password change on next login — used by admins when they reset another user’s password without seeing it.
Display & Language
Section titled “Display & Language”- Language — German (default) or English. Lives in your profile and follows you across browsers when you sign in elsewhere.
- Timezone and date / time formats — controlled centrally here.
- Theme — the app is dark by default.
Modules
Section titled “Modules”Enable or disable the travel modules (“domains”). Flights and Cruises are available today; Hotels and Places are marked soon and cannot be toggled on yet.
Enabled modules show up in navigation, dashboards, the map, achievements and statistics. Disabling a module only hides it — your data is preserved and comes back when you re-enable it. Disabling a module also removes its tab from this Settings page.
Units & Formats
Section titled “Units & Formats”Kilometres / miles, °C / °F, 12 h / 24 h. The dashboard, statistics and exports all respect these.
Notifications
Section titled “Notifications”Per-user email reminders before upcoming flights. Default: off — you have to opt in.
- Notification email — a separate address for reminder mails (often
you don’t want them on your admin mailbox but on
travel@…). Empty = reminders go to your account email. - 24 h reminder — a mail roughly 24 h before the next flight’s departure time (timezone-aware, resolved against the departure airport’s IANA timezone).
- 2 h reminder — a mail roughly 2 h before departure, handy for check-in / gate-change polling.
Reminders are best-effort: they depend on SMTP being configured by the admin, and a provider outage during the reminder window simply drops that reminder (there’s no backlog). Don’t rely on them for anything that absolutely must arrive on time.
Features
Section titled “Features”Optional per-user tracking toggles:
- Cost tracking — record and total the price of your trips.
- Aircraft registration tracking — capture the tail number per flight for registration-based statistics.
Backup & Sync
Section titled “Backup & Sync”- Schedule — cron expression, default daily at 02:00 UTC.
- Retention — how many backup files to keep before pruning.
- WebDAV / cloud sync — optional Nextcloud / HiDrive / Owncloud target so backups leave the host.
Import
Section titled “Import”Migrate your flight history from another logbook, or re-import a TravStats Excel export.
Automatic Updates
Section titled “Automatic Updates”Automatically fetch current flight data from the enrichment APIs during active flights. Fetched changes land in the Pending Updates area for review rather than being written straight to your log.
API Keys
Section titled “API Keys”Manage API keys for the external flight-data services. Keys the administrator has shared instance-wide are used automatically, so most users leave this empty. Keys you enter here override the shared ones for your account.
Devices
Section titled “Devices”Pair the TravStats mobile app (in the works — no release date yet) with your account. This section is new in 2.3.
- Connect new device mints a single-use pairing code and renders it as a QR code. The code is short-lived — it expires after 10 minutes, with a live countdown, and you can generate a fresh one.
- In the app, open Settings → Connect device and scan the QR. The app exchanges the code for a device-bound access token — you never type or copy a token by hand.
- The browser shows “connected” as soon as the phone claims the code.
Below the pairing panel, Connected devices lists every paired device with its platform icon, last-used time and IP. Sign out revokes that device’s token immediately.
Security notes:
- Pairing codes can only be minted from a browser session — an API token cannot mint one (this blocks a token from escalating itself into a fresh device token).
- The pairing code travels in the request body, never in a URL, so it never lands in access logs.
- Re-pairing the same physical device automatically revokes its previous token, so you don’t accumulate orphaned credentials.
- Pairing needs a public URL to be configured (Admin → instance settings). Without one, the panel shows a warning instead of a QR, because the app would have no address to reach the server on.
Once paired, the app can also sync your display preferences (units, formats and similar) to and from the server, so a re-paired or new device restores your settings automatically.
API Tokens (since v1.3.0)
Section titled “API Tokens (since v1.3.0)”Personal Access Tokens (PATs) for AI agents, scripts and external tools. To connect the mobile app, use Devices instead — that mints a device-bound token for you.
- Create — name + scope (
read,write,admin) + optional expiry. The plaintext token is shown once on creation; copy it then, you can’t view it again. - Format —
ts_pat_followed by a 64-character hex suffix. Stored as a bcrypt hash plus an indexed lookup hash; the plaintext never touches disk. - Use —
Authorization: Bearer ts_pat_…on any authenticated endpoint. - Scopes —
readblocks all mutations (POST/PUT/PATCH/DELETE → 403),writecovers normal CRUD,adminis required for every/admin/*endpoint even if your account hasisAdmin: true. - Revoke — instant. The token is rejected on the next request.
Token management is a browser-only surface: a PAT cannot list, create or revoke tokens, so a leaked token can’t mint itself a more powerful one.
OpenAPI spec: https://your-instance/api/v1/openapi.json. Swagger UI:
https://your-instance/api/v1/docs.
Administration (admin only)
Section titled “Administration (admin only)”Only visible if isAdmin: true. Opens the separate admin panel,
where all instance-level settings live so you never have to edit env vars
after install:
- Instance — name, public URL, maximum users, registration mode (public sign-up vs invite-only).
- External APIs — the shared flight-enrichment keys (AirLabs,
Aviationstack, OpenSky) and the Ollama URL + model for LLM-backed
parsing. Encrypted at rest with the auto-generated key under
/app/data/secrets/. - SMTP — host / port / TLS / credentials / from-address, with a test mail button. Used for invitations, password reset and flight reminders.
- Users — create / invite users, promote or demote admins, force a password change, delete a user (cascades to their flights, achievements and tokens).
- Audit log — every mutation as a row (who, when, what changed, prior value), filterable and CSV-exportable.
Version and build information for the running instance.
Flights tab
Section titled “Flights tab”- Home airport — your base airport, used in statistics (for example distance from home, or excluding returns home from layover stats).
- Default Values — new flights are pre-filled with these.
- Map Settings — base map, zoom and marker behaviour.
- Historical Enrichment — fills in missing flight data by aggregating reference flights that share the same flight number.
Cruises tab
Section titled “Cruises tab”- Cruise preferences — defaults for newly created cruises and how they render on the map.
Where each setting lives
Section titled “Where each setting lives”| Layer | Persisted in | Example |
|---|---|---|
| Per-user preferences | user_settings (Postgres) | Language, units, theme, module toggles |
| App-sync prefs | user_settings.app_prefs | The mobile app’s saved display preferences |
| API / device tokens | personal_access_tokens table | Hashed bcrypt + lookup hash, scope; device tokens also carry deviceId / platform |
| Pairing codes | pairing_codes table | SHA-256 of the code only, 10-minute expiry, single-use |
| Instance settings | instance_settings (Postgres) | Name, registration mode, max users |
| API keys / SMTP / Ollama | instance_settings (encrypted) | AES-encrypted with /app/data/secrets/encryption.key |
| Boot-time secrets | /app/data/secrets/ (file system) | jwt.secret, encryption.key |
The only env-vars TravStats reads at runtime are DATABASE_URL,
COOKIE_SECURE, CORS_ORIGIN, TZ, and OLLAMA_URL (the last only to
seed the default; admins can change it from the UI). Everything else is
in the database, which is what makes the data volume the only thing you
need to back up.