OwnTracks – your own Tracking Server

Version: 25.09.07

OwnTracks is an open-source project for privately recording and sharing location data over HTTP—directly from your smartphone to your own server.
The Recorder is a lightweight server component that stores and manages position reports and exposes an API (ideal for self-hosting). The Frontend is the companion web interface that lets you easily view and explore your tracks, places, and geofences on maps. Together, Recorder and Frontend provide a privacy-friendly, self-hosted solution for live tracking and location history.

What can OwnTracks be used for?
  • Family & friends: Quickly share your location and see if someone arrived safely.
  • Your own kids (with consent): Keep an eye on the route to school and get a notice like “has arrived/has left.”
  • Meetups & trips: Find each other more easily and see who’s already nearby.
  • Sports & outdoors: Record running, cycling, or hiking routes and view them on the map later.
  • Small teams: Get an overview of where everyone roughly is right now.
Requirements:
  • Basic Linux command-line skills
    (SSH, editing files, checking services/logs)
  • Your own VPS/server with a domain
  • Public domain with access to DNS records
    (A/AAAA, optional CNAME)
  • Static public IP recommended (VPS / home server)
  • Docker & Docker Compose installed

Quick check:

Nginx Proxy Manager (NPM) installed and configured
– for Let’s Encrypt certificates (HTTPS) and access protection (Basic Auth / Access Lists)

Access to DNS — a domain/subdomain for the OwnTracks setup (e.g., tracks.yourdomain.com / maps.yourdomain.com) pointing to your server

1. docker-compose.yml and project folder

Create a new folder in your project directory. For example:

A docker-compose.yml is then created in the /home/owntracks folder

The following content goes into the docker-compose.yml:

As an explanation:

The OwnTracks recorder is available on port 8083. We’ll make this port public later at https://tracks.yourdomain.com. The OwnTracks web interface is available on port 8101. We’ll make this port public later at https://maps.yourdomain.com. In the /home/owntracks/ folder, we’ll create a subfolder called “config”:

And in the config folder the following file is added: recorder.conf with the following content

Contents:

Now we return to the folder /home/owntracks/ and start the docker-compose.yml

The OwnTracksRecorder and the OwnTracksFronted(website) should already be running.

2. Create DNS names

We’ll create two A and AAAA DNS records with your VPS provider (e.g., Hetzner.com):

  • maps.yourdomain.com
  • tracks.yourdomain.com

The first is the page where you can view where each person is located.
The second is the URL to which the Android app (for example) sends its location data.

3. Configure Nginx Proxy Manager (NPM):

We are now also setting up these domains with SSL certificates in NPM:

Important in our configuration:

  • maps.yourdomain.com127.0.0.1 on port 8101
  • tracks.yourdomain.com127.0.0.1 on port 8083

Exactly as configured in the docker-compose.yml above. Requirement: NPM and OwnTracks run on the same machine.

To prevent unauthorized access to location data, we protect maps.yourdomain.com with a username and password.

This is easy to do in NPM using Access Lists.

Then click save and everything is fine.

4. VERY IMPORTANT ! (Prevent Leaks) !!

Do not allow leaks or let third parties access your movement data (family/friends/children). To achieve this, further restrict the recorder in NPM (tracks.yourdomain.com):

Allow only /pub (POST only), and block or protect /api/ and /ws/. You should also not expose the recorder directly on the host so no one can bypass NPM (or block the ports via the firewall).

The following “Custom Locations” (tracks.yourdomain.com) are required:

Enter this custom code as well (see screenshot):

Enter the following in each case (see screenshot):

This step is very important to ensure that third parties cannot view any data via your “tracks.yourdomain.com” page.

And in the “Advanced” tab of the “tracks” domain, also add:

Done: everything is now set up on the server side.

5. Install Android App / IOS App

Install the App:

Grant and assign all permissions:

Click on settings/preferences:

Enter the connection data to your server:

Mode = HTTP
Host = https://tracks.yourdomain.com/pub (Important, not: maps.yourdomain.com!)
Port = Leave blank at HTTP
ClientID = Leave blank at HTTP
DeviceID = Name for example tomphone
TrackerID = 1 (use consecutive numbers, or e.g., “tp”)
Username and Password: Leave blank

That’s all. 😀

The app now sends current location data to your own server, and everything can be reviewed and tracked live at https://maps.yourdomain.com


bc1q8dxp9mlt3mkvaklu2vn8j6jteqyv53kschc90v

Lightning: itsc@strike.me