---
title: "Self-Host Your Travel Itineraries with TREK and Docker"
canonical_url: "https://techvoyage.dev/article/self-hosted-travel-planner-trek"
last_updated: "2026-10-20T09:53:39.562Z"
meta:
  description: "Learn how to deploy TREK using Docker, secure it via Cloudflare R2 and Caddy, and leverage AI agents with MCP for seamless travel planning."
  "og:description": "Learn how to deploy TREK using Docker, secure it via Cloudflare R2 and Caddy, and leverage AI agents with MCP for seamless travel planning."
  "og:title": "Self-Host Your Travel Itineraries with TREK and Docker"
  "twitter:description": "Learn how to deploy TREK using Docker, secure it via Cloudflare R2 and Caddy, and leverage AI agents with MCP for seamless travel planning."
  "twitter:title": "Self-Host Your Travel Itineraries with TREK and Docker"
---

[Home](https://techvoyage.dev/)

![A premium minimalist 3D illustration of the TREK self-hosted travel planner dashboard on a warm parchment background.](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/EN-Self-hosted-travel-planner-TREK.webp) # **Self-Host Your Travel Itineraries with TREK and Docker**

Learn how to deploy TREK using Docker, secure it via Cloudflare R2 and Caddy, and leverage AI agents with MCP for seamless travel planning.

Sep 1, 2026 -Updated Sep 3, 2026 -22 MIN READ

[**Travel**](https://techvoyage.dev/category/travel) [**AI & Agents**](https://techvoyage.dev/category/ai-agents)

<details>

<summary>Table of contents</summary>



</details>

The tedious part of travel planning is that flight booking PDFs, hotel confirmations, conversations with travel companions, and lists of places to visit are scattered in different locations. When it is time to work out total spending and split the bills, huge effort is needed to scroll through all that travel data.

TREK is an open-source travel planner that can be self-hosted, packing your itinerary, bookings, budget, and packing lists all into one place. The built-in MCP server enables AI agents (such as Claude Desktop) to directly manipulate travel data.

This guide will walk you through everything from deployment to fully managing a real trip from start to finish.

### 1. How to Deploy TREK Travel Planner Using Docker

#### Install Docker on the Ubuntu VPS

```
# Add Docker's official GPG key and set up the Docker repository
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Add the official Docker repository
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Update package list
sudo apt update

# Install Docker Engine, Docker Community Edition, and containerd runtime
sudo apt install docker-ce docker-ce-cli containerd.io -y

# Verify docker is installed
docker --version

# Starts automatically when your system boots
sudo systemctl enable docker
```#### Generate the encryption key TREK uses a key to encrypt sensitive data. Use the following command or this [**online tool**](https://techvoyage.dev/tools/secret-key-hex) to generate the encryption key:```
openssl rand -hex 32
``` Save it somewhere safe; losing it means losing access to encrypted data. #### Start the container```
docker run -d \
  --name trek \
  -p 3000:3000 \
  -e ENCRYPTION_KEY="<generated_key>" \
  -e APP_URL="https://trek.pafor.me" \
  -v ./data:/app/data \
  -v ./uploads:/app/uploads \
  --restart unless-stopped \
  mauriceboe/trek:latest
```- **`**APP_URL**` must be set correctly** — the MCP server's OAuth discovery flow depends on it. Set it to your final public HTTPS address from the start. The first run takes a while to pull the image:![Docker pull and run logs for TREK](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-docker-pull-image.webp) Verify it's running:```
docker ps
```![Verifying running container status via docker ps](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-docker-ps-status.webp) ### 2. Setting Up Domain Routing & SSL with Caddy Reverse Proxy HTTPS is required for passkeys, and OAuth for MCP. The domain name is hosted on Cloudflare which comes with free SSL certificate and DDoS protection. Caddy is set up as the secure reverse server to point to point 3000. An example of Caddyfile as follow:```
{$TREK_DOMAIN} {
  encode zstd gzip
  reverse_proxy host.docker.internal:3000
}
```### 3. Initial Configuration & Secure Admin Setup There are two ways of creating the admin account: - **`**ADMIN_EMAIL**` and `**ADMIN_PASSWORD**`** are set as environment variables; those values are used directly. - TREK creates email `**admin@trek.local**`, username `**admin**`, and a **randomly generated password printed to the container log**. Run `**docker logs trek**` to retrieve it. If the password can't be found from the log, reset it:```
docker exec -it -e RESET_ADMIN_EMAIL=admin@trek.local -e RESET_ADMIN_PASSWORD='YourNewPassword' trek node server/reset-admin.js
``` You will be prompted to change the password on first login.![Initial login and admin password reset prompt](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-initial-login-password-prompt.webp) Click on **Admin** and update the email:![Setting up custom email in TREK admin settings](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-admin-email-update-panel.webp) #### 3.1 Backups Configure the automatic backups with a retention policy in the admin panel: ![Configuring automated backup schedules and retention rules](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-admin-backup-retention-policy.webp) #### 3.2 Store Uploaded Files to Cloudflare R2 Storing uploaded files, photos, and backups in Cloudflare R2 keeps the VPS disk clean and light. TREK supports S3-compatible backends, and Cloudflare R2 fits this perfectly. 1. Create an R2 bucket called `**trek**`. 2. In the **Account Details** section, find your account ID: ![Locating Cloudflare account ID in portal](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/cloudflare-r2-account-details-id.webp) 3. Click **Manage API Tokens**: ![Cloudflare portal Manage API Tokens screen](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/cloudflare-r2-manage-api-tokens-button.webp) 4. Click **Create Account API token** with read/write permissions for the bucket: ![Creating R2 access token with read and write permissions](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/cloudflare-r2-create-token-permissions.webp) 5. Click **Storage** on **ADMINISTRATION** panel: ![Navigating to storage settings in TREK control panel](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-administration-storage-menu.webp) 6. Click **Add Backend** button and fill in the endpoint, bucket, and credentials: ![Configuring S3 compatible Cloudflare R2 storage backend](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-add-storage-backend-credentials.webp) 7. Click **Apply**, then the **Test** link button. You want to see "Connection OK": ![Successful storage connection test showing Connection OK](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-test-storage-backend-connection-ok.webp) 8. Switch all storage categories to Cloudflare R2 and click **Save changes**: ![Routing all file storage categories to Cloudflare R2](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-switch-storage-categories-r2.webp) #### 3.3 Passkey Login TREK supports passkeys, two-factor authentication, and OIDC single sign-on. For passkeys, enter your domain name and allowed origins in settings, then click **Save**:![Registering allowed origins for secure Passkey authentication](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-passkey-allowed-origins-settings.webp) Without the **allowed origins** configured, passkey registration will fail. #### 3.4 Google Maps API Key A Google Maps key enriches place search with ratings, opening hours, and photos. TREK automatically falls back to OpenStreetMap with no key required, just without ratings and photos. Follow this [**link**](https://mapsplatform.google.com/maps-demo-key/) and click **Get demo key** to request one: ![Requesting Google Maps Platform API key](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/google-maps-get-demo-api-key.webp) Paste the key in settings and click **Test** to confirm the connection: ![Verifying Google Maps API key connectivity in settings](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-google-maps-key-test-connection.webp) #### 3.5 AI Integration The AI model is used to parse booking confirmation emails and PDFs into structured reservations. Click **Addons** in the left menu and enable **AI Parsing**. Select "OpenAI" (or another compatible provider) and fill in the provider details:![Enabling AI Parsing addon with OpenAI integration](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-addons-enable-ai-parsing-openai.webp) #### 3.6 MCP Access Under **Addons**, enable **MCP**:![Activating Model Context Protocol MCP server addon](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-addons-enable-mcp.webp) #### 3.7 Plugins The following plugins are recommended and worth activating:![List of active recommended plugins and addons](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-recommended-addons-plugins-activation.webp) #### 3.8 Create Your Everyday User Plan trips as a normal user, not as an admin. Create a regular user and log in with it:![Creating a regular user account in TREK panel](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-create-regular-user-form.webp) Once logged in, add a passkey or set up 2FA to harden the account:![Configuring user security settings with Passkeys and 2FA](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-user-security-passkey-2fa-setup.webp) Click **+ Add a passkey**, enter the current password, and confirm:![Confirming password to register new hardware Passkey](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-add-passkey-confirm-password.webp) ### 4. Testing Your Deployment: Importing Historical Travel Data A good way to learn TREK is to build up your travel history. #### 4.1 Create the trip Click **+ New Trip** and set the **Start Date** and **End Date** to the past dates of the trip:![Creating a new trip with custom date ranges](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-create-new-trip-details.webp) Add a cover image (drag one in, or paste from the clipboard) and click **Create New Trip**:![Setting up high-quality trip cover image](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-cover-image-upload.webp) #### 4.2 Import the bookings Drop all the flight, train, and other transportation files in:![Drag and drop area to import travel PDFs and bookings](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-import-travel-booking-files.webp)![Uploaded reservation processing window showing extraction](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-import-booking-pdf-processing-status.webp) With AI model enabled, booking confirmation PDFs are parsed and extracted into structured reservations. Review the parsed result and click **Add** to commit the booking detail:![Reviewing structured booking details extracted by AI](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-review-parsed-booking-details.webp) If a booking only exists in an email, export the email as a PDF and dump it in — the same extraction pipeline applies. The following screenshots show how bookings are displayed:![Comprehensive timeline display of travel bookings](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-bookings-timeline-view.webp)![Detailed view of a confirmed transport reservation](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-booking-confirmation-details.webp) On the **Plan** page, all the accommodations will be displayed on the map:![Interactive map plotting all hotel accommodations](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-plan-accommodations-map-display.webp) Click **Atlas** on the top menu bar for a list (and map) of every country you've visited:![Travel history overview in the personal Atlas tracker](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-atlas-countries-visited-summary.webp) #### 4.3 Add travel companions Click the **Share** button:![Opening the trip sharing dialog in TREK](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-share-options-button.webp) At the bottom of the dialog, guests can be added:![Adding custom traveling companions and guests](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-add-companions-guests.webp) #### 4.4 Record the expenses Click **Add expense** to add costs other than bookings such as health insurance, local transport, SIM cards:![Inputting detailed spending data in expense form](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-add-custom-expense-form.webp)![Split bill breakdown and cost tracking ledger](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-expenses-list-billing-split.webp) #### 4.5 Trip segments This feature requires the Trip Segment plugin to be installed. Long trips break down into segments nicely, with each leg displaying its own bookings, places, and costs:![Breaking down a complex itinerary into travel segments](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-segments-overview-display.webp)![Active travel segment displaying places and schedules](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-segment-itinerary-details.webp)![Mapping out distinct trip legs on the timeline](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-trip-segments-interactive-map.webp) #### 4.6 Create a journey and check your atlas Group trips into a **Journey** and write stories to share the adventure with friends:![Consolidating multiple trips into a visual Journey](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-create-new-journey-group.webp)![Drafting visual stories in the Journey panel](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-journey-timeline-story-writing.webp)![Media collection and gallery grid inside a Journey](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-journey-gallery-media-grid.webp)![Generating public share links for collaborative Journeys](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-journey-public-share-link.webp) ### 5. Designing Custom Itineraries and Packing Lists Click **+ New Trip**, enter a name, and set the dates:![Initial prompt dialog to create an undated trip](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-planning-new-trip-setup.webp)**If you haven't fixed the dates yet, leave both empty.** A "number of days" field appears (up to 365). Plan first, schedule later. #### 5.1 Adding places This is the most time-consuming step of any trip planning, and TREK has a couple of ways of doing it:![Multi-channel methods to add new places to itineraries](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-add-places-methods-overview.webp)**1. Right-click the map** to create a place at that exact location — the address is reverse-geocoded automatically:![Right-clicking the map interface to pinpoint locations](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-right-click-map-location.webp)![Automatic reverse-geocoding of selected map coords](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-right-click-reverse-geocode-address.webp)**2. Click + Add Place/Activity** and search by name![Searching for real-world places using text inputs](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-search-place-by-name-input.webp)![Displaying place search results with address overlays](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-select-place-search-results-list.webp)![Comprehensive place info card with reviews and ratings](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-place-details-rich-info-card.webp)**3. Paste a Google Maps URL** (`**maps.app.goo.gl/…**` or `**maps.google.com/…**`) into the search field. TREK parses out the name, address, and coordinates:![Parsing locations directly from pasted Google Maps share links](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-paste-google-maps-share-link.webp)![Successful coordinate extraction from maps URL](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-google-maps-parsed-location.webp)**4. Bulk import** — the easiest of all. If you already maintain a "want to go" list on Google Maps, export it as `**.gpx**` (`**.kml**` and `**.kmz**` also work) and click **Import file** on the right panel to pull everything in at once:![Performing bulk place imports using GPX or KML files](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-bulk-import-places-gpx-file.webp) Add everything interesting first, regardless of whether it fits the schedule. Allocate places to days later. #### 5.2 Day plans and notes The Day Plan organises places into days, in order. It's a collapsible list per day, and everything is drag-and-drop:![Customizing daily routes with drag-and-drop actions](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-day-plan-drag-drop-ordering.webp) The details that make it useful: - **Transport between stops**: the bus icon at the top left of a day adds commuting transport (train, bus, flight legs within the day): ![Registering commuting transport between day segments](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-day-plan-commuting-transport-button.webp) - **Day notes**: the notes icon at the bottom left attaches icon-tagged notes — "early start today", "this museum needs a reservation": ![Adding highly visible, icon-tagged custom notes to days](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-day-plan-icon-tagged-notes-button.webp) - **Time slots**: drag a place from the right panel into a day, then assign it a time. Places with set times are auto connected on the map: ![Auto-calculated transit routes between timed locations](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-day-plan-timed-places-routing.webp) - Please refer to [**Day Plans and Notes wiki page**](https://github.com/liketrek/TREK/wiki/Day-Plans-and-Notes) for **Route optimisation** and **Weather**. #### 5.3 Collections: reusable place lists Collections allows the user to save a list of places outside of any trip. It can be shared with friends, and ready for the next trip. Places are **copied** into trips, so editing a trip entry never mutates your collection and vice versa. Click **Collections** in the top menu bar:![Accessing custom user collections for saved places](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-dashboard-view.webp) Click **+ New list** to create one:![Creating custom lists in user collections](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-create-new-list.webp) Click **+ Add a place** and fill in the details:![Manual form entry to populate custom collection lists](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-add-place-manually-form.webp)**Note:** the search inside the "Add a place" dialog does not seem to work, so you will need to enter details manually. If geo-coordinates of the places are available, the places show up on the map:![Visualizing custom collection places on an interactive map](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-map-places-display.webp) To organise places with labels, click the **tick-box** icon:![Selection mode for bulk labeling of saved places](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-select-places-tickbox.webp) Select the places to group, then click **Assign label**:![Assigning descriptive labels to selected collection spots](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-group-assign-label.webp) Click **Manage labels** to create labels first:![Creation and management of custom labels](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-manage-custom-labels.webp) Select a label and click **Assign label**:![Applying custom labels to group places](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-collections-confirm-label-selection.webp) #### 5.4 Costs and budget We can add other expenses for the trip on the 'Costs' page.![Comprehensive expenses table and balance settling ledger](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-costs-budget-overall-expenses-list.webp) Payments made by travel companions can be added and split on the same page. The settlement panel runs a greedy-matching algorithm to compute the **minimum number of transfers** for who owes whom, and how much. ### 6. Leveraging Model Context Protocol (MCP) for AI-Powered Travel Planning TREK has a built-in **MCP (Model Context Protocol) server**, which lets AI agents read and write your travel data directly — over 150 tools and 30 resources covering trips, places, budgets, packing, bookings, and collaboration. #### 6.1 Cloudflare Zero Trust Because TREK is running behind a [**Cloudflare Zero Trust**](https://techvoyage.dev/article/exposing-hermes-agent-to-private-network-using-cloudflare-warp) network, you will need to add the domain to the split tunnels inclusion list. Otherwise, you will have issues with OAuth authorisation. Please refer to this GitHub issue: [**github issue**](https://github.com/liketrek/TREK/issues/1463). [![Securely exposing Hermes Agent to a private network using Cloudflare Zero Trust and WARP tunnel](https://inimages.techvoyage.dev/articles/Exposing%20Hermes%20Agent%20to%20Private%20Network%20Using%20Cloudflare%20WARP/EN-Exposing-Hermes-Agent-to-Private-Network-Using-Cloudflare-WARP.webp)**Related guide**<h3>**How to Expose Hermes Agent Privately with Cloudflare WARP**</h3>Learn how to securely expose and access your Hermes Agent globally using Cloudflare WARP and Zero Trust without opening inbound firewall ports.**8 MIN READ **](https://techvoyage.dev/article/exposing-hermes-agent-to-private-network-using-cloudflare-warp)![Adding custom domains to Cloudflare Warp Split Tunnels](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/cloudflare-zero-trust-split-tunnels-domain.webp) #### 6.2 Claude Desktop Click **+ New Client** to create an AI agent client: ![Registering a new custom client token in settings](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-register-new-mcp-client.webp) Select the **Claude Desktop** tab and click **Register Client**:![Generating Claude Desktop client credentials](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-mcp-claude-desktop-client-credentials.webp) A client ID and client secret pair is displayed. Copy them somewhere safe. Then click **Client Configuration** to show the MCP config:![Retrieving pre-formatted MCP server configuration block](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-mcp-client-configuration-block.webp) In Claude Desktop, click **Edit Config** to open the local MCP servers configuration file:![Editing Claude Desktop local MCP config json file](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/claude-desktop-mcp-config-json.webp) Paste the TREK config, replacing the placeholders with your credentials:```
  "mcpServers": {
    "trek": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://trek.pafor.me/mcp",
        "--static-oauth-client-info",
        "{\"client_id\": \"<your_client_id>\", \"client_secret\": \"<your_client_secret>\"}"
      ]
    }
  },
