Dawarich: Self-Hosted Google Maps Timeline Alternative
Google Maps Timeline records everywhere you've been — every trip, every stop, every route. It's genuinely useful for recalling where you were. But the data stays in Google's hands, and losing your Google account means losing years of location history. Dawarich is a self-hosted alternative that imports your historical location data and provides the same browsable map interface, under your control.
Photo by Team Nocoloco on Unsplash
What Dawarich Does
- Import Google Takeout data: Upload your exported Google location history and browse it on a map
- Continuous tracking: Connect mobile apps (OwnTracks, Overland) for ongoing location logging
- Map view: Browse location history by date range, see routes and stops
- Stats: Trip distance, visited countries, time spent at locations
- Reverse geocoding: Place names for coordinates
- API: REST API for external integrations
Docker Compose Setup
services:
dawarich_app:
image: freikin/dawarich:latest
container_name: dawarich_app
restart: unless-stopped
ports:
- 3000:3000
volumes:
- dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379/0
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: changeme
DATABASE_NAME: dawarich
MIN_MINUTES_SPENT_IN_CITY: 60
APPLICATION_HOSTS: localhost,dawarich.yourdomain.com
TIME_ZONE: America/Los_Angeles
APPLICATION_PROTOCOL: http
depends_on:
- dawarich_db
- dawarich_redis
dawarich_sidekiq:
image: freikin/dawarich:latest
container_name: dawarich_sidekiq
restart: unless-stopped
command: sidekiq
volumes:
- dawarich_public:/var/app/public
- dawarich_watched:/var/app/tmp/imports/watched
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379/0
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: changeme
DATABASE_NAME: dawarich
APPLICATION_HOSTS: localhost,dawarich.yourdomain.com
depends_on:
- dawarich_db
- dawarich_redis
dawarich_db:
image: postgres:15
container_name: dawarich_db
restart: unless-stopped
volumes:
- dawarich_db:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: changeme
POSTGRES_DB: dawarich
dawarich_redis:
image: redis:7
container_name: dawarich_redis
restart: unless-stopped
volumes:
dawarich_public:
dawarich_watched:
dawarich_db:
Navigate to http://your-server:3000. Create an account on first run.
Importing Google Location History
- Go to Google Takeout → select "Location History (Timeline)" → export
- Google sends a download link (can take hours for large histories)
- Extract the ZIP — find
Takeout/Location History/Records.json(the main file) - In Dawarich: Settings → Import → upload the file
The import processes asynchronously via Sidekiq. Large files (years of location data) take 10-60 minutes.
Supported import formats:
- Google Takeout JSON (
Records.json) - Google Takeout older format (
Location History.json) - OwnTracks
.recfiles - GPX files
Ongoing Tracking
For continuous location logging after the initial import:
OwnTracks (iOS/Android)
OwnTracks is an open-source mobile location app:
- Install OwnTracks from the App Store / Play Store
- Configure HTTP mode:
- Host:
https://dawarich.yourdomain.com - Port: 443
- Path:
/api/v1/points - Authentication: your API key from Dawarich settings
- Host:
OwnTracks sends location updates whenever you move significantly, using minimal battery.
Overland (iOS)
Overland is a GPS logger app by Aaron Parecki:
- Configure endpoint:
https://dawarich.yourdomain.com/api/v1/overland/batches - Add your API key in query params or headers
Browsing Location History
The main map view:
- Timeline: Browse by day, week, month, or year
- Heatmap: See density of visits across the map
- Trips: Automatically detected journeys between locations
- Stats: Countries visited, distance traveled, most visited places
The reverse geocoding feature (Nominatim or Photon) converts coordinates to place names — "Home," "Office," city names — rather than showing raw coordinates.
Reverse Geocoding Setup
Dawarich uses a geocoding API to resolve coordinates to names. Options:
Photon (self-hosted, recommended):
# Add to docker-compose.yml
photon:
image: cottonpaperback/photon:latest
restart: unless-stopped
# Requires ~50GB for the full dataset
Nominatim (self-hosted OpenStreetMap geocoding): heavier resource requirements.
External APIs: Configure OpenCage or similar in Dawarich settings (incurs API costs).
For most homelabs, using the Photon public API (https://photon.komoot.io) works without self-hosting, though it sends coordinate queries externally.
Privacy Considerations
The whole point is keeping location data off Google. With Dawarich self-hosted:
- All location history stays on your server
- Map tiles still come from external sources (OpenStreetMap CDN) by default — your IP is visible when loading tiles, but not your location queries
- For full privacy, host your own map tiles (heavier setup)
Resource Usage
- RAM: 200-400MB (Rails app + Sidekiq + Redis + PostgreSQL)
- Storage: Depends on history length. 5 years of active location data: ~1-3GB
- CPU: Low during normal operation, higher during initial import
Runs comfortably on any server with 1GB RAM available.
Backup
# Backup the PostgreSQL database
docker exec dawarich_db pg_dump -U postgres dawarich | gzip > dawarich-$(date +%Y%m%d).sql.gz
# Backup uploaded files
docker run --rm -v dawarich_public:/data -v $(pwd):/backup alpine \
tar czf /backup/dawarich-public-$(date +%Y%m%d).tar.gz /data
The project is at github.com/Freika/dawarich. For anyone who values their location history but doesn't want Google keeping it, Dawarich is the most polished self-hosted alternative available.
