This is a guide of home to get started with OwnTracks in Docker on Ubuntu 14.04
When I started with OwnTracks I had some trouble with the booklet as I found parts of it a tad disjointed and was a bit mixed up as there were some missing steps to get going. So here’s a quick guide to get OwnTracks installed and get going with it.
I’d advise you use Docker for it as it’s simpler to get started with and can easily be updated (also it contains a MQTT broker so it’s a bit less hassle).
docker pull owntracks/recorderd
/var/owntracks/logwith the data directory you want (create it first using mkdir) but for this walkthrough I’ll assume you use
mydomain.ukwith your own domain, change
192.168.1.11to your server’s network IP
When the container starts your data directory should populate, now kill the container using CTRL + C on the keyboard
Create yourself some users by editing the
/var/owntracks/mosquitto/mosquitto.acl file like this:
Next you need to get your users some passwords so they can actually post their location and so owntracks recorder can actually save the location so spin up the container again using the line from before then in another terminal window SSH’d in, run
docker ps and copy the container ID
sudo docker exec -t -i container-ID-here bash
You’re inside the docker container, run
mosquitto_passwd /owntracks/mosquitto/mosquitto.passwd nathaniel (replace nathaniel with your user’s name) and enter your new password twice, now do this for all the users you want don’t forget creating a password for ‘recorder’, then exit by typing
exit and hitting enter.
Now you should be ready to go, run
sudo nano /owntracks/mosquitto/mosquitto.passwd and check your password hashes are there
Navigate to http://yourIP:8083 and you should see the OwnTracks interface
Install the OwnTracks root CA cert you created on your phone and fill out all the fields in the app like the screenshot and your phone should connect and your phone will populate the location (and it will appear in the web version).
Forward port 8883 through your router, if you have Dynamic DNS you can just use yourdomain:8883 to continue posting even when you’re out and about.
If everything is working well, kill the container and set it to always restart (as shown below) so it will restart after reboots and the docker process being restarted.