Deploy Dawarich

GPS location history and timeline. Google Timeline, OwnTracks, Traccar.

Deploy Dawarich

Just deployed

/data

Just deployed

/var/lib/postgresql/data

Just deployed

/var/app/storage

Dawarich on Railway

One-click template for Dawarich, a self-hosted location history tracker and private alternative to Google Timeline. Track your location with the Dawarich mobile app, OwnTracks, or Overland; import your Google Takeout history; visualize trips, visits, stats, and heatmaps on your own server.

Deploy on Railway

Reference deploy verified 2026-11-17 against Dawarich 1.23.0: healthcheck ok, seeded login works, GPS point ingested via the OwnTracks API, GPX import processed by the embedded background worker, points returned by the API, data survived a restart.


What gets deployed

ServiceImagePurpose
Dawarichfreikin/dawarich:latestRails web app with the Sidekiq background worker embedded in the same process (upstream's default since 1.17). Public HTTP on port 3000, volume at /var/app/storage.
Postgrespostgis/postgis:17-3.5-alpineDatabase. PostGIS is required by Dawarich, so Railway's managed Postgres won't work. Volume at /var/lib/postgresql/data.
Redisredis:8.10.3Job queue for the background worker. Volume at /data. Config mirrored from Railway's verified Redis Inc. template (do not use Bitnami images; their public Docker Hub tags were purged in Aug 2025).

All secrets (SECRET_KEY_BASE, database and Redis passwords) are generated per deploy with ${{secret()}}. Services talk over Railway's private network; only the app is public. Expect roughly 0.75 GB of steady RAM across the three services on an idle instance (measured: app 0.39, Postgres 0.30, Redis 0.05).

Why web + worker share one service

Dawarich stores uploaded files (imports/exports) on local disk by default, and both the web process and the worker need to read them. Railway volumes cannot be attached to two services, so splitting web and Sidekiq into separate services silently breaks file imports. With SIDEKIQ_EMBEDDED=true, Sidekiq runs inside the puma process, so one container and one volume serve both and RAM stays low (WEB_CONCURRENCY=0 = puma single mode, 2 worker threads; upstream's own compose defaults).


Deployer guide

1. Deploy

Click the Deploy button, confirm, and wait. The first boot runs the full database migration set and seeds country boundary data, so give it 3 to 6 minutes before the healthcheck goes green.

2. First login

Open the Dawarich service's public URL and log in with the default account every Dawarich install ships with:

  • Email: demo@dawarich.app
  • Password: safepassword

Change both immediately (top-right menu, Account / Settings). This default is public knowledge.

3. Get your API key

Your API key is shown in Account settings. Every tracking client below authenticates with it.

4. Start tracking

Pick one (all can run simultaneously):

  • Dawarich mobile app (iOS/Android): enter your instance URL and API key.
  • OwnTracks: point it at https://YOUR-DOMAIN/api/v1/owntracks/points?api_key=YOUR_API_KEY.
  • Overland: point it at https://YOUR-DOMAIN/api/v1/overland/batches?api_key=YOUR_API_KEY.

Full client setup docs: dawarich.app/docs

5. Import existing history

Settings, Imports in the web UI. Supported: Google Takeout (Records.json / Semantic History), GPX, GeoJSON, OwnTracks exports, and more. Uploads are stored on the service volume and processed by the background worker; large Takeout archives can take a while, watch progress under Imports.

Note: Dawarich's "watched folder" import feature does not work on this template (Railway allows one volume per service, and the watched dir is not on it). Use the web UI or API for imports.

6. Optional configuration

Set these on the Dawarich service (Variables tab). Full list: Dawarich environment variables.

VariableDefaultNotes
TIME_ZONEUTCRails time zone, e.g. Europe/Berlin, Asia/Karachi.
WEB_CONCURRENCY0Puma workers (0 = single mode). Embedded Sidekiq also starts in each worker if you raise it.
BACKGROUND_PROCESSING_CONCURRENCY2Sidekiq threads. Raise temporarily for large imports.
SMTP_SERVER, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORDunsetOutbound email (password resets etc).
OTP_ENCRYPTION_PRIMARY_KEY, OTP_ENCRYPTION_DETERMINISTIC_KEY, OTP_ENCRYPTION_KEY_DERIVATION_SALTunsetRequired only if you enable two-factor auth.
STORE_GEODATAtrueStore reverse-geocoding data.

7. Custom domain

Attach the domain to the Dawarich service in Railway (Settings, Networking), then append it to APPLICATION_HOSTS (comma-separated, no protocol). Rails rejects unknown Host headers, so skipping the second step gets you blocked requests.

8. Upgrading Dawarich

The template tracks freikin/dawarich:latest. Redeploying the Dawarich service pulls the newest release and runs its migrations on boot. Check the changelog before big jumps; upstream occasionally ships required manual steps.

9. Scaling up later

Switch file storage to any S3-compatible bucket: set STORAGE_BACKEND=s3 plus AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_BUCKET, and AWS_ENDPOINT_URL for non-AWS backends (a Railway bucket works). Once files are off local disk you can split Sidekiq into its own service: same image and variables, start command sidekiq-entrypoint.sh sidekiq, no volume; then set SIDEKIQ_EMBEDDED=false on the web service.


Troubleshooting

SymptomCauseFix
Every deploy fails with "service unavailable" healthcheck errors while app logs look healthyTarget port not set, or Rails force-SSL redirecting the proberSet the domain's target port to 3000 explicitly; keep APPLICATION_PROTOCOL=http (TLS still terminates at Railway's edge)
Imports stay in "created" and never processBackground worker not runningKeep SIDEKIQ_EMBEDDED=true and the start command web-entrypoint.sh rails server -p 3000 -b :: (deploys made before 2026-11-17 use a foreman start command that still works)
Redis service fails instantly with no logsImage tag cannot be pulled (e.g. any bitnami/redis tag)Use official redis:8.10.3 with the start command from template.json
Postgres fails on first boot with an initdb "directory not empty" errorVolume root contains lost+foundKeep PGDATA=/var/lib/postgresql/data/pgdata (subdirectory)
Blocked requests / 403 after adding a custom domainHost not in the allowlistAppend the domain to APPLICATION_HOSTS
First deploy stuck then fails after 10 minutesFirst-boot migrations exceeded the healthcheck window on a slow startThe composer cannot set a healthcheck timeout, so deploys get the 300s default; a normal first boot takes 2 to 3 minutes. If it misses the window, just retry the deploy, the second boot is much faster


Template Content

More templates in this category

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

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0