> ## Documentation Index
> Fetch the complete documentation index at: https://blog.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# TREK: plan group trips together in real time on your VPS

> Run TREK on a VPS: a self-hosted, collaborative trip planner with a live map, bookings and shared expenses. Docker Compose setup, OnetSolutions.

![TREK: the My Trips dashboard with an upcoming trip, the currency converter, time zones and bookings, in light and dark themes](https://mintcdn.com/onetsolutions-blog/wXolVudpQk_vDddE/images/2026/11/trek.webp?fit=max\&auto=format\&n=wXolVudpQk_vDddE\&q=85\&s=0082d0c452695121353506568d4ac1ac)

*Published on November 28, 2026*

When a group trip lives in a spreadsheet, a chat thread and ten booking e-mails, nobody knows what the plan is anymore: TREK, on your VPS, brings the itinerary, the bookings and the expenses into one app that you host.

## What TREK does for you

* **Plan** each day on a map, dragging places, notes and bookings between days; edits show up live for everyone on the trip.
* **Gather** your bookings, flights, trains and stays included, and import confirmations received as EML, PDF, PKPass or HTML, with a review step before anything is saved.
* **Split** costs equally or with custom shares, with several payers, one currency per expense at the rate frozen on entry, and settle-up suggestions.
* **Prepare** packing lists and to-dos, with templates, assignees and reminders.
* **Control** who gets in: OIDC sign-in, passkeys, TOTP two-factor authentication, invite links and scheduled backups.

## At a glance

| | |
| - | - |
| License | AGPL-3.0 |
| Language | TypeScript (NestJS 11 on Node.js 24, React 19); SQLite by default, PostgreSQL 14 to 18 as an option via `TREK_DB_URL` |
| Latest version | v5.2.1, released on November 25, 2026 |
| GitHub stars | 16,008 as of November 28, 2026 |
| Minimum resources | Not documented by the project. The community Proxmox script, referenced in the [wiki](https://github.com/liketrek/TREK/wiki/Install-Proxmox), defaults to 2 cores, 2 GB of RAM and 8 GB of disk. The 5.2.1 image is about 690 MB compressed (amd64, per [Docker Hub](https://hub.docker.com/r/mauriceboe/trek/tags)) |
| Repository | [github.com/liketrek/TREK](https://github.com/liketrek/TREK) |

## Install TREK on your VPS

Prerequisites: a Linux VPS with [Docker](https://help.onetsolutions.net/tutorials/how-to-install-docker) and its Compose plugin, a domain name (here `trek.example.com`) pointing to the VPS, and [Caddy](https://caddyserver.com/docs/install) as the reverse proxy.

Create the service directory:

```bash theme={null}
# Service directory
sudo mkdir -p /opt/trek
cd /opt/trek
```

TREK encrypts the secrets it stores (API keys, 2FA seeds, OIDC credentials). Generate the encryption key with the command from the docs:

```bash theme={null}
openssl rand -hex 32
```

The `.env` file, next to the Compose file, holds the values Compose reads through `${VAR}`:

```bash theme={null}
# /opt/trek/.env
# Output of openssl rand -hex 32
ENCRYPTION_KEY=replace-with-your-key
TZ=Europe/Paris
LOG_LEVEL=info
# Public URL of TREK
ALLOWED_ORIGINS=https://trek.example.com
```

This `docker-compose.yml` follows the one in the repository, hardening included (read-only filesystem, reduced capabilities). The image is pinned to 5.2.1, port 3000 is published on the VPS itself only, and the two HTTPS lines from the docs are switched on:

```yaml theme={null}
# /opt/trek/docker-compose.yml
services:
  app:
    image: mauriceboe/trek:5.2.1
    container_name: trek
    read_only: true
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETUID
      - SETGID
      - KILL
    tmpfs:
      - /tmp:noexec,nosuid,size=128m
    ports:
      # Web UI: VPS only, the reverse proxy connects to it
      - "127.0.0.1:3000:3000"
    environment:
      - NODE_ENV=production
      - PORT=3000
      - ENCRYPTION_KEY=${ENCRYPTION_KEY:-}
      - TZ=${TZ:-UTC}
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-}
      # HTTPS redirect, HSTS and secure cookies behind the proxy
      - FORCE_HTTPS=true
      - TRUST_PROXY=1
      # Optional: admin account created on first boot
      # - ADMIN_EMAIL=you@example.com
      # - ADMIN_PASSWORD=a-long-password
    volumes:
      - ./data:/app/data
      - ./uploads:/app/uploads
    restart: unless-stopped
    logging:
      driver: json-file
      options:
        max-size: 10m
        max-file: "3"
    healthcheck:
      test: ["CMD-SHELL", "wget -qO- http://localhost:$${PORT:-3000}/api/health || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s
```

`./data` holds the SQLite database and the secrets, `./uploads` the uploaded files. Those are the two directories to back up.

Start TREK and follow its first boot:

```bash theme={null}
sudo docker compose up -d
sudo docker compose logs -f
```

TREK syncs edits in real time over WebSocket on `/ws`, so the reverse proxy must accept those connections. Caddy does it out of the box and gets the Let's Encrypt certificate on its own. This `Caddyfile` is the one from the README:

```caddyfile theme={null}
# /etc/caddy/Caddyfile
trek.example.com {
    reverse_proxy localhost:3000
}
```

Reload Caddy to apply the configuration:

```bash theme={null}
sudo systemctl reload caddy
```

> [!TIP]
>
> To update, first take a backup from **Admin → Backup**, change the tag on the `image:` line (for example from `5.2.1` to the next release), then run `sudo docker compose up -d` again.

## First steps

1. **Sign in as admin.** Without `ADMIN_EMAIL` and `ADMIN_PASSWORD`, TREK creates the `admin@trek.local` account on first boot with a random password, printed in the log: `sudo docker logs trek`. Open `https://trek.example.com` and sign in; TREK asks you for a new password right away.

2. **Create your first trip.** On the dashboard, click **New Trip**. Enter a title, the start and end dates, and the trip currency: every balance and settle-up is calculated in it.

3. **Invite your travel companions.** In **Admin → Users**, **Invite Links** card, click **Create Link**. Pick the number of uses, the expiry and, under **Add to trip**, the trip to join: whoever registers through the link becomes a member straight away.

## Check that it works

TREK exposes a health check on `/api/health`, the one the Compose healthcheck polls. Test it from the VPS:

```bash theme={null}
curl -fsS http://127.0.0.1:3000/api/health
```

The expected answer:

```json theme={null}
{"status":"ok"}
```

`sudo docker ps --filter name=trek` should then show `healthy` in the status column. Finally, open a trip in two browsers: an edit made in one should appear in the other at once, which shows the WebSockets get through the proxy.

## Secure access

The Compose file above publishes TREK on `127.0.0.1` only: it can be reached through Caddy alone, over HTTPS. The README keeps `COOKIE_SECURE=false` for a trial over plain HTTP; do not add it behind HTTPS.

The [console firewall](https://help.onetsolutions.net/vps/firewall) adds a second barrier: allow inbound SSH and the ports 80 and 443 Caddy needs, nothing else.

So that only your guests can create an account, switch off **Password Registration** in **Admin → Settings**, **Authentication Methods** card: invite links keep working.

No account with the publisher is needed. By default, place search asks the TREK Places API (`https://places.liketrek.com`), and address search and routing go through the project's services. To turn off those outbound calls to the project, add to `environment:`:

```yaml theme={null}
      # Place search: OpenStreetMap, without the TREK Places index
      - TREK_PLACES_ENABLED=false
      # No installation key sent to the project's services
      - TREK_SERVICES=off
```

Place and address search then go through OpenStreetMap, as before version 4.3.0. The wiki's [TREK Places API](https://github.com/liketrek/TREK/wiki/TREK-Places-API) page details what each setting does.

## Limits and alternatives

Without a Google Maps key, places carry no ratings or business photos, because no open dataset provides them. To search cover photos from a server, the docs recommend a free Unsplash key, set in `UNSPLASH_ACCESS_KEY`.

| Alternative | Difference |
| - | - |
| [AdventureLog](https://github.com/seanmorley15/AdventureLog) | Tracks trips and visited places as much as it plans them, written in Python, GPL-3.0 license. |
| [wanderer](https://github.com/open-wanderer/wanderer) | A self-hosted trail database to record your hikes, without bookings or expenses, AGPL-3.0 license. |
| [Surmai](https://github.com/rohitkumbhar/surmai) | A travel organizer built for personal or family use, MIT license. |

## Going further

* [TREK wiki](https://github.com/liketrek/TREK/wiki): [Docker Compose install](https://github.com/liketrek/TREK/wiki/Install-Docker-Compose), [reverse proxy](https://github.com/liketrek/TREK/wiki/Reverse-Proxy) and [updating](https://github.com/liketrek/TREK/wiki/Updating)
* [Install Docker](https://help.onetsolutions.net/tutorials/how-to-install-docker) on your VPS
* [VPS firewall](https://help.onetsolutions.net/vps/firewall): open only the ports you need
* [Homebox: a home inventory on your VPS](https://blog.onetsolutions.net/en/homebox-vps-self-hosted-home-inventory.md): another everyday tool to host on the same VPS

No VPS at OnetSolutions yet? [Pick yours](https://onetsolutions.net) and plan your next trip on a server of your own.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.