A private/selfhosted location history solution
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build_tools
data
publication_assets
views
.gitignore
.htaccess
LICENSE
Locory.php
LocoryDbMigrator.php
LocoryDemoDataGenerator.php
README.md
bower.json
build.bat
composer.json
config-dist.php
index.php
locory.js
locory.phpproj
locory.png
locory.sln
robots.txt
style.css
version.txt

README.md

locory

A private/selfhosted location history solution

Motivation

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.

Give it a try

Public demo of the latest version → https://demo.locory.info

How to install

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.

What currently is possible

  • 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

Get data in

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.

Calculate distance between location points

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

Show your location history

Just browse to the your install URL and login with the configured credentials

Screenshots

Main page

Todo

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...

License

The MIT License (MIT)