TravStats

TravStats

Docker app from Abrechen2's Repository

Overview

Self-hosted travel logbook for small households and groups (1–10 users). It's a logbook, not a live tracker — you record trips manually, scan a boarding pass, or import an email/PDF; flights now, cruises in v2, hotels and POI on the roadmap. Visualise routes on interactive 2D/3D maps, collect 58 achievements, scan boarding passes (QR/barcode/OCR), import from email and PDF via an optional local Ollama LLM. Includes automated database backups with retention, optional WebDAV off-site sync, and encrypted API-key storage.

Requirements:

TravStats needs a PostgreSQL 15 database with the PostGIS extension. Install the companion template travstats-db (same repo) first — it is pre-configured with database, user and published port so only the password needs filling in. TravStats reaches the database through the Unraid host via host.docker.internal:5432, so no custom Docker network is required — both containers just sit on the default bridge and talk through the host.

If you bring your own PostGIS container instead, make sure it joins the same travstats-net network and uses:

  • Database name: flights
  • Username: flights
  • Password: (strong — generate with openssl rand -base64 32)
  • Container name: travstats-db (or adjust DATABASE_URL below)

Optional: install the Ollama Community App and pull gemma3:12b (~8 GB) for local AI parsing of flight confirmation emails. Point TravStats at it via Admin → Settings → Parser after login (no ENV variable needed).

After first start, open http://[IP]:[PORT:80]/setup — the first-run wizard captures instance name, public URL, user cap and registration mode. Everything else (API keys, backup schedule, WebDAV, Ollama endpoint + model) is configurable from the admin UI later. No ENV editing needed.

The JWT secret and encryption key are auto-generated on first boot and persisted inside the Application Data mount (/mnt/user/appdata/travstats/secrets/) — single volume, survives container updates.

Troubleshooting — setup page shows "Error querying the database": the travstats-db data directory was left with the wrong UID (classic Unraid bind-mount issue). Fix: stop both containers, rm -rf /mnt/user/appdata/travstats-db/pgdata, start travstats-db, then start TravStats. Full guide is in the travstats-db template Overview.

Full documentation: https://github.com/Abrechen2/TravStats

Requirements

PostgreSQL 15 with PostGIS extension (separate container)

Runtime arguments

Web UI
http://[IP]:[PORT:80]/
Network
bridge
Shell
sh
Privileged
false
Extra Params
--restart=unless-stopped --add-host=host.docker.internal:host-gateway

Template configuration

WebUI PortPorttcp

Host port where TravStats will be accessible.

Target
80
Default
3000
Value
3000
Application DataPathrw

Persistent app data — holds the airport database, user uploads, backups, LLM training artefacts, and the auto-generated JWT secret + encryption key. Single volume; nothing else needs to be mounted.

Target
/app/data
Default
/mnt/user/appdata/travstats
Value
/mnt/user/appdata/travstats
Database URLVariable

PostgreSQL connection string. Replace the CHANGEME part with the password you set on the travstats-db container — everything else stays as-is. Uses host.docker.internal so TravStats reaches the DB through the Unraid host rather than needing a custom Docker network. If your PostgreSQL listens on a different host port, adjust the :5432 here to match. Format: postgresql://USER:PASSWORD@host.docker.internal:HOST-PORT/DB-NAME.

Target
DATABASE_URL
Default
postgresql://flights:CHANGEME@host.docker.internal:5432/flights
Value
postgresql://flights:CHANGEME@host.docker.internal:5432/flights
TZVariable

Container timezone. Keep UTC (recommended).

Default
UTC
Value
UTC

Download Statistics

3,152
Total Downloads

Details

Repository
abrechen2/travstats:latest
Last Updated2026-05-12
First Seen2026-04-27

Run TravStats on Unraid.

TravStats is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.