Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

Update the admin notifications, MCP, releases, audit and backup wiki pages

Mauricebc385f27ddfd
diff --git a/wiki/Admin-GitHub-Releases.md b/wiki/Admin-GitHub-Releases.md
index 08288879a..b261b05de 100644
--- a/wiki/Admin-GitHub-Releases.md
+++ b/wiki/Admin-GitHub-Releases.md
@@ -19,7 +19,7 @@ The **About** card at the top of the tab holds six tiles that link to external r
## Release timeline
-Below it, the **Release History** card holds a chronological timeline lists GitHub releases for the `liketrek/TREK` repository. Each entry shows:
+Below it, the **Release History** card ("Latest updates from liketrek/TREK", with a GitHub button in its head) holds a chronological timeline of GitHub releases for the `liketrek/TREK` repository. Each entry shows:
- **Version tag** (e.g., `v2.9.14`)
- A **Latest** badge on the first (most recent) entry in the displayed list, and a **Pre-release** badge on pre-releases
@@ -28,7 +28,7 @@ Below it, the **Release History** card holds a chronological timeline lists GitH
Pre-release entries are hidden unless the server has both found a newer version and is itself running a pre-release. In every other case, including a pre-release install that is already on the newest pre-release, the timeline shows stable releases only.
-Releases load 10 at a time. Click **Load more** at the bottom of the timeline to fetch additional pages.
+Releases load 10 at a time. Click **Load more** at the bottom of the timeline to fetch additional pages. While pre-releases are hidden, one load may read up to five pages so that it does not come back empty when the newest releases are all pre-releases.
If the admin API request fails, the card shows **Failed to load releases**. If the server cannot reach the GitHub API, the timeline displays no releases (the server returns an empty list rather than an error).
@@ -40,7 +40,7 @@ Results are cached for 5 minutes to avoid repeated API calls.
## Release notes notice
-After an update, every user is shown a **release notes** notice once: a modal on the desktop with what the release brought (three headline cards), a note from the maintainer, the support links and a **Release notes** link to the release on GitHub. Closing it keeps it closed for the version that is running; the next version brings it back once, a patch release included. It replaces the 4.0.0 notice. There is no switch for it in the admin panel.
+After an update, every user is shown a **release notes** notice once: a modal on the desktop with what the release brought (a few headline cards), a note from the maintainer, the support links and a **Release notes** link to the release on GitHub. Closing it keeps it closed for the version that is running; the next version brings it back once, a patch release included. There is no switch for it in the admin panel. The phone has its own onboarding instead.
## When to check
diff --git a/wiki/Admin-MCP-Tokens.md b/wiki/Admin-MCP-Tokens.md
index d2bdabdc4..c1a0b7f7b 100644
--- a/wiki/Admin-MCP-Tokens.md
+++ b/wiki/Admin-MCP-Tokens.md
@@ -2,7 +2,7 @@
The **MCP Access** tab (in the **Integrations** group of the admin side navigation) shows all active MCP OAuth sessions and API tokens across every user on the instance. As an admin you can revoke sessions and delete tokens.
-This panel is only visible when the **MCP addon** is enabled in the [Admin-Addons](Admin-Addons) panel.
+This panel is only visible when the **MCP** addon is enabled. MCP is one of the three switches in the **AI** tile on the **Integration** card of the [Admin-Addons](Admin-Addons#the-ai-tile) tab. The phone admin has the same lists in its **MCP Access** section.
![MCP Access](assets/MCPAccess.png)
diff --git a/wiki/Admin-Notifications.md b/wiki/Admin-Notifications.md
index b0df02597..638a2acd9 100644
--- a/wiki/Admin-Notifications.md
+++ b/wiki/Admin-Notifications.md
@@ -44,11 +44,13 @@ In-app notifications are always active and cannot be switched off for the whole
### Trip Reminders
-Sends a reminder notification before a trip starts, to trips that have reminder days set. **On by default.** The check runs once a day and picks trips that start exactly that many days later. When it is off, the reminder section of a trip is greyed out with a note that reminders are disabled. See [Creating-a-Trip](Creating-a-Trip).
+Sends a reminder notification before a trip starts, to trips that have reminder days set. **On by default.** The check runs once a day at 09:00 server time. It reminds a trip once the reminder day has come and the trip has not started; a day the server was down is caught up on the next run, and a trip moved to a new start date is reminded again. When it is off, the reminder section of a trip is greyed out with a note that reminders are disabled. See [Creating-a-Trip](Creating-a-Trip).
+
+The same run at 09:00 also sends the **to-do due** reminders for unchecked to-dos that fall due within the next three days. They have no switch of their own here; each user decides in their notification settings whether to receive them.
## Admin alerts
-Admin-only notifications, such as a new TREK version or a failed write to a storage replica, go to the admin's own targets. These are separate from the users' webhooks and topics.
+Admin-only notifications, such as a new TREK version, a failed write to a storage replica or a request for paddle water data, go to the admin's own targets. These are separate from the users' webhooks and topics.
### Admin Webhook
@@ -66,7 +68,7 @@ An ntfy topic used only for admin notifications. It always fires when a topic is
### Notifications
-The matrix under the admin targets sets which channels deliver each admin-only event: **New version available** and **Storage replica failure**. Columns appear only for channels that can reach the admin: **In-App** always, **Email** once SMTP is configured, **Webhook** once an admin webhook URL is saved, **Ntfy** once an admin topic is saved. Every cell is a switch, on by default, and saves at once. A dash means that event cannot go out on that channel. Admin alerts are never sent as Web Push.
+The matrix under the admin targets sets which channels deliver each admin-only event: **New version available**, **Storage replica failure** and **Paddle region requested** (sent when a paddle region waits for your decision, see [Admin-Addons](Admin-Addons#paddle-water-data)). Columns appear only for channels that can reach the admin: **In-App** always, **Email** once SMTP is configured, **Webhook** once an admin webhook URL is saved, **Ntfy** once an admin topic is saved. Every cell is a switch, on by default, and saves at once. A dash means that event cannot go out on that channel. Admin alerts are never sent as Web Push.
## Defaults for users
@@ -82,10 +84,14 @@ Each cell is a pill that cycles through three states when clicked, and saves at
A default applies to every user who has not changed that cell themselves, including users who joined before you set it, so a later change reaches them too. A cell a user switched keeps the user's choice, unless you block it. The events themselves are listed in [Notifications](Notifications#notification-events).
+## On a phone
+
+The phone admin has the same settings in its **Notifications** section: the channels, the admin targets and alerts, and the **Defaults for users** matrix.
+
## See also
-- [Notifications](Notifications) - the per-user side: channels, events, webhook and ntfy setup, Web Push
-- [Admin-Panel-Overview](Admin-Panel-Overview) - all admin tabs
-- [Environment-Variables](Environment-Variables) - SMTP and Web Push variables
-- [Creating-a-Trip](Creating-a-Trip) - setting a trip's reminder
-- [Admin-Storage](Admin-Storage) - storage replicas and their failure alerts
+- [Notifications](Notifications): the per-user side: channels, events, webhook and ntfy setup, Web Push
+- [Admin-Panel-Overview](Admin-Panel-Overview): all admin tabs
+- [Environment-Variables](Environment-Variables): SMTP and Web Push variables
+- [Creating-a-Trip](Creating-a-Trip): setting a trip's reminder
+- [Admin-Storage](Admin-Storage): storage replicas and their failure alerts
diff --git a/wiki/Audit-Log.md b/wiki/Audit-Log.md
index 8a32f4001..05b71b10b 100644
--- a/wiki/Audit-Log.md
+++ b/wiki/Audit-Log.md
@@ -26,7 +26,7 @@ Actions are grouped by area below. The **Action key** is the raw value stored in
| `user.password_reset_success` | Password reset completed |
| `user.password_reset_fail` | Password reset attempt rejected (`reason` in details) |
-A request for an account that can actually be reset writes **two** rows: one with `delivered: "pending"` when the mail is handed off, one with the delivery result. Every other outcome writes a single row carrying a `reason` instead — `no_user`, `oidc_only`, `throttled_per_email` or `password_login_disabled`. Passkey logins are not a separate key: they land as `user.login` with `method: passkey` in the details, and SSO logins the same way with `method: oidc`. An account created by a first SSO login also writes `user.register` with `method: oidc`, carrying the same fields as a password signup.
+A request for an account that can actually be reset writes **two** rows: one with `delivered: "pending"` when the mail is handed off, one with the delivery result. Every other outcome writes a single row carrying a `reason` instead: `no_user`, `oidc_only`, `throttled_per_email` or `password_login_disabled`. Passkey logins are not a separate key: they land as `user.login` with `method: passkey` in the details, and SSO logins the same way with `method: oidc`. An account created by a first SSO login also writes `user.register` with `method: oidc`, carrying the same fields as a password signup.
### MFA
@@ -50,7 +50,7 @@ Logging out writes no row, and neither do the sessions a password change, a rese
|---|---|
| `user.passkey_register` | Passkey enrolled |
| `user.passkey_delete` | Passkey removed (resource = the passkey's numeric ID) |
-| `user.passkey_clone_suspected` | A passkey presented a signature counter that did not advance — a possible cloned authenticator. That assertion is rejected, the credential stays enabled |
+| `user.passkey_clone_suspected` | A passkey presented a signature counter that did not advance; a possible cloned authenticator. That assertion is rejected, the credential stays enabled |
### SSO
@@ -69,7 +69,7 @@ Logging out writes no row, and neither do the sessions a password change, a rese
| `trip.transfer_ownership` | Trip ownership transferred (includes the trip title and both owner emails) |
| `trip.invite_link_create` | Trip invite link created or rotated (a trip has one link, so creating it again replaces the previous token) |
| `trip.invite_link_delete` | Trip invite link revoked |
-| `trip.invite_link_join` | An invite link was accepted (`joined` in details). The row is written even when nobody was added — the trip owner or an existing member opening the link logs `joined: false` |
+| `trip.invite_link_join` | An invite link was accepted (`joined` in details). The row is written even when nobody was added; the trip owner or an existing member opening the link logs `joined: false` |
### Admin actions
@@ -110,6 +110,15 @@ Logging out writes no row, and neither do the sessions a password change, a rese
| `admin.storage_stats_refresh` | Storage usage stats recomputed |
| `admin.default_user_settings_update` | Default user settings updated |
| `admin.demo_baseline_save` | Demo baseline snapshot saved |
+| `admin.tours_wanderer` | The wanderer switch under Tours toggled |
+| `admin.tours_hiking_map` | The Hiking map (OpenHikingMap) switch under Tours toggled |
+| `admin.tours_cycle_map` | The Cycling map (CyclOSM) switch under Tours toggled |
+| `admin.tours_ski_routing` | The Piste router switch under Tours toggled |
+| `admin.paddle_region_add` | A paddle water region added |
+| `admin.paddle_region_remove` | A paddle water region removed |
+| `admin.paddle_region_refresh` | A paddle water region read again |
+| `admin.paddle_region_decline` | A requested paddle water region declined |
+| `admin.paddle_region_settings` | The automatic loading of paddle water regions changed (mode and size limit in details) |
### Settings
@@ -157,13 +166,21 @@ Logging out writes no row, and neither do the sessions a password change, a rese
| `airtrail.private_ip_configured` | AirTrail URL saved that resolves to a private IP |
| `dawarich.private_ip_configured` | Dawarich URL saved that resolves to a private IP |
| `dawarich.disconnected` | A user disconnected their Dawarich instance |
+| `wanderer.connected` | A user connected a wanderer instance (the address is recorded, never the token) |
+| `wanderer.updated` | A user changed their wanderer connection |
+| `wanderer.disconnected` | A user disconnected their wanderer instance |
+| `wanderer.watch_enabled` | A user switched on the background check of their imported wanderer trails |
+| `wanderer.watch_disabled` | A user switched it off again |
+| `ai.connection.saved` | An AI connection was saved, by a user or as the shared connection (`scope` and the provider `kind` in details) |
+| `ai.connection.removed` | An AI connection was removed |
+| `ai.settings.saved` | An admin saved the AI setup (who pays, daily limit, retention, web search) |
## Log columns
| Column | Description |
|---|---|
| Time | Timestamp of the action |
-| User | Username of the acting user, falling back to their email, then `#<user id>`. Unauthenticated events show `—` (the plain-text log file writes `anonymous` for those instead) |
+| User | Username of the acting user, falling back to their email, then `#<user id>`. Unauthenticated events show an empty placeholder (the plain-text log file writes `anonymous` for those instead) |
| Action | Action key (see tables above) |
| Resource | Affected resource (filename, trip ID, tool name, etc.) where applicable |
| IP | Client IP address |
@@ -171,13 +188,13 @@ Logging out writes no row, and neither do the sessions a password change, a rese
## Pagination
-The panel loads 100 entries at a time. Click **Load more** at the bottom to fetch the next page, or **Refresh** to reload from the newest entry. The count is shown above the table as `{loaded} loaded · {total} total`.
+The panel loads 100 entries at a time. Click **Load more** at the bottom to fetch the next page, or **Refresh** (in the head of the card) to reload from the newest entry. A pill in the head of the card shows the count as `{loaded} loaded, {total} total`. The phone admin shows the same log in its **Audit** section.
## IP addresses
The client IP is the one Express resolves after applying `TRUST_PROXY`, not whatever the `X-Forwarded-For` header happens to say. That distinction matters: the header is written by the caller, and an audit row an attacker can address to someone else's IP is worse than no row at all.
-`TRUST_PROXY` is **the number of proxy hops in front of TREK**, and it has to be accurate. With `TRUST_PROXY=1` (the default) TREK trusts exactly one hop, so a request that passed through two proxies is recorded as coming from the *outer* one — the Cloudflare edge in the example below, not nginx and not the real client. If your setup is Cloudflare in front of nginx in front of TREK, set `TRUST_PROXY=2`. Set it to `0` to trust nothing and always record the socket address.
+`TRUST_PROXY` is **the number of proxy hops in front of TREK**, and it has to be accurate. With `TRUST_PROXY=1` (the default) TREK trusts exactly one hop, so a request that passed through two proxies is recorded as coming from the *outer* one; the Cloudflare edge in the example below, not nginx and not the real client. If your setup is Cloudflare in front of nginx in front of TREK, set `TRUST_PROXY=2`. Set it to `0` to trust nothing and always record the socket address.
See [Environment-Variables](Environment-Variables).
@@ -195,7 +212,7 @@ Audit entries in the database are never automatically deleted. They accumulate a
## Plugin capability audit
-Separate from the instance audit log above, TREK keeps a dedicated **hash-chained capability audit** for installed plugins. Every host-mediated action a plugin takes — core-data reads, WebSocket broadcasts, notifications, AI calls, cross-plugin calls — is recorded at the point the plugin cannot reach, together with the acting user (bound by the host, never supplied by the plugin), the resource touched, and the outcome.
+Separate from the instance audit log above, TREK keeps a dedicated **hash-chained capability audit** for installed plugins. Every host-mediated action a plugin takes (core-data reads, WebSocket broadcasts, notifications, AI calls, cross-plugin calls) is recorded at the point the plugin cannot reach, together with the acting user (bound by the host, never supplied by the plugin), the resource touched, and the outcome.
Each plugin's entries form a per-plugin hash chain (`hash = sha256(previous_hash + row)`), so the log is tamper-evident: any altered or removed entry breaks the chain. Older rows are pruned per plugin once the row cap is reached (default 20,000 rows/plugin, tunable via `TREK_PLUGIN_AUDIT_MAX_ROWS`; `0` disables pruning). Pruning keeps the retained window verifiable.
diff --git a/wiki/Backups.md b/wiki/Backups.md
index 8255e0f4f..28f501abb 100644
--- a/wiki/Backups.md
+++ b/wiki/Backups.md
@@ -1,6 +1,6 @@
# Backups
-TREK stores all data in a single SQLite database (`travel.db`) plus an `uploads/` directory of attachments, cover photos, and avatars — by default; storage backends and replication are configured in [[Admin: Storage|Admin-Storage]]. The Backup panel lets you create, download, restore, and schedule backups of both.
+TREK stores all data in a single SQLite database (`travel.db`) plus an `uploads/` directory of attachments, cover photos, and avatars, by default; storage backends and replication are configured in [[Admin: Storage|Admin-Storage]]. The Backup panel lets you create, download, restore, and schedule backups of both.
## Where to find it
@@ -15,11 +15,11 @@ A backup is a ZIP archive with these entries:
| Entry | Contents |
|---|---|
| `travel.db` | The full SQLite database, as a consistent snapshot taken while TREK keeps running (writes during the backup cannot tear it) |
-| `uploads/` | All uploaded attachments, covers, and avatars (default location — see [Admin: Storage](Admin-Storage)) |
+| `uploads/` | All uploaded attachments, covers, and avatars (default location, see [Admin: Storage](Admin-Storage)) |
| `plugins-data/` | Each installed plugin's own database + files (present only if plugins are installed) |
| `plugins-code/` | The installed plugin code, so a restore is self-contained (dev-linked plugins are skipped) |
-**Also included:** the at-rest encryption key, unless you supply it through the `ENCRYPTION_KEY` environment variable — in that case the file is not the source of truth and is left out. Bundling it is what makes a backup restorable onto a different install, and it makes the ZIP as sensitive as the key itself: store and transfer it accordingly. See [Encryption-Key-Rotation](Encryption-Key-Rotation).
+**Also included:** the at-rest encryption key, unless you supply it through the `ENCRYPTION_KEY` environment variable; in that case the file is not the source of truth and is left out. Bundling it is what makes a backup restorable onto a different install, and it makes the ZIP as sensitive as the key itself: store and transfer it accordingly. See [Encryption-Key-Rotation](Encryption-Key-Rotation).
## Manual backup
@@ -36,12 +36,12 @@ You can restore from:
- **A stored backup**: click **Restore** next to any backup in the list.
- **An uploaded ZIP**: click **Upload Backup** and select a backup file from your computer (maximum upload size: 500 MB by default, configurable with the `BACKUP_UPLOAD_LIMIT_MB` environment variable; see [Environment-Variables](Environment-Variables)).
-A second limit caps the **decompressed** size of a restore archive at 5 GB by default (`BACKUP_MAX_DECOMPRESSED_MB`). It applies to both routes — a stored backup as well as an uploaded ZIP — and a restore that exceeds it is refused with `Backup exceeds the maximum decompressed size.` Raise it if your own backups legitimately grow past the default, otherwise they become unrestorable.
+A second limit caps the **decompressed** size of a restore archive at 5 GB by default (`BACKUP_MAX_DECOMPRESSED_MB`). It applies to both routes (a stored backup as well as an uploaded ZIP) and a restore that exceeds it is refused with `Backup exceeds the maximum decompressed size.` Raise it if your own backups legitimately grow past the default, otherwise they become unrestorable.
Before restoring, TREK runs integrity checks on the uploaded database:
-1. **SQLite `PRAGMA integrity_check`** — verifies the database file is not corrupt.
-2. **Required tables present** — confirms the file contains `users`, `trips`, `trip_members`, `places`, and `days`. Files missing any of these are rejected as not being a valid TREK backup.
+1. **SQLite `PRAGMA integrity_check`**: verifies the database file is not corrupt.
+2. **Required tables present**: confirms the file contains `users`, `trips`, `trip_members`, `places`, and `days`. Files missing any of these are rejected as not being a valid TREK backup.
3. **Not from a newer TREK**: a backup whose database a newer release migrated is refused with `This backup was made by a newer TREK version. Update TREK before restoring it.` Restoring it would leave this version unable to start.
The database being replaced is kept as `pre-restore-<time>.db` next to it (in `data/` on a standard install), so a restore of the wrong archive can be undone by hand. Delete these copies once you no longer need them.
@@ -52,7 +52,7 @@ Either way, TREK asks first in a **Restore Backup?** dialog that names the file,
> **Warning:** Restoring replaces all current data. Back up your current state first if you want to keep it.
-> **Plugins & restart:** `travel.db` and `uploads/` are swapped in immediately. Plugin data and code are **staged** beside the live trees and applied right away: the running plugins hold their databases open, so the restore asks the plugin runtime to shut them down and swaps the trees in the moment the handles are closed. If the runtime isn't up (plugins switched off, or a restore that happens during startup), the staged trees are applied at the next boot instead. Restart the server after restoring an instance that uses plugins — the plugins are stopped for the swap and stay down until the process restarts, and the bundled encryption key is only read at startup.
+> **Plugins & restart:** `travel.db` and `uploads/` are swapped in immediately. Plugin data and code are **staged** beside the live trees and applied right away: the running plugins hold their databases open, so the restore asks the plugin runtime to shut them down and swaps the trees in the moment the handles are closed. If the runtime isn't up (plugins switched off, or a restore that happens during startup), the staged trees are applied at the next boot instead. Restart the server after restoring an instance that uses plugins; the plugins are stopped for the swap and stay down until the process restarts, and the bundled encryption key is only read at startup.
### Restoring on a new install, before setup
@@ -84,13 +84,15 @@ Turn on **Enable auto-backup** in the **Auto-Backup** card of the Backup tab, pi
**Schedule** options (depend on interval):
-- **Run at hour**: time of day for daily, weekly, and monthly backups (0 to 23, server local time).
+- **Run at hour**: time of day for daily, weekly, and monthly backups (0 to 23, server local time). The hint under the field names the server's timezone and whether the list uses the 12h or the 24h format.
- **Day of week**: Sunday through Saturday (for weekly backups).
- **Day of month**: 1 to 28 (for monthly backups). Days 29 to 31 are excluded to avoid months with fewer days.
Auto-backup files are named `auto-backup-<timestamp>.zip` (manual backups use `backup-<timestamp>.zip`).
-After each auto-backup run, **auto-backup files** older than `keep_days` are pruned. Manual backups are never pruned — delete those yourself when you no longer need them. Set `keep_days` to `0` to disable pruning entirely.
+After each auto-backup run, **auto-backup files** older than `keep_days` are pruned. Manual backups are never pruned; delete those yourself when you no longer need them. Set `keep_days` to `0` to disable pruning entirely.
+
+The phone admin has the same lists and settings in its **Backup** section.
## Before updating TREK
@@ -112,7 +114,7 @@ The following actions are recorded in the [Audit-Log](Audit-Log):
## See also
-- [Admin: Storage](Admin-Storage) — replicate backups to S3-compatible storage
+- [Admin: Storage](Admin-Storage): replicate backups to S3-compatible storage
- [Encryption-Key-Rotation](Encryption-Key-Rotation)
- [Admin-Panel-Overview](Admin-Panel-Overview)
- [Security-Hardening](Security-Hardening)