Review findings on the place identities and trip list links: - The assistant offers PlacesLibraryMcp, PlaceIdentitiesMcp and TripCollectionsMcp with the collections group (done with the CI fix). - Undoing a merge restores the entries as they were: the merge logs, in its moved_link_ids JSON, each link it moved and each link it made with the use that link names, and whether the merged side became an own place only for the merge. The undo deletes what the merge made and moves the rest back, and only touches a link still in the leading place naming the same use, so a link id SQLite hands out again never moves someone else's link. The sweep counts a merge as spent by the same rule. Same unreleased migration, no schema change. - A use can be taken out of an own place by the user's own link row also once its trip or list is out of reach; the answer then holds no entry, and the place left can be merged again. - A dismissed duplicate is kept by one use of each side (an own place by its first link) and matched by the uses each entry holds, so it stays out when an entry becomes an own place or a merge is undone. - link() checks the named uses with one targeted read instead of reading every use of the user, and the library reads its rows in blocks of 500 ids. - Saved place reorders and the trip tags of a copy run one statement after the other again; a copy takes the first spelling of a tag name, as before. - Unlinking a list from a trip takes place_edit alone, so a link to a list the writer cannot open can be taken off; a member leaving or taken off the trip takes the links whose list nobody left on it can open. - The linked lists and their map places sort by lower(name), then by id, the same on both engines. - list_all_places names the own:<id> keys and identity_id (MCP and wiki); the undo, unlink and trip unlink descriptions say what they do now; README counts 451 tools.
Every part of your trip. One app you own.
TREK has grown from a travel planner into a whole ecosystem for trips: plan together in real time on a live map, build hikes, tours and road trips, keep bookings and shared costs in order, pack, write the journal, lay out the photo book and hand the busy work to the built-in AI. Self-hosted, on the web, on your phone and offline.
What you get
See all features
Most of what follows is an addon an admin switches on or off. Lists, Costs, Documents, Collab, Tours, Vacay and Atlas ship on; Journey, Collections, MCP, the AI assistant, AI Parsing, Road trip, Dawarich and AirTrail ship off and are marked below.
🧭 Planning
|
🥾 Tours
|
🧳 Bookings and money
|
👥 Collaboration
|
📔 Journey and TREK Studio
|
🗺️ Atlas, Vacay and Collections
|
🤖 AI assistant and MCP
|
🧩 Plugins
|
📱 Mobile and offline
|
⚙️ Admin, accounts and security
|
The place index with 88 million places, the address search and the planet-wide routing run on dataforest cloud in Frankfurt, free for every self-hosted TREK. Thank you! 💚
AI usage
We use LLM-assisted coding tools, and nothing ships that a maintainer has not read, reviewed, tested and can answer for. More in How we use AI in TREK.
Get started in 30 seconds
ENCRYPTION_KEY=$(openssl rand -hex 32) docker run -d --name trek -p 3000:3000 \
-e ENCRYPTION_KEY=$ENCRYPTION_KEY \
-e COOKIE_SECURE=false \
-v ./data:/app/data -v ./uploads:/app/uploads mauriceboe/trek
Open http://localhost:3000, or http://<server-ip>:3000 from another machine. On first boot TREK seeds an admin account — if you set ADMIN_EMAIL/ADMIN_PASSWORD those are used, otherwise the credentials are printed to the container log (docker logs trek).
COOKIE_SECURE=false is only for trying TREK over plain HTTP: without it the browser drops the session cookie and the login does not stick. Once TREK sits behind HTTPS (see Reverse Proxy), remove it.
TrueNAS SCALE: Install TREK directly from the Community catalog. See the TrueNAS SCALE installation guide.
Tip
No server yet? TREK's own public services run on dataforest cloud, our infrastructure sponsor. A small seed is plenty for a TREK instance and is ready within a minute.
Tech stack
Real-time sync via WebSocket (ws). Backend on NestJS 11. State with Zustand. Auth via JWT + OAuth 2.1 + OIDC + Passkeys (WebAuthn) + TOTP MFA. Weather via Open-Meteo (no key required). Maps with Leaflet and Mapbox GL.
Docker Compose (production)
The repository ships a ready-to-use docker-compose.yml
with secure defaults and every option documented inline. Download it, then:
docker compose up -d
See Install with Docker Compose for the full walkthrough.
TREK stores its data in SQLite by default. Set TREK_DB_URL to run it on a PostgreSQL 14 to 19 database instead. The
docker-compose.postgres.yml example starts one beside TREK, and the
Postgres guide covers the requirements, the backups and
how to move an existing SQLite install to Postgres with the command TREK ships for it.
Helm (Kubernetes)
helm repo add trek https://chart.liketrek.com
helm repo update
helm install trek trek/trek
See charts/README.md for values.
Updating
See Updating — Docker Compose, Docker run, Helm, Portainer, Unraid, TrueNAS SCALE and Proxmox, plus the encryption-key note.
Reverse Proxy
For production, put TREK behind a TLS-terminating reverse proxy. TREK uses WebSockets for real-time sync, so the proxy must support WebSocket upgrades on /ws.
If you use the MCP addon, the proxy must also pass the Mcp-Session-Id header through in both directions on /mcp — Nginx and Caddy do this by default, but a proxy that strips it makes every tool call open a new session instead of reusing one. See the Reverse Proxy wiki page for details.
Nginx
server {
listen 80;
server_name trek.yourdomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name trek.yourdomain.com;
ssl_certificate /etc/ssl/fullchain.pem;
ssl_certificate_key /etc/ssl/privkey.pem;
# 500 MB covers backup-restore uploads (capped at 500 MB server-side).
client_max_body_size 500m;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /ws {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}
# Only needed if you use the MCP addon. Responses are Server-Sent Events,
# so buffering must be off or tool results arrive late.
location /mcp {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 3600s;
}
}
Caddy
trek.yourdomain.com {
reverse_proxy localhost:3000
}
Caddy handles TLS and WebSockets automatically.
Environment variables
Every variable, its default and what it does: see Environment Variables.
Data sources
The Atlas map's country and sub-national (province/county) boundaries come from geoBoundaries (Runfola et al., 2020), licensed CC BY 4.0; Ireland's counties come from Tailte Éireann, also CC BY 4.0. See NOTICE.md for full third-party attributions.
License
TREK is AGPL v3. Self-host freely for personal or internal company use. If you modify and offer TREK as a network service to third parties, your modifications must be open-sourced under the same licence.


