Atomik Activity is an open-source, self-hosted location and activity tracker that lets me keep my location history, steps, and sleep data on infrastructure I control.

Location history is one of those features that’s difficult to appreciate until you stop using it.
Want to remember the restaurant you visited six months ago?
Check your timeline.
Wonder how much you walked yesterday?
Check your activity history.
Trying to remember exactly when you arrived somewhere?
It’s probably recorded.
That’s incredibly useful.
It’s also an extraordinary amount of personal information to continuously send somewhere else.
Your location history can reveal where you live, where you work, which stores you visit, when you travel, how often you exercise, and potentially far more than you consciously intended to share.
So I started wondering:
Could I keep the useful part of location history without giving up control of the data?
That question became Atomik Activity.
It’s an open-source, self-hosted location and activity tracker for Android.
The idea is simple:
My phone collects the data. My server stores it. I decide where it goes.
No Google Maps API.
No advertising SDK.
No analytics.
No third-party location database.
Just my data, running on infrastructure I control.
I Didn’t Want to Stop Tracking Myself
There’s an obvious privacy solution to location tracking:
Turn it off.
But that’s not actually what I wanted.
I like having a personal history of where I’ve been.
I like maps.
I like being able to look back at a day or trip and see where I went.
And health information such as daily steps and sleep can be genuinely useful.
The problem wasn’t the tracking itself.
The problem was who controls the resulting dataset.
Instead of giving up the functionality, I wanted to change the architecture.
So rather than:
Phone → Third-party cloud → Third-party account
Atomik Activity works more like:
Android phone → My API → My PostgreSQL database
Then a web dashboard lets me explore the resulting information.
It sounds like a small architectural change.
From a privacy perspective, it’s the entire point.
What Atomik Activity Tracks
The project currently combines two categories of personal data.
Location history
The Android app periodically collects location points in the background.
Those points eventually become a timeline that can be explored through the web dashboard.
Instead of seeing isolated latitude and longitude coordinates, you can explore your movements through maps, daily views, date ranges, timelines, and heatmaps.
You can also manage places to give frequently visited locations more meaning.
The goal is similar to what attracted me to services like Google Location History in the first place:
turn raw GPS data into a useful memory of where I’ve been.
Steps and sleep
Atomik Activity also integrates with Android Health Connect.
That lets the app incorporate information such as:
- daily step counts
- sleep sessions
- activity data
So the project isn’t only about plotting dots on a map.
It’s moving toward a personal activity dashboard where location and basic health information can be viewed together.
But unlike a traditional fitness platform, the server receiving that information is one I choose.
The Hard Part: Location Tracking Without Destroying the Battery
A location tracker that drains your phone by lunchtime isn’t very useful.
Continuous GPS tracking sounds simple conceptually:
Get location → save location → repeat.
But mobile operating systems don’t really work that way.
Background execution is restricted, GPS can consume significant power, connectivity disappears, phones reboot, applications get killed, and people sometimes leave their phones sitting on a desk for hours.
So one of the more interesting parts of Atomik Activity is making tracking adaptive rather than blindly continuous.
The Android app uses activity recognition to detect when the device isn’t moving.
If the phone is stationary, there is little value in aggressively requesting new location points over and over again.
Tracking can become less active.
When movement resumes, location tracking becomes useful again.
The app runs tracking through an Android foreground service and is designed around battery-aware policies rather than simply asking for maximum GPS accuracy every few seconds.
That turns battery efficiency into part of the architecture rather than an optimization to worry about later.
What Happens When the Phone Goes Offline?
Another requirement was that tracking shouldn’t depend on having a network connection.
If I’m travelling, underground, outside cellular coverage, or my server simply isn’t reachable, I don’t want gaps appearing in the history just because synchronization failed.
So the Android app keeps an offline buffer using Room, Android’s local database abstraction.
Location points can accumulate locally.
Then Android’s WorkManager handles synchronization when connectivity becomes available again.
Conceptually:
Collect locally → queue → synchronize later
That also creates a useful separation between tracking and networking.
Recording where the phone is shouldn’t depend on whether my server happens to be reachable at that exact moment.
It’s a pattern I increasingly like in mobile applications:
local first, synchronization second.
The Backend Is Deliberately Boring
The server side is a .NET 10 Minimal API.
Its job isn’t particularly glamorous.
It receives batches of location points and health information, stores them, and exposes endpoints that the dashboard can query.
That’s mostly it.
And that’s exactly how I wanted it.
The backend uses:
- ASP.NET Core Minimal APIs
- Entity Framework Core
- Npgsql
- PostgreSQL
- PostGIS
PostGIS is particularly useful here because location history is fundamentally geospatial data.
Instead of treating coordinates as arbitrary numbers, the database can understand geographic points and support spatial operations.
The data model includes things like:
- location points
- saved places
- daily step information
- sleep sessions
There is no giant distributed architecture hiding behind this.
One phone.
One user.
One database.
One small API.
Sometimes that’s enough.
Then I Needed a Better Way to Explore the Data
Collecting thousands of coordinates is easy.
Making them useful is harder.
A database full of:
51.0447, -114.0719
51.0451, -114.0724
51.0458, -114.0732
...
is technically a location history.
It just isn’t a very good one.
So Atomik Activity includes a web dashboard built with React, TypeScript, Vite, and Leaflet.
The dashboard provides several ways to explore the information.
Daily activity
You can inspect where you travelled on a particular day and connect location history with activity information.
Date-range exploration
Instead of looking at one day at a time, you can select a larger period and see how your movements change.
Heatmaps
This is one of the more interesting views.
A heatmap turns thousands of individual coordinates into a picture of where you actually spend your time.
Home.
Work.
Favourite coffee shop.
Regular walking routes.
Places you visited while travelling.
Location data becomes much more interesting when you stop looking at individual points and start looking for patterns.
Why OpenStreetMap Instead of Google Maps?
If the point of the project is reducing dependence on third-party location services, sending all the map interaction straight back through Google would feel slightly contradictory.
So Atomik Activity uses OpenStreetMap tiles instead.
On Android, mapping is handled through osmdroid.
On the web dashboard, it’s Leaflet and OpenStreetMap.
That means the application doesn’t require a Google Maps API key just to display my own location history.
It also keeps the mapping stack much closer to the open-source philosophy behind the rest of the project.
Self-Hosted Doesn’t Mean “No Server”
This is an important distinction.
Atomik Activity is not completely offline like some of my other projects.
Location information leaves the Android device.
The difference is where it goes.
The mobile application lets you configure the backend URL it should communicate with.
That backend can run on hardware you control.
A home server.
A NAS.
A small VM.
A machine connected through a private network.
The project includes a Docker Compose deployment that runs the major pieces together:
Android phone
│
▼
.NET API
│
▼
PostgreSQL + PostGIS
▲
│
React web dashboard
The production stack also includes nginx and automated PostgreSQL backups.
The database itself doesn’t need to be directly exposed to the network.
That’s exactly the kind of boring infrastructure I like.
There Is One Important Security Detail
The backend is currently designed for single-user, private-network deployments.
It does not provide a production authentication layer that makes it safe to simply expose the API directly to the public internet.
That’s intentional, but it means deployment matters.
The API should live on a trusted LAN or behind something that provides appropriate access control.
For example:
- a VPN
- Tailscale
- a reverse proxy with authentication
- Cloudflare Access
- another private access layer you control
I think it’s worth being explicit about this because self-hosted does not automatically mean secure.
Owning the server also means owning the responsibility for how that server is exposed.
Backups Matter More When You Own the Data
There’s another side effect of removing a cloud provider from the equation.
If I lose my database, I can’t contact customer support and ask them to restore it.
I’m the cloud now.
So backup and restore aren’t optional extras.
The Docker deployment includes automated PostgreSQL backups with multiple retention periods, along with scripts for creating an immediate backup and restoring the database.
That’s one of the trade-offs I actually like about self-hosting.
It forces you to think about something cloud services normally hide:
Who is responsible for preserving the data?
In this case, I am.
What’s Under the Hood?
The project is split into several pieces.
Android
The mobile application uses:
- Kotlin
- Jetpack Compose
- Material 3
- Room
- WorkManager
- Retrofit and OkHttp
- Android Health Connect
- Android Activity Recognition
- osmdroid
Backend
The API uses:
- .NET 10
- ASP.NET Core Minimal APIs
- Entity Framework Core
- PostgreSQL
- PostGIS
- Npgsql
Web
The dashboard uses:
- React
- TypeScript
- Vite
- TanStack Query
- Zustand
- Leaflet
- OpenStreetMap
- heatmap visualization
Infrastructure
Deployment uses:
- Docker Compose
- nginx
- PostgreSQL backups
I like that combination because every component has a fairly clear responsibility.
The Android app collects.
The API receives.
PostgreSQL stores.
The web app explores.
Docker runs it.
Nothing particularly exotic is required.
Privacy Isn’t Just “We Don’t Sell Your Data”
One reason I enjoy building projects like this is that they force me to think differently about the word privacy.
A lot of software describes itself as privacy-friendly because the company promises not to misuse your information.
That’s good.
But there’s another approach:
Don’t send the information to the company in the first place.
Atomik Activity has no analytics SDK or crash-reporting service embedded in the clients.
It doesn’t use the Google Maps SDK.
The application sends location information only to the backend you configure.
That’s a much easier privacy promise for me to reason about.
There is no business model that needs to change later.
No advertising profile.
No location database sitting inside another company’s product.
The architecture itself limits where the information goes.
Is Self-Hosting Less Convenient?
Absolutely.
Google can provide an incredibly polished location history experience because Google operates the infrastructure for you.
With Atomik Activity, I have to run a server.
I have to think about backups.
I have to think about networking.
I have to update the software.
And if something breaks, I’m the support department.
For most people, that trade-off probably isn’t worth it.
That’s fine.
Atomik Activity isn’t an argument that everyone should self-host every piece of personal data.
It’s an experiment in a different question:
What does the same kind of experience look like when ownership of the data is the starting requirement?
For developers, homelab users, self-hosters, and people interested in privacy, I think that’s an interesting problem.
Want to Run It Yourself?
The entire project is open source.
You can find it here:
GitHub: github.com/atomikfactory/atomik-activity
The simplest way to start the backend and web dashboard is with Docker.
Clone the project and enter the deployment directory:
git clone https://github.com/atomikfactory/atomik-activity.git
cd atomik-activity/deploy
Create your environment configuration:
cp .env.example .env
Set a strong PostgreSQL password, then start the stack:
docker compose up -d --build
The Android application lives in the mobile-native directory and can be opened in Android Studio.
Once installed, the server address can be configured from the application itself, so you don’t need to rebuild the APK every time your backend URL changes.
If you’re exposing the service beyond a trusted local network, make sure you put an authentication or private-network layer in front of it.
The repository contains the full architecture, deployment configuration, backup scripts, Android app, API, and web dashboard.
It’s released under the MIT License, so you can inspect it, modify it, fork it, or build something different from it.
I Want My Digital History Without Giving It Away
This project isn’t really about recreating Google Timeline.
It’s about ownership.
Location history can be useful.
Step counts can be useful.
Sleep history can be useful.
Personal analytics can be useful.
I don’t think the only two choices should always be:
give that data to somebody else
or
don’t collect it at all.
There’s a third option.
Collect it yourself.
Store it yourself.
Build the interface you want around it.
And decide for yourself who gets access.
That’s what I’m experimenting with through Atomik Activity.
It’s certainly less convenient than outsourcing everything to a cloud service.
But there’s something satisfying about opening a map of your own life and knowing that the database behind it is yours too.
Atomik Factory is where I document the software, tools, and experiments I build for everyday use — around AI, technology, automation, privacy, finance, and productivity.
I build things because I need them, learn from the process, and share what might be useful to someone else.
Build. Learn. Share.
If you’re interested in privacy-first software, self-hosting, open source, automation, or building practical tools instead of adding another subscription, follow along.