Self-hosting10 min read

Self-host your GPS history with Dawarich on a VPS

In December 2023, Google announced the end of server-side Timeline storage: location data migrates to the device, and data hosted on Google's side is permanently deleted. Years of trips, stops, and geolocated memories disappear with the account or the phone. To regain control of this history and preserve it durably, there is a self-hosted open source solution that runs on any VPS with Docker — and its name is Dawarich.

What Google Timeline changed — and what you lose

On December 12, 2023, Google announced that location history would no longer be stored in the Google cloud: each user must migrate their data to their device before a deadline, after which Google's server deletes it with no possibility of recovery. On Android, this means your Timeline only exists as long as your phone exists — a replacement, a reset, or a deleted account wipes years of trips in seconds.

Beyond the technical loss, the episode reveals a structural dependency: when a cloud service decides to change the rules, your data follows — or disappears.

What you risk losing without an alternative

  • Years of trip history: holidays, business travel, daily geolocated habits.
  • Heatmaps and statistics built on that data — city visits, kilometres travelled.
  • Continuity of tracking if your phone is lost, stolen or reset.
  • The ability to cross-reference your location with your photos or calendars.
  • Web access to history, a feature removed with the local migration.
  • Any control over retention period: Google now imposes automatic deletion at 3 months by default.

Dawarich — sovereign GPS history

Dawarich is an open source web application (AGPL-3.0, over 10,000 stars on GitHub) designed specifically to replace Google Timeline on your own infrastructure. It ingests your Google Takeout data (JSON format), GPX and KML files, and stores them in a PostgreSQL database you manage.

Its map displays your trips as points or lines, with density heatmap, movement statistics and search by period or location. Integration with OwnTracks and Overland enables continuous real-time tracking from your phone, without going through any third-party service. Dawarich's API also exposes an Overland-compatible endpoint, simplifying mobile configuration.

What Dawarich can do

  • Import from Google Takeout export in JSON format, as well as GPX and KML files.
  • Display full history on an interactive map with heatmap and track layers.
  • Movement statistics: countries visited, cities, distance travelled per period.
  • Real-time tracking via OwnTracks and Overland mobile apps (iOS and Android).
  • Open API to export or cross-reference your data with other tools.
  • Multi-user management: each family member has their own isolated space.
  • Reverse geocoding via Photon, Nominatim, Geoapify or LocationIQ — your choice, no imposed dependency.

Prerequisites before deploying

Dawarich runs comfortably on a modest VPS. Here is what you need:

Server resources. 1 to 2 vCPU and 2 GB of RAM are sufficient for personal use. If you manage several years of data or multiple users, 4 GB is more comfortable for geocoding and heatmap generation.

Storage. Location data is lightweight (text and coordinates), but bulk imports from Google Takeout can weigh several hundred MB. An NVMe SSD significantly improves search and indexing speed. Plan for at least 10 GB, more depending on the size of your archives.

Software. Docker Engine and docker compose v2 installed on the server, a dedicated IPv4 address, and a domain name (for example geo.your-domain.com) to secure access over HTTPS.

Install Dawarich on your VPS

01

Update the server and install Docker

Connect via SSH to your VPS, then update packages with apt update && apt upgrade -y. Install Docker Engine following the official Docker procedure for your distribution (Ubuntu or Debian). Verify the installation with docker --version and docker compose version.

02

Create the working directory

Create a dedicated directory, for example mkdir -p /opt/dawarich && cd /opt/dawarich. This is where your docker-compose.yml and .env file will live.

03

Create the docker-compose.yml file

Create your docker-compose.yml with the following services: dawarich_app (the web interface and API), dawarich_sidekiq (the background job worker, notably for geocoding), and dawarich_db (PostgreSQL). Here is the base structure — adapt the password and secret:

services:
  dawarich_app:
    image: freikin/dawarich:latest
    environment:
      - APPLICATION_HOST=geo.your-domain.com
      - DATABASE_HOST=dawarich_db
      - DATABASE_NAME=dawarich
      - DATABASE_USERNAME=dawarich
      - DATABASE_PASSWORD=STRONG_PASSWORD
      - SECRET_KEY_BASE=LONG_64_CHAR_SECRET_KEY
      - MIN_MINUTES_SPENT_IN_CITY=60
    ports:
      - "3000:3000"
    depends_on:
      - dawarich_db
    volumes:
      - dawarich_public:/var/app/public
  dawarich_sidekiq:
    image: freikin/dawarich:latest
    command: sidekiq
    environment:
      - DATABASE_HOST=dawarich_db
      - DATABASE_NAME=dawarich
      - DATABASE_USERNAME=dawarich
      - DATABASE_PASSWORD=STRONG_PASSWORD
      - SECRET_KEY_BASE=LONG_64_CHAR_SECRET_KEY
    depends_on:
      - dawarich_db
      - dawarich_app
  dawarich_db:
    image: postgres:17-alpine
    environment:
      POSTGRES_USER: dawarich
      POSTGRES_PASSWORD: STRONG_PASSWORD
      POSTGRES_DB: dawarich
    volumes:
      - dawarich_db:/var/lib/postgresql/data
