keepcalculator

06 Numbers and Powers

Self-Hosting Location History: Is It Worth It?

Card No. 06·87993 · Updated · Standard formula, shown below

Yes, self-hosting location history is worth it for privacy-conscious users who want full control over their data, but it requires technical setup and ongoing maintenance. You trade the convenience of a cloud service like Google Timeline for ownership of your location data, stored on your own hardware. This article explains what self-hosting location history involves, the options available, and the trade-offs you need to consider.

What Does Self-Hosting Location History Mean?

Self-hosting location history means running your own server (at home or on a VPS) to collect and store the location data from your phone or other devices. Instead of sending your GPS coordinates to a third-party service like Google or Apple, you send them to a server you control. This server runs software that records your location at regular intervals, stores it in a database, and often provides a web interface to view your past movements on a map.

The core idea is data ownership. When you self-host, you decide who can access the data, how long it is kept, and how it is processed. This is a stark contrast to commercial services that may use your location data for advertising, product improvement, or sharing with third parties (even if anonymized). For many, the peace of mind of having no corporate entity holding a detailed map of your life is the primary motivator.

How It Works: The Tech Stack

A typical self-hosted location history setup involves three main components:

  • Tracking app on your phone: An app like OwnTracks, Traccar Client, or GPSLogger runs in the background and periodically sends your location to your server. These apps are usually open-source and allow you to configure the frequency of updates, use GPS or network location, and set privacy zones.
  • Server software: The server receives the data and stores it. Popular options include OwnTracks (with its own server component), Traccar (a full GPS tracking platform), and Home Assistant (which can integrate with various tracking apps and store history). These run on a Raspberry Pi, an old PC, or a rented VPS.
  • Database and visualization: The server stores the coordinates in a database (like SQLite or PostgreSQL). A web interface then displays the data on a map, often with a timeline view, allowing you to see where you were at any given time.

Most tracking apps use HTTP or MQTT to send data. MQTT is a lightweight messaging protocol that is efficient for mobile devices, as it uses less battery and data. The server subscribes to the MQTT topic and writes the data to the database.

Choosing the Right Software

Your choice of software will depend on your technical comfort level and what features you need. Here are the most common options:

  • OwnTracks: A mature, open-source project that offers a simple app and server (or you can use an MQTT broker). It focuses on privacy and simplicity. The web interface is clean and shows your current location and past tracks.
  • Traccar: A more advanced GPS tracking system that supports many devices and protocols. It has a rich web interface with geofencing, reports, and alerts. It is heavier than OwnTracks but offers more functionality.
  • Home Assistant: If you already use Home Assistant for home automation, you can use its companion app to track your phone and store location history. It integrates with your existing setup and can trigger automations based on your location.
  • Nextcloud with Maps: Nextcloud is a self-hosted productivity suite, and its Maps app includes a location tracking feature. It is easy to set up if you already run Nextcloud, but it is not as specialized as the others.

For most people, OwnTracks is the best balance of simplicity and privacy. Traccar is better if you need detailed reports or want to track multiple assets (like a car or a pet).

Common Problems and How to Solve Them

Self-hosting location history is not plug-and-play. Here are the most common issues you will face:

  • Battery drain: Continuous GPS tracking can kill your phone battery. Solution: Use a tracking app that uses adaptive location (like OwnTracks’ ‘significant location change’ mode) or reduce the frequency of updates.
  • Network configuration: Your server needs to be reachable from the internet. This requires port forwarding on your router or a VPN (like WireGuard or Tailscale) to avoid exposing your server to the public internet. Port forwarding can be risky if not configured securely.
  • Data storage: Location data accumulates quickly. A year of tracking every minute can produce millions of points. Solution: Set up database pruning (e.g., delete data older than 6 months) or use a database that handles large datasets well.
  • Reliability: If your server is down (power outage, network issue), you will lose data. Solution: Run the server on a VPS (which has high uptime) or add a UPS to your home server.
  • Privacy leaks: If you expose your server to the internet without proper authentication, anyone could access your location. Solution: Use HTTPS with a valid certificate, strong passwords, and ideally a VPN.

Costs and Maintenance

Self-hosting is not free. The costs include:

  • Hardware: A Raspberry Pi (around $35) or an old laptop. You can also use a VPS (starting at $5/month).
  • Electricity: A Raspberry Pi consumes about 5W, costing roughly $5/year. A VPS has no electricity cost but a monthly fee.
  • Time: Setting up the server takes a few hours. Maintenance (updates, backups, troubleshooting) takes a few hours per month.

Compared to free services like Google Timeline, self-hosting has a real cost. But if you value privacy, the cost is often worth it. You also avoid the risk of a service being discontinued or changing its privacy policy (as Google has done with Timeline, moving data to on-device storage).

Security and Privacy Considerations

Self-hosting does not automatically make your data private. You are responsible for securing your server. Here are the key considerations:

  • Encryption: Use HTTPS to encrypt data in transit. Your tracking app should use TLS to connect to your server.
  • Authentication: Use strong passwords and two-factor authentication for any web interface.
  • Network exposure: The safest approach is to not expose your server to the internet at all. Instead, use a VPN (like WireGuard) to access your server from your phone. This way, your location data never travels over the public internet.
  • Data retention: Decide how long you want to keep your location history. You can set up automatic deletion after a certain period to minimize the risk if your server is compromised.

One common misconception is that self-hosting makes you completely anonymous. That is false. Your ISP can still see your internet traffic (unless you use a VPN), and your phone’s OS (Google or Apple) may still collect location data independently. Self-hosting only ensures that the data you explicitly send to your server is under your control.

Alternatives to Self-Hosting

If self-hosting sounds like too much work, there are alternatives:

  • Google Timeline: Now stores data on-device and syncs to your Google account. It is convenient but still tied to Google’s ecosystem.
  • Apple’s Significant Locations: Stored on-device and encrypted, but not accessible for export or viewing in a meaningful way.
  • Third-party cloud services: Some apps (like Life360 or Glympse) offer location sharing, but they are cloud-based and may have privacy concerns.
  • Manual logging: You could use a journaling app or a spreadsheet to record your locations manually. This is private but not practical for continuous tracking.

Each alternative has its own trade-offs between privacy, convenience, and features. Self-hosting is the only option that gives you full control over the data.

Frequently Asked Questions

Is self-hosting location history legal? Yes, as long as you are tracking your own devices and not someone else’s without consent. Laws vary by jurisdiction, but tracking your own location is generally legal.

Can I use a free VPS for this? Some providers offer free tiers (like Oracle Cloud’s Always Free), but they have limitations (e.g., limited bandwidth, CPU). You can try, but you may outgrow them quickly.

How much battery does tracking use? It depends on the app and settings. Using significant location change mode or low-frequency updates (e.g., every 5 minutes) can reduce battery drain to under 5% per day. Continuous GPS tracking can drain 20-30% per day.

What if my server goes down? Can I recover lost data? If your server is down, your phone’s app will typically queue the data and send it when the server is back online (if the app supports offline storage). Otherwise, you will lose data. To avoid this, use a VPS with high uptime and set up backups.

Can I share my location with family or friends? Yes, most self-hosted solutions allow you to share your location via a link or by granting access to your server. You control who can see the data.

Is it worth the effort compared to Google Timeline? If you are privacy-conscious and enjoy tinkering, yes. If you just want a simple timeline without any maintenance, Google Timeline is easier. But you are giving up control over your data.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →