---
title: "Deploy TREK"
description: "Self-hosted collaborative travel planner: trips, maps, budgets, packing"
category: "Other"
url: https://railway.com/deploy/trek-2
---

# Deploy TREK

Self-hosted collaborative travel planner: trips, maps, budgets, packing

**[Deploy TREK on Railway](https://railway.com/template/trek-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/trek-2/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### TREK https://raw.githubusercontent.com/liketrek/TREK/v5.1.4/docs/trek-icon.png

- **Source:** https://github.com/aalfath/trek-railway-template
- **Health check:** /api/health
- **Public domain:** Yes

## Documentation

# Deploy and Host TREK on Railway

TREK is a self-hosted, real-time collaborative travel planner. You and the people you invite plan trips together on a shared map: day-by-day itineraries, places, bookings and reservations, budgets with expense splitting, packing lists, documents and a travel journal. It is open source (AGPL-3.0) and installs as a progressive web app.

## About Hosting TREK

TREK is a single Node.js server that serves the web app, its REST API and a WebSocket endpoint for live collaboration on one port. It keeps everything on disk: a SQLite database, its encryption and session keys, backups, logs, plugins and uploaded files. Hosting it means running the official image behind HTTPS with WebSockets, keeping that disk on a persistent volume, and setting a few secrets. This template builds TREK 5.1.4 from a pinned official image, puts all data on one Railway volume at `/app/data`, generates the encryption key and first admin password, and checks `/api/health` before each deploy goes live.

## Common Use Cases

* Plan a group or family trip together, with live updates as others edit
* Track bookings, flights, budgets, shared expenses and packing lists in one place
* Keep a private travel journal and map of visited places on your own server

## Dependencies for TREK Hosting

* TREK 5.1.4 (official `mauriceboe/trek` image, pinned by digest), with its built-in SQLite database
* A Railway volume at `/app/data` for the database, keys and uploads

### Deployment Dependencies

* [TREK on GitHub](https://github.com/liketrek/TREK) and its [v5.1.4 release](https://github.com/liketrek/TREK/releases/tag/v5.1.4)
* [TREK wiki](https://github.com/liketrek/TREK/wiki) (configuration, OIDC, backups, troubleshooting)
* [Template repository](https://github.com/aalfath/trek-railway-template) (Dockerfile, start script, changelog)

### Implementation Details

There is nothing to fill in. After the deploy finishes:

1. Open the TREK service's **Variables** tab and copy `ADMIN_PASSWORD`.
2. Sign in at your Railway URL as `admin@trek.local` with that password. TREK asks you to set a new password straight away. Change the email in your profile.
3. Registration is open by default. Turn it off under **Admin &gt; Settings** if only invited people should join.

`ENCRYPTION_KEY` encrypts stored API keys and SMTP/OIDC settings, so keep it. If you add a custom domain, set `APP_URL` to `https://YOUR-DOMAIN`. Optional features (SMTP, OIDC single sign-on, Google Maps or Amap keys, AI booking import) are set in the admin panel or with the variables listed in TREK's `docker-compose.yml`.

**Updates:** the service builds from [aalfath/trek-railway-template](https://github.com/aalfath/trek-railway-template). When a new TREK release is pinned there, Railway shows an update notice on your project and you choose when to apply it. Your data stays on the volume; read the changelog first.

## Why Deploy TREK on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying TREK on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/trek-2
