File: README.md
๐ Dawarich: Your Self-Hostable Location History Tracker
Screenshots
Map View
Timeline View
Insights Page
Family Page
Statistics Overview
Trips page
About Dawarich
If you're looking for Dawarich Cloud, where everything is managed for you, check out Dawarich Cloud.
Dawarich is a self-hostable web app designed to replace Google Timeline (aka Google Location History).
It enables you to:
- Track your location history.
- Visualize your data on an interactive map.
- Create trips and analyze your travel history.
- Share your location with family members.
- Integrate with photo management apps like Immich and Photoprism to visualize geotagged photos.
- Import your location history from Google Maps Timeline, OwnTracks, GPX, GeoJSON and some other sources
- Explore statistics like the number of countries and cities visited, total distance traveled, and more!
- Share your location with family members.
Changelog: Find the latest updates here.
**Contribute**: See [CONTRIBUTING.md](CONTRIBUTING.md) for how to contribute to Dawarich.
โ ๏ธ Disclaimer
Updating strategy
- DO NOT UPDATE AUTOMATICALLY: Read release notes before updating. Automatic updates may break your setup.
- Under active development: Expect frequent updates, bugs, and breaking changes.
- Do not delete your original data after importing into Dawarich.
- Backup before updates: Always backup your data before upgrading.
- Stay up-to-date: Make sure you're running the latest version for the best experience.
๐งญ Supported Location Tracking
You can track your location with the following apps:
- ๐ซ Dawarich for iOS
- ๐ค Dawarich for Android
- ๐บ๏ธ Dawarich Community (Android)
- ๐ Overland
- ๐ฐ๏ธ OwnTracks
- ๐งญ GPSLogger
- ๐ฑ PhoneTrack
- ๐ก Home Assistant
Simply install one of the supported apps on your device and configure it to send location updates to your Dawarich instance.
How to Start Dawarich Locally
- Clone the repository.
- Run the following command to start the app:bash
docker compose -f docker/docker-compose.yml up - Access the app at
http://localhost:3000.
To stop the app, press Ctrl+C.
You can use default values or create a .env file based on .env.example to customize your setup.
How to Install Dawarich
Default Credentials
- Username:
[email protected] - Password:
safepassword
Feel free to change them in the account settings.
Features
Location Tracking
- Track your live location using one of the supported apps.
Location History Visualization
- View your historical data on a map with customizable layers:
- Heatmap
- Points
- Lines between points
- Fog of War
Family Sharing
- Share your location with family members.
- View locations of family members on the map (with their consent).
- Each family member can enable or disable location sharing individually.
Areas
- Draw areas on the map so Dawarich could suggest your visits there.
Visits (Beta)
- Dawarich can suggest places you've visited and allow you to confirm or reject them.
Statistics
- Analyze your travel history: number of countries/cities visited, distance traveled, and time spent, broken down by year and month.
Insights
- Get insights about your location history, like "Your most visited place is home, with 120 visits", or "You spent 30 days in Paris in 2024".
Days in country
- See how many days you've spent in each country. Useful for tax residency purposes or just to see where you spend most of your time.
Trips
- Create a trip to visualize your travels between two points in time. You'll be able to see the route, distance, and time spent, and also add notes to your trip. If you have Immich or Photoprism integration, you'll also be able to see photos from your trips!
Integrations
- Provide credentials for Immich or Photoprism (or both!) and Dawarich will automatically import geodata from your photos.
- You'll also be able to visualize your photos on the map!
Import Your Data
- Import from various sources:
- Google Maps Timeline
- OwnTracks
- Strava
- Immich
- GPX/GeoJSON files
- Photosโ EXIF data
Export Your Data
- Export your data to GeoJSON or GPX formats.
๐ Guides and Tutorials
- Set up Reverse Proxy
- Import Google Takeout
- Track Location with Overland
- Track Location with OwnTracks
- Export Your Data
More guides available in the Docs.
Environment Variables
Check the documentation on the website for detailed information about environment variables and settings.
Star History
As you could probably guess, I like statistics.
File: docs/How_to_extract_geodata_from_photos.md
User Guide: Importing GPS Coordinates from your photos into Dawarich
Introduction:
This user guide provides step-by-step instructions on how to extract GPS coordinates from photos and import it into the Dawarich service.
This process is useful for adding points of interest from memorable locations into Dawarich, especially when Google Location History is unavailable or was not initially enabled.
Requirements:
- Mac OS operating system
- exiftool software installed
- exiftool template created
Steps to Import GPS Coordinates into Dawarich:
- Download and install exiftool from the official website.
- Create an empty template text file, name it as
gpx.fmtand paste the code provided below into it.
#------------------------------------------------------------------------------
# File: gpx.fmt
#
#
# Usage: exiftool -p gpx.fmt -ee3 FILE [...] > out.gpx
#
# Requires: ExifTool version 10.49 or later
#
# Revisions: 2010/02/05 - P. Harvey created
# 2018/01/04 - PH Added IF to be sure position exists
# 2018/01/06 - PH Use DateFmt function instead of -d option
# 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
#
# Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
# 2) The -ee3 option is to extract the full track from video files.
# 3) The -fileOrder option may be used to control the order of the
# generated track points when processing multiple files.
#------------------------------------------------------------------------------
#[HEAD]<?xml version="1.0" encoding="utf-8"?>
#[HEAD]<gpx version="1.0"
#[HEAD] creator="ExifTool $ExifToolVersion"
#[HEAD] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
#[HEAD] xmlns="http://www.topografix.com/GPX/1/0"
#[HEAD] xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
#[HEAD]
#[HEAD]<number>1</number>
#[HEAD]
#[IF] $gpslatitude $gpslongitude
#[BODY]
#[BODY] <ele>$gpsaltitude#</ele>
#[BODY] <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
#[BODY]
#[TAIL]
#[TAIL]
#[TAIL]</gpx>- Create a separate directory for the photos from which you want to extract coordinates.
- Move the necessary photos and
gpx.fmttemplate to this directory. - Open Terminal and navigate to the directory containing the photos.
Command to Execute:
exiftool -if '$gpsdatetime' -fileOrder gpsdatetime -p ./gpx.fmt -d %Y-%m-%dT%H:%M:%SZ *JPG > output.gpxNote: Ensure that exiftool is properly installed on your system, and the file 'gpx.fmt' is located in the same directory as the photos.
- GPX-track based on photo's GPS-coordinates and dates will be placed as
output.gpxfile into the same directory. - Go to Dawarich webpage, select Imports, click "New Import" button, select source โ gpx and choose
output.gpxfile. - After the import processed all GPX-points will be added to Dawarich map.
File: docs/How_to_install_Dawarich_in_k8s.md
How to install Dawarich on Kubernetes
An unofficial Helm chart is available here. For a manual installation using YAML manifests, see below.
Prerequisites
- Kubernetes cluster and basic kubectl knowledge.
- Some persistent storage class prepared, in this example, Longhorn.
- Working Postgres and Redis instances. In this example Postgres lives in 'db' namespace and Redis in 'redis' namespace.
- Ngingx ingress controller with Letsencrypt integeation.
- This example uses 'example.com' as a domain name, you want to change it to your own.
- This will work on IPv4 and IPv6 Single Stack clusters, as well as Dual Stack deployments.
Installation
Namespace
kubectl create namespace dawarichPersistent volume claims
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: dawarich
name: public
labels:
storage.k8s.io/name: longhorn
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: dawarich
name: watched
labels:
storage.k8s.io/name: longhorn
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 1GiDeployment
/* Detailed source-code truncated for AI context efficiency. */Service and Ingress
---
apiVersion: v1
kind: Service
metadata:
namespace: dawarich
labels:
service: dawarich
name: dawarich
spec:
ports:
- protocol: TCP
port: 3000
targetPort: 3000
selector:
app: dawarich
---
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: dawarich
name: dawarich-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-body-size: 1000m
spec:
tls:
- hosts:
- dawarich.example.com
secretName: letsencrypt-prod
rules:
- host: dawarich.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: dawarich
port:
number: 3000File: docs/How_to_install_Dawarich_on_Synology.md
How to install Dawarich on Synology using Docker
Preparation
Container manager
Firstly you need to install Container manager on your DSM.
- Open Synology DSM web UI.
- In the main menu open Package Center.
- Search Container Manager in the "open source" section.
- Install that.
Web station
Do the same for Web station packet.
Project folder preparation
Docker root share
If you don't yet have separate share for docker projects would be good to create it.
If you don't want to use dedicated share for projects installed by docker skip it and go to the next chapter.
- Open Control panel -> Shared folder -> Create -> Create shared folder
- Set name, for example docker, and location.
- Check Hide this shared folder in "My Network Places". This hides this folder from listening by smb, afp, ftp shares.
- Click Next several times until you see Configure user permissions window.
- Check Read/write access for your user and No Access for all another.
Dawarich root folder
- Open your Docker root folder in File station.
- Create new folder dawarich and open it.
- Create folders redis, db_data, db_shared and public in dawarich folder.
- Copy docker compose and .env files form synology repo folder into dawarich folder on your synology.
Installation
Project create
- Open Container Manager -> Projects -> Create
- In create project window.
- Set project name as you wish.
- Set path to Dawarich root folder.
- DSM asks about existed docker-compose file, choose use existing a docker-compose.yml to create the project.
- Click Next.
- Check Set up web portal via Web Station.
- Select container name, port, and http protocol (not https).
- Click "Next".
- Uncheck Start the project once it is created.
- Click "Done".
- In the popup "dawarich has been created. Go to Web Station to configure the web portal for the container." click "OK". Web station Portal Creation Wizard will be opened.
- Set portal type to Name-based.
- Set hostname as your wish. For example, if your DSM has hostname my-syno.com, you can use dawarich.my-syno.com.
- Check HTTPS settings - HSTS
I expected that you have configured the certificate in DSM. See Control panel -> Security -> Certificate. For example, previously you configured QuickConnect or DynDNS (DDNS). See Control panel -> External Access
- Click Create.
Configuration
DNS
On your local DNS server, you need to add new record with dawarich.my-syno.com and IP address of Synology (see Control panel -> Network -> Network Interface in your DSM) to provide correct access to Dawarich, or just use wildcard *.my-syno.com record to resolve all subdomains my-syno.com to Synology ip.
Please read the documentation of your DNS server to understand how to do it.
If you don't yet have a DNS server you can install Synology DNS.
Don't forget to reconfigure your DHCP server or all device settings in your local network to use this DNS server.
Dawarich
Open /Docker root folder/Dawarich root folder/.env file in any text editor. For example, you can use Text editor package or download it from File station, edit locally and upload it back, or get access by file share.
Update your
APPLICATION_HOSTSvalue to include your Dawarich hostname that you set in Web station. In example above dawarich.my-syno.com. If you want to set multiple hosts, separate them by a comma:dawarich.my-syno.com,dawarich2.my-syno.com.Set your current
TIME_ZONE. The full list here.Optionally change
DATABASE_USERNAME,DATABASE_USERNAME,DATABASE_NAME.Click on the name of your project.
Open YAML Configurations tab.
Run
- Open Container Manager -> Projects ->dawarich
- In the top right corner click Action -> Build
- Wait until the popup writes that all is done and wait a few minutes more until all apps in containers start.
- Open it by your hostname. In this example https://dawarich.my-syno.com
Link in the Main menu
There are two possible options:
- With Web station. But you will have the default web station icon.
- With custom application for Package Center.
Web station
- Open Web station -> Web Portal -> dawarich (project).
- Check Create shortcut on main menu and set link name.
Custom application
Synology allows you to create custom applications and install them by Package Center
Here you can find a tool that creates dummy applications only with icon on the main menu.
You can use this tool and create your own app, or use the prepared one in this repo. But you need to change url to Dawarich inside it.
- Edit
update.shfromsynologyfolder. And in the first lines set correct values forauthorandURL. - Run
update.sh. When the script finishes you will see thespkandDawarich.spkin the same folder.
If you don't have Linux console you can create a temporal docker project to generate spk package.
- Create a new folder in Docker root folder.
- Create subfolder
appand copyupdate.shandspk.tgzinto this subfolder. - Open Container Manager -> Projects -> Create.
- Set any name, set a newly created folder, and set Create docker-compose.yml.
- Copy the text below to the text field.
name: spk-template
services:
spk-template:
container_name: spk-template
image: alpine
restart: unless-stopped
working_dir: /app
volumes:
- ./app:/app
command:
- /app/update.shClick Next, Next, Done
The container should run and finish automatically.After that you can see
spkandDawarich.spkin theappfolder.Check
urlinspk/package/ui/configfile andmaintaineranddistributorinspk/INFOfile.Open Package Center, click on Manual Install, select
Dawarich.spk, agree with the security notice, and install it.
File: docs/How_to_install_Dawarich_using_Docker.md
How to install Dawarich using Docker
To do that you need previously install Docker on your system.
To quick Dawarich install copy the contents of the docker-compose.yml file from project root folder to dedicated folder in your server and run docker compose up in this folder.
This command use docker-compose.yml to build your local environment.
When this command done successfully and all services in containers will start you can open Dawarich web UI by this link http://127.0.0.1:3000.
Default credentials for first login in are [email protected] and safepassword.
File: docs/how_to_setup_reverse_proxy.md
Setting up reverse proxy
Environment Variable
To make Dawarich work with a reverse proxy, you need to ensure the APPLICATION_HOSTS environment variable is set to include the domain name that the reverse proxy will use.
For example, if your Dawarich instance is supposed to be on the domain name timeline.mydomain.com, then include "timeline.mydomain.com" in this environment variable.
Make sure to exclude "http://" or "https://" from the environment variable. โ ๏ธ The webpage will not work if you do include http:// or https:// in the variable. โ ๏ธ
At the time of writing this, the way to set the environment variable is to edit the docker-compose.yml file. Find all APPLICATION_HOSTS entries in the docker-compose.yml file and make sure to include your domain name. Example:
dawarich_app:
image: freikin/dawarich:latest
container_name: dawarich_app
...
environment:
...
APPLICATION_HOSTS: "yourhost.com,www.yourhost.com,127.0.0.1" <-- Edit thisdawarich_sidekiq:
image: freikin/dawarich:latest
container_name: dawarich_sidekiq
...
environment:
...
APPLICATION_HOSTS: "yourhost.com,www.yourhost.com,127.0.0.1" <-- Edit this
...For a Synology install, refer to Synology Install Tutorial. In this page, it is explained how to set the APPLICATION_HOSTS environment variable.
Virtual Host
Now that the app works with a domain name, the server needs to be set up to use a reverse proxy. Usually, this is done by setting it up in the virtual host configuration.
Below are examples of reverse proxy configurations.
Nginx
server {
listen 80;
listen [::]:80;
server_name example.com;
brotli on;
brotli_comp_level 6;
brotli_types
text/css
text/plain
text/xml
text/x-component
text/javascript
application/x-javascript
application/javascript
application/json
application/manifest+json
application/vnd.api+json
application/xml
application/xhtml+xml
application/rss+xml
application/atom+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-font-opentype
application/x-font-truetype
image/svg+xml
image/x-icon
image/vnd.microsoft.icon
font/ttf
font/eot
font/otf
font/opentype;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:3000/;
}
}Apache2
For Apache2, you might need to enable some modules. Start by entering the following commands so the example configuration below works without any problems.
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod headers
sudo a2enmod brotliWith the above commands entered, the configuration below should work properly.
<VirtualHost *:80>
ServerName example.com
ProxyRequests Off
ProxyPreserveHost On
Require all granted
Header always set X-Real-IP %{REMOTE_ADDR}s
Header always set X-Forwarded-For %{REMOTE_ADDR}s
Header always set X-Forwarded-Proto https
Header always set X-Forwarded-Server %{SERVER_NAME}s
Header always set Host %{HTTP_HOST}s
SetOutputFilter BROTLI
AddOutputFilterByType BROTLI_COMPRESS text/css text/plain text/xml text/javascript application/javascript application/json application/manifest+json application/vnd.api+json application/xml application/xhtml+xml application/rss+xml application/atom+xml application/vnd.ms-fontobject application/x-font-ttf application/x-font-opentype application/x-font-truetype image/svg+xml image/x-icon image/vnd.microsoft.icon font/ttf font/eot font/otf font/opentype
BrotliCompressionQuality 6
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
</VirtualHost>Caddy
Here is the minimum Caddy config you will need to front Dawarich with. Please keep in mind that if you are running Caddy separately from your Dawarich stack, you'll need to have a network that is shared between them.
First, create the Docker network that will be used between the stacks, if needed:
docker network create frontendSecond, create a Docker network for Dawarich to use as the backend network:
docker network create dawarichAdjust the following part of your Dawarich docker-compose.yaml, so that the web app is exposed to your new network and the backend Dawarich network:
networks:
dawarich:
frontend:
external: true
services:
...Lastly, edit your Caddy config as needed:
{
http_port 80
https_port 443
}
timeline.example.com {
reverse_proxy dawarich_app:3000
encode brotli {
match {
content_type text/css text/plain text/xml text/x-component text/javascript application/x-javascript application/javascript application/json application/manifest+json application/vnd.api+json application/xml application/xhtml+xml application/rss+xml application/atom+xml application/vnd.ms-fontobject application/x-font-ttf application/x-font-opentype application/x-font-truetype image/svg+xml image/x-icon image/vnd.microsoft.icon font/ttf font/eot font/otf font/opentype
}
}
}timeline.example.com is an example, use your own (sub) domain.
Please note that the above configurations are just examples and that they contain the minimum configuration needed to make the reverse proxy work properly. Feel free to adjust the configuration to your own needs.