``` Restart Claude Desktop, and the TREK server shows as connected under **Local MCP servers**:![Verifying active TREK connection status inside Claude UI](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/claude-desktop-mcp-trek-server-connected.webp) Now run a prompt:![Prompting Claude in natural language to manipulate travel data](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/claude-desktop-mcp-natural-language-prompt.webp) Let's add an expense in natural language:```
For the West Europe trip, the Grab from KLIA1 to the hotel cost RM115.90 on 26/4/2025. Please add it as an expense without split to the trip.
```![Claude utilizing tools to automatically record an expense](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/claude-desktop-mcp-add-expense-response.webp) Checking the **Costs** page, the expense is created with "No one paid yet", since no payer was mentioned:![Confirming the newly parsed AI expense in the Costs view](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-costs-page-mcp-parsed-expense.webp) Adding to the packing list works the same way:![Claude adding packing items using natural language prompts](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/claude-desktop-mcp-add-packing-items.webp) Refresh the **Packing List** page and the three items are there:![Confirming newly parsed packing items on the Packing List page](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/trek-packing-list-mcp-parsed-items.webp) #### 6.3 Gemini CLI (dynamic registration) Gemini CLI supports **dynamic registration**, that is no pre-created client needed. Add this to `**.gemini/settings.json**`:```
    "trek": {
      "httpUrl": "https://trek.pafor.me/mcp",
      "oauth": {
        "enabled": true
      }
    }
