Own GPS Location ServerFirst published 6 years ago
Well, here I go again, just could not keep my fingers off from putting together my own DIY GPS Location Server. The ability global positioning systems provide to trace and locate all kinds of thing, from pets, to cars, people, items, virtually anything, has long caught my interest. Guess my tech part of my personality just kicks in from time to time. So, having said that let me share with you how easy it actually is to get your very own “Tracking Server” ready and hosted right out of your living room. You actually won’t need a PhD to get this done although a few steps may cause you to fail. Let me start with what you actually need to get prepared.
- Make sure you do have a good internet connection available in your home. It will be used to access your DIY GPS server from external. This is a must have!
- You will need to have an Internet router in your home network allowing you to configure a Dynamic DNS provider, such as Dyn. I won’t explain that part in detail since there should be plenty of resources out there for you to read. If not, let me know and I’ll try to assist.
- You will need a small PC, such as the NUC from Intel, to “host” the server unless you don’t plan to run it 24/7.
- An Android phone or alternative tracking device depending on what you like to track, I use both types for vehicle and personal tracking.
- Further you need an easy to use GPS Server software that goes into your home server. I decided to go for Traccar, an open source server or GPSGate, which is free to use for 5 users and does require a bit more of tech know-how to get it up and running.
- Both, Traccar and GPSGate require a database where they connect to, to store data, and a SMTP mail service, here is where things can get rather tricky. I decided to make use of the “MariaDB” database server and the SMTP mail service available in my personal Synology NAS. I did not setup SMS notification since this would for sure be a complete overkill, perhaps I cover this some time later, but I guess I won’t, let’s see.
- Lastly, a few hours during a rainy weekend or a girlfriend or wife with a high level of tolerance for the geek inside you.
To get started prepare your mini PC by installing Windows 10 Home. You can obtain a installation file from Microsoft to easily prepare a bootable Flash Drive. This is needed just in case you don’t already have an operating system running on your new mini PC, the PC that is going to act as the server and should be online 24/7, around the clock. There isn’t really much to explain, and again, the subject of installing an OS onto an Intel NUC should be well covered on the Internet. The only one part I would suggest is that you create a minimum of two partitions, C:\ and D:\ where C:\ is for the OS itself and D:\ is where the server software goes. Disk space isn’t a real concern since both software packages are rather small.
Traccar is a free open source platform, not only very easy to use, but with great support and a nice and clean look. I must give it to the author for keeping his work open source – well done!
Next, download the latest Traccar Server for Windows. It is a free open source platform, not only very easy to use, but with great support and a nice and clean look. I must give it to the author for keeping his work open source – well done! Alternatively, if you plan to host an even more powerful server, you may want to take a look at the GPSGate solution. It’s free for 5 users to use, very powerful and with great details about anything you want to track. In fact, I decided myself to install both onto the same server, running both next to each other side by side – I call it the tracking overkill. Actually I do love both installations, one for its clean simple look, the open source support and the other one for a very powerful, professional tracking server solution with free licenses for 5 users, enough for home use I would guess unless you intend to track your pets, kids, wife and your three cars. I suggest to try both options and choose whichever one you like best or best fits your personal needs or your technical ability.
Before you start installing Traccar please read the documentation and watch the installation video for Windows. Both can be found on the official website.
I’ll continue to focus on implementing Traccar as home DIY server, since it is very simple to work with, well supported by the creator and very well covers what we would expect from a homemade tracking server. After downloading the current Traccar server version, at that time v3.11 for Windows 64-bit, I created a new user in MariaDB as well as a database accessible for the newly created user. Since I am using a Synology NAS server with MariaDB and phpMyAdmin installed and running, I did not need to install a database instance and database manager on the new DIY GPS Server, this certainly came very handy. Next I ran the Traccar Windows Installer and installed it on D:\Traccar, but any other location should work just fine as well. Before running the Traccar installer make sure that you have the latest Java Runtime installed on the server. Java Runtime is free and you can get your copy from the official Java Runtime page.
Now it’s time to edit the configuration file and to start the “traccar” Windows Service. First, edit the “traccar.xml” located inside the “conf” sub-folder of your Traccar installation on D:\ drive, for instance “D:\Traccar\conf\traccar.xml”. The configuration file needs to be edited in order to have Traccar work with MariaDB database server. My configuration looks like this:
<entry key=’database.url’>jdbc:mysql://[ip of database server]:3306/[name of database]?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=”</entry>
<entry key=’database.user’>[your database user]</entry>
<entry key=’database.password’>[password of the database user]</entry>
<entry key=’mail.smtp.host’>[ip of mail server]</entry>
<entry key=’mail.smtp.password’>[password for smtp authentication]</entry>
Looks confusing? Well, if you need any further help consider checking the official Traccar support forum or drop me a note here. Now let’s start the “traccar” Windows Service. Before starting the service make sure to disable the “Windows Media Player Network Sharing Service” first, since it collides with the traccar Windows Service making it unable to start! After the service has been started successfully open your web browser on the server to test the installation, e.g. https://localhost:8082 ; login and complete the setup of your new DIY Tracking Server – Well done! Here how the successful installation should look like, for both, Traccar and GPSGate:
Latest posts by Chris (see all)
- CNY ’23 drives - 26th January 2023
- If you don’t smile, you are at the wrong place or are with the wrong person - 20th January 2023
- A new year ahead - 1st January 2023