Self-hosting a trip tracking set-up for publishing it on the blog
dev notesmapsself-hosting
Talking to V is almost always helpful. I asked in our group what would be the best app to use for sending gpx traces (again, inspired by aaronparecki.com/tracks) to my server and process it, and he showed me OSMTracker and SyncThing. The process is simple:
- OSMTracker (or OSMAnd, which I use more frequently), save GPX traces to a folder.
- SyncThing watches that folder and can be set to send it to the server. The server also has a SyncThing instance running as well. These two instances communicate to each other by providing the mobile instance with an address (the port on my server SyncThing is running on) and a device ID that is generated for you.
- As I save GPX traces to the folder, SyncThing sends it to the server.
- A Python script written with the help of Claude processes this trace, calculating the distance of walked, finding out which city it is in through simple reverse-geocoding of any point, plots it on an OSM basemap using Contextily and saves both a metadata file and generated image to my GitHub repository. This is what the metadata looks like:
{
"title": "32km in Bengaluru on December 08, 2024",
"filename": "2024-12-08-cropped.gpx",
"date": "2024-12-08",
"formatted_date": "December 08, 2024",
"points": 2993,
"distance_km": 32.04,
"city": "Bengaluru",
"bounds": {
"min_lat": 12.9725998,
"max_lat": 13.0131252,
"min_lon": 77.5544792,
"max_lon": 77.6263423
},
"processed_at": "2025-08-22T04:30:50.019937",
"description": "index"
}
The title is auto generated too. Here is one of the maps it generated:

I have our old GPX traces so I just plopped them in the folder and got 6 “posts” to start off my own tracks page.