``` Run `**gemini**` in the terminal and click **Approve** when the authorisation prompt appears: ![Approving OAuth access for the TREK MCP server](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/mcp-client-oauth-authorization-prompt.webp) Then start with a simple prompt:![Prompting Gemini CLI to fetch travel itineraries](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/gemini-cli-mcp-prompt-itinerary.webp)![Gemini CLI successfully displaying structured trip information](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/gemini-cli-mcp-display-itinerary.webp) #### 6.4 Kimi CLI (dynamic registration) Same approach — add to `**mcp.json**` in the `**/Users/<user>/.kimi/**` folder:```
    "trek": {
      "type": "http",
      "url": "https://trek.pafor.me/mcp",
      "auth": "oauth"
    }
``` Run `**kimi mcp auth trek**` in the terminal and click **Approve**: ![Approving OAuth access for the TREK MCP server](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/mcp-client-oauth-authorization-prompt.webp) Once authorised, the available tools are listed:![Kimi CLI displaying available tools after successful authorization](https://inimages.techvoyage.dev/articles/Self%20hosted%20travel%20planner%20TREK/kimi-cli-mcp-authorized-tools-list.webp) ### 7. Mobile Experience TREK is a PWA (progressive web app) on mobile devices. A service worker caches map tiles and API data, so your itinerary remains readable offline. However, push notifications may experience some latency compared to a native app. ### Final Thoughts Connecting AI agents through MCP saves a lot of the tedious work of entering flight and accommodation bookings. In addition, agents can suggest places of interest based on your travel dates and season. A single conversation with an AI agent can cover the entire pipeline, from research and itinerary building to budget tracking and packing. There are some minor technical glitches. For instance, when importing bookings from PDFs, the currency defaults to the trip's base currency rather than the currency actually paid. Also, when creating a new list in Collections, any cover image added during creation disappears on save, though it can be manually added back when editing. There is a slight technical barrier, as you need to host this on your own server. TREK is primarily designed for people who travel frequently and have high expectations of how they organise their travel data. We suggest trying the official demo at [**demo.liketrek.com**](https://demo.liketrek.com/) before considering self-hosting. ### Reference: - [**TREK Quick Start**](https://github.com/liketrek/TREK/wiki/Quick-Start) - [**TREK Troubleshooting**](https://github.com/liketrek/TREK/wiki/Troubleshooting) - [**TREK MCP Scopes**](https://github.com/liketrek/TREK/wiki/MCP-Scopes) [Share](https://api.whatsapp.com/send?text=https%3A%2F%2Ftechvoyage.dev%2Farticle%2Fself-hosted-travel-planner-trek) [Share](https://www.reddit.com/submit?url=https%3A%2F%2Ftechvoyage.dev%2Farticle%2Fself-hosted-travel-planner-trek) [Share](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftechvoyage.dev%2Farticle%2Fself-hosted-travel-planner-trek) [Share](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Ftechvoyage.dev%2Farticle%2Fself-hosted-travel-planner-trek) [Share](https://x.com/intent/post?url=https%3A%2F%2Ftechvoyage.dev%2Farticle%2Fself-hosted-travel-planner-trek) ## **Related Articles**[![A premium 16:9 technology card with deep blue and orange accents illustrating how to self-host Block's Buzz relay on an Ubuntu VPS, featuring a clean glassmorphic panel with centered typography.](https://inimages.techvoyage.dev/articles/Self-Hosting%20Buzz%20As%20The%20Workspace%20Where%20AI%20Agents%20Become%20Colleagues/EN-Self-Hosting-Buzz-As-The-Workspace-Where-AI-Agents-Become-Colleagues.webp)**Collaboration**<h3>**Self-Host Block's Buzz: Shared AI Agent Workspace**</h3>Learn how to self-host Block's Buzz on a Linux VPS behind Cloudflare DNS. Run a secure, Nostr-powered workspace where humans and AI agents collaborate.**16 MIN READ **](https://techvoyage.dev/article/self-hosting-buzz-as-the-workspace-where-ai-agents-become-colleagues) [![A personal self-hosted AI memory system deployed on Cloudflare Workers and Vectorize using the Model Context Protocol (MCP) and Obsidian sync.](https://inimages.techvoyage.dev/articles/Use%20Cloudflare%20as%20AI%20memory/EN-Use-Cloudflare-as-AI-memory.webp)**Cloudflare**<h3>**Build a Persistent AI Memory System on Cloudflare**</h3>Learn how to build a persistent, self-hosted AI memory system on Cloudflare using Second Brain and MCP. Share context across Claude, Gemini, and Obsidian.**7 MIN READ **](https://techvoyage.dev/article/use-cloudflare-as-ai-memory) [![Nuxt Scaffolding on Cloudflare: Scripts vs AI Skills - Comparing shell scripts and intelligent AI agent skills for scaffolding Nuxt applications.](https://inimages.techvoyage.dev/articles/How%20AI%20Agent%20Skills%20Replace%20Nuxt%20App%20Scaffolding%20Scripts/EN-How-AI-Agent-Skills-Replace-Nuxt-App-Scaffolding-Scripts.webp)**AI & Agents**<h3>**How AI Agent Skills Replace Nuxt App Scaffolding Scripts**</h3>Scaffold Nuxt on Cloudflare Workers easily. Learn why we replaced brittle shell scripts with AI agent skills and how to install them with npx skills.**4 MIN READ **](https://techvoyage.dev/article/how-ai-agent-skills-replace-nuxt-app-scaffolding-scripts) [![Nuxt Scaffolding on Cloudflare: Scripts vs AI Skills - Comparing shell scripts and intelligent AI agent skills for scaffolding Nuxt applications.](https://inimages.techvoyage.dev/articles/How%20AI%20Agent%20Skills%20Replace%20Nuxt%20App%20Scaffolding%20Scripts/EN-How-AI-Agent-Skills-Replace-Nuxt-App-Scaffolding-Scripts.webp)](https://techvoyage.dev/article/how-ai-agent-skills-replace-nuxt-app-scaffolding-scripts) [![A premium 16:9 technology card with deep blue and orange accents illustrating how to self-host Block's Buzz relay on an Ubuntu VPS, featuring a clean glassmorphic panel with centered typography.](https://inimages.techvoyage.dev/articles/Self-Hosting%20Buzz%20As%20The%20Workspace%20Where%20AI%20Agents%20Become%20Colleagues/EN-Self-Hosting-Buzz-As-The-Workspace-Where-AI-Agents-Become-Colleagues.webp)](https://techvoyage.dev/article/self-hosting-buzz-as-the-workspace-where-ai-agents-become-colleagues)