Deploy Dawarich

Map your own location history — an open-source Google Timeline

Deploy Dawarich

Just deployed

Just deployed

/data

Just deployed

/var/lib/postgresql/data

Just deployed

dawarich-storage

Bucket

Just deployed

Deploy and Host Dawarich on Railway

Dawarich is an open-source alternative to Google Timeline. It takes the location history your phone already records, stores it in your own database, and turns it into an interactive map, a list of trips and places, and year-by-year statistics on where you went. People self-host it for one reason above all: location history is among the most sensitive data a person generates, and running it yourself means nobody else holds a copy of everywhere you have been.

Deploy Dawarich on Railway and you get the full production shape, not a single container. Four services are pre-wired: dawarich, the Rails web app serving the map and API and holding the only public URL; dawarich-sidekiq, a worker that parses imports, reverse-geocodes points and rebuilds statistics without blocking a request; postgis, PostgreSQL with the PostGIS extension storing every point as a geographic coordinate; and Redis, backing the job queue, cache and live map updates. An object storage bucket holds uploaded imports and rendered videos, so the web and worker containers share files without sharing a disk.

Diagram of the Dawarich, Sidekiq, PostGIS and Redis services on Railway

Getting Started with Dawarich on Railway

Set DAWARICH_ADMIN_EMAIL and DAWARICH_ADMIN_PASSWORD when you deploy — that pair becomes your account, created the first time the app boots against an empty database. There are no default credentials to change afterwards and public registration is off. Open the public URL, sign in, and you land on the map.

A new instance has no data, so the map opens on today's date and shows nothing. The quickest way to confirm everything works is My data → Imports → New import: upload a .gpx, .geojson, Google Takeout .json, OwnTracks .rec or .fit file and the format is detected automatically. It uploads straight to object storage, the worker picks it up, and the row moves to Completed with a point count. Set the map's date range to the dates the file covers and your track is drawn on it. Then connect a phone — the Dawarich apps, OwnTracks, Overland or GPSLogger post to the API with a key from your account settings. Reverse geocoding stays off until you pick a provider under Settings → Geocoding.

Dawarich map showing an imported walking track across central Lisbon Dawarich imports list with a completed GPX import of 109 points Dawarich statistics page charting total distance and geopoints tracked

About Hosting Dawarich

Dawarich is a Ruby on Rails application that ingests location points from phones and file exports, stores them as geographic data, and derives everything else from that one stream. It suits anyone who wants Google Timeline without Google, or who has years of Takeout archives on a disk and wants them queryable again.

  • Interactive map with heatmaps, fog-of-war and per-day tracks
  • Imports Google Takeout, GPX, GeoJSON, KML, OwnTracks, FIT, TCX and CSV
  • Live tracking from the Dawarich apps, OwnTracks, Overland or GPSLogger
  • Trips, visited places and cities, with optional reverse geocoding
  • Yearly and monthly statistics: distance, countries and cities visited
  • REST API, two-factor auth and shareable read-only links

The service split matters at import time: a Takeout archive can hold years of points and parsing it is slow, so that work goes to dawarich-sidekiq while dawarich keeps serving the map. postgis is not interchangeable with plain PostgreSQL — the schema stores points as geography columns.

Why Deploy Dawarich on Railway

Railway removes the setup work self-hosting Dawarich normally involves:

  • Web app, worker, PostGIS, Redis and object storage deploy together, already wired
  • Persistent volumes attached, so your location history survives redeploys
  • HTTPS and a public domain provisioned automatically
  • Vertical scaling for large Takeout imports, no server to touch
  • Deploys from a public GitHub repository you can fork

Common Use Cases

  • Replacing Google Timeline with a private map of your movement history
  • Reviving years of Google Takeout archives as a searchable, mappable dataset
  • Keeping an automatic travel log of countries, cities and distance a year
  • Sharing a read-only map of a trip instead of posting a route publicly

Dependencies for Dawarich

  • dawarich — the Rails web app, built from gridalpha/dawarich-railway on freikin/dawarich:1.14.2. Serves the map, API and admin, and migrates on boot.
  • dawarich-sidekiq — the same image as a Sidekiq worker: parses imports, reverse-geocodes points, rebuilds statistics and renders videos.
  • postgispostgis/postgis:17-3.5-alpine, storing every point as geography(Point,4326).
  • Redis — managed Redis: Sidekiq's queue, the Rails cache, live map updates and rate-limit counters, each on its own database.
  • Object storage bucket — uploaded import files and generated route videos.

Environment Variables Reference

VariablePurpose
DAWARICH_ADMIN_EMAILEmail for the account created on first boot
DAWARICH_ADMIN_PASSWORDPassword for that account
SECRET_KEY_BASERails signing key; also derives encryption keys
APPLICATION_HOSTSHostnames the app answers on; add custom domains here
APPLICATION_PROTOCOLhttps enables HSTS and secure cookies
ALLOW_EMAIL_PASSWORD_REGISTRATIONfalse keeps public signup closed
WEB_CONCURRENCY / RAILS_MAX_THREADSPuma workers and threads per worker
BACKGROUND_PROCESSING_CONCURRENCYSidekiq threads; raise for large imports
PHOTON_API_HOST / NOMINATIM_API_HOSTReverse-geocoding provider, if used

Deployment Dependencies

  • Source repository:
  • Upstream project:
  • Images: freikin/dawarich, postgis/postgis
  • Docs:

Hardware Requirements for Self-Hosting Dawarich

ResourceMinimumRecommended
CPU1 vCPU2+ vCPU
RAM2 GB4 GB (web + worker + PostGIS)
Storage5 GB volume10 GB+ for multi-year histories
RuntimeRuby 3.4, PostgreSQL 17 + PostGIS 3.5, Redis 7+

Points are compact — hundreds of thousands fit in a few gigabytes — but a large Takeout import is memory-hungry while parsing, so give the worker room.

Self-Hosting Dawarich

Dawarich publishes a Docker image and a Compose file covering all four containers. The shortest local path is to clone the repository and start it:

git clone https://github.com/Freika/dawarich.git
cd dawarich
docker compose -f docker/docker-compose.yml up -d

The database must be PostgreSQL with PostGIS — a plain postgres image fails on the first migration. A minimal database container:

docker run -d --name dawarich_db \
  -e POSTGRES_USER=dawarich \
  -e POSTGRES_PASSWORD=changeme \
  -e POSTGRES_DB=dawarich \
  -v dawarich_db_data:/var/lib/postgresql/data \
  postgis/postgis:17-3.5-alpine

Point the app at it with the DATABASE_HOST, DATABASE_PORT, DATABASE_NAME, DATABASE_USERNAME and DATABASE_PASSWORD variables, set REDIS_URL, and give both containers the same SECRET_KEY_BASE.

Is Dawarich Free?

Dawarich is open source under AGPL-3.0 and free to self-host, with no paid tier, seat limits or feature gates. The maintainer offers a hosted version too, but nothing here depends on it. On Railway you pay only for the compute, memory and storage the four services use. Reverse geocoding is the one place an external cost can appear, and only if you pick a paid provider.

FAQ

What is Dawarich? Dawarich is a self-hosted location history tracker — an open-source alternative to Google Timeline that maps where you have been, from your phone or from exports such as Google Takeout.

What does this Railway template deploy? Four services — the Dawarich web app, a Sidekiq worker, PostgreSQL with PostGIS, and Redis — plus an object storage bucket for uploads and rendered videos, wired together with a public HTTPS URL on the web app.

Why does this template include PostGIS instead of plain PostgreSQL? Dawarich stores every point as a geographic coordinate and uses PostGIS functions to calculate distances, detect visits and match points to countries. Its migrations enable the postgis extension explicitly, so a plain database will not start.

Why are there separate app and worker services? Imports, reverse geocoding and statistics are slow; running them in the worker keeps the map responsive while a multi-year archive is processed.

How do I import my Google Takeout location history into self-hosted Dawarich? Request a Takeout archive containing Location History, then upload it or its Records.json under My data → Imports → New import. The format is detected and the worker processes it in the background.

How do I track my phone with self-hosted Dawarich? Generate an API key in your account settings and point the Dawarich mobile app, OwnTracks, Overland or GPSLogger at your instance URL. Points then appear live.

Can other people sign up on my instance? No. Public registration is disabled by default, so only the account created on first boot exists. Enable it later with ALLOW_EMAIL_PASSWORD_REGISTRATION, or invite family from the Family screen.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
45
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51