volumes:
  dawarich_public:
  dawarich_db:
04

Start the containers

Launch the stack with docker compose up -d. Docker downloads the images and starts the three containers. Verify everything is running with docker compose ps — all three services should show Up status.

05

Configure the reverse proxy and SSL

Point your domain geo.your-domain.com to the VPS IP, then configure a reverse proxy (Nginx or Caddy) to expose Dawarich over HTTPS. With Caddy, the configuration is minimal: geo.your-domain.com { reverse_proxy localhost:3000 }. Caddy automatically obtains and renews the Let's Encrypt certificate. With Nginx, use certbot to generate the certificate and configure a server block that proxies to localhost:3000.

06

Create the first administrator account

Open https://geo.your-domain.com in your browser and follow the registration wizard to create the administrator account. Choose a strong password: Dawarich potentially exposes several years of your movement history. Once logged in, explore the settings to configure your preferred geocoding provider.

07

Open only the required inbound ports

On your VPS firewall (or ufw on the server), allow only ports 80 and 443 from the outside. Port 3000 must never be exposed directly — only the reverse proxy accesses it internally. Verify with ufw status that the rule is in place before proceeding to import.

Importing your history from Google Takeout

The Google Takeout import is the central step to recover your data before Google deletes it server-side.

Export from Google. Go to takeout.google.com, uncheck all services and check only Location History. Choose JSON format (not KML) for a complete import into Dawarich. Google prepares a .zip archive sent by email or dropped in your Drive — depending on size, this can take several hours.

Locate the history file. Once the archive is downloaded and unzipped, the history file is at Takeout/Location History (Timeline)/Records.json. This is the file you will import into Dawarich.

Import into Dawarich. In the interface, go to Imports, click New import, select the Records.json file, choose the source type Google Phone and start the import. Depending on the archive size (several gigabytes for years of data), Sidekiq processing can take from a few minutes to several hours. Track progress in the Background jobs tab.

Real-time tracking with OwnTracks or Overland

Once the past history is imported, configure real-time tracking so your phone sends its position directly to Dawarich, without intermediary.

OwnTracks (iOS and Android) is an open source location tracking client. In the app settings, choose HTTP mode, enter the URL https://geo.your-domain.com/api/v1/owntracks/points and add your Dawarich API key in the authentication headers. OwnTracks sends updates at configurable intervals.

Overland (iOS) is a lightweight alternative designed for continuous battery-efficient tracking. In Dawarich, retrieve your Overland endpoint in Settings → Integrations and paste it into the Overland app on iPhone. The app automatically manages deferred sends when the network is unavailable.

Backups and updates

Your location data is worth years of digital life: back up the Docker volume dawarich_db regularly with docker exec dawarich_db pg_dump -U dawarich dawarich > backup.sql. To update Dawarich, run docker compose pull && docker compose up -d — database migration is automatic at startup. Check the CHANGELOG.md in the repository before any update: the project is active and some versions bring schema changes.

Why a VPS with root access changes everything

Most shared hosting plans forbid Docker, root access and arbitrary network sockets. Dawarich requires all three: a container orchestrator, direct filesystem access for import storage, and the freedom to expose an HTTP port.

A VPS with full root access, dedicated IPv4 and NVMe SSD gives you exactly what you need: the compute power to index several years of history, the bandwidth to receive continuous OwnTracks updates, and the persistence to never replay the import from a Google Takeout archive.

With ServOrbit, you launch a VPS on Ubuntu or Debian, get immediate root access, and Docker can be installed in under five minutes — the rest depends on your docker-compose.yml file, not a limiting interface.

Going further

Dawarich integrates naturally with other tools in your self-hosted infrastructure. If you already store your photos on Immich, the GPS coordinates of your images and your Dawarich history cover the same map. If you sync files between devices with Syncthing, you can export GPX tracks from Dawarich and share them to any device. And if Docker is new to you, the guide Getting started with Docker on VPS covers a clean installation on a fresh server. For budget tracking tools and other personal data apps, Actual Budget on VPS follows the same sovereignty logic.

A VPS to store years of GPS history

Dawarich runs on any VPS with Docker, root access and NVMe SSD. No location data ever leaves your infrastructure.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.