A private / self-hosted location history solution
I love to have a location history, but because such data is too private to let this do others for you, I searched for a self hosted solution, found nothing that fitted my needs completely, so this is locory.
Public demo of the latest version → https://locory-demo.berrnd.xyz
Just unpack the latest release on your PHP enabled webserver, copy config-dist.php
to data/config.php
, edit it to your needs, create the new database on the server you configured, ensure that the data
directory is writable and you're ready to go. Alternatively clone this repository and install composer dependencies manually.
If you use nginx as your webserver, please include try_files $uri /index.php;
in your location block.
- It provides an API to save location data
- It gives you a simple web interface to show your location history in custom time ranges, calculates the (linear) distance, and so on
Make a POST to https://locory/api/add/csv
, the body has to be one or multiple lines in the format <parseable timestamp (ISO is good)>,<latitude>,<longitude>,<accuracy (integer, in meters)>
.
I personally do this with Automagic on my smartphone.
This can be a long running task, so this is not done at the time of import - just setup a cron job for example every hour.
*/60 * * * * www-data php /<locory>/index.php /cli/calculate/distance GET
Just browse to the your install URL and login with the configured credentials
The analysis features are very basic for now, there are much more great things, heatmaps, "where spent I most of my time", and so on...
The MIT License (MIT)