Syed Jahanzaib Personal Blog to Share Knowledge !

December 11, 2014

Create Your OWN GPS base Vehicle/Fleet Tracking Management System in Linux

Filed under: Linux Related — Tags: , , , , — Syed Jahanzaib / Pinochio~:) @ 2:17 PM

 یااللہ تیرا شُکر ہے میرے مالک  کہ تو نے مجھے وہ نعمتیں عطا فرمائیں

کہ جن کا میں مستحق نہ تھا , مجھ پر اپنا کرم کر مالک

ﯾﺎ ﺍﻟﻠﮧ ﮨﻤﯿﮟ ﻋﺎﺟﺰﯼ ،ﺍﻧﮑﺴﺎﺭﯼ، ﺩﺭﮔﺰﺭ ﺍﻭﺭ ﺗﻮﺑﮧ ﮐﺮﻧﮯ ﻭﺍﻟﻮﮞ ﻣﯿﮟ ﺷﺎﻣﻞ ﻓﺮﻣﺎ


 ~!~ Syed Jahanzaib ~!~


 Last modified: 9th June, 2015

mapAssalam Va Alekum,
Greetings to all,

Recently I purchased an GPS tracking device for my car. As I can see its performance is very good, and it provides me quite accurate results of live or history track.of the vehicle movement, but the device has its costs and for web track there are annual charges too. So If I have few vehicles it will be costly to get them all monitored. So just for curiosity I did some R&D and found TRACCAR , which is a Linux base vehicle / fleet tracking management system , the best thign is its FREE😉 and we all love to have FREE lunch at anyplace, anywhere (if its Legal preferably🙂

As I have made this or test purposes, if some is interested and have no experience in linux or want to first try it in easy way, simply install traccar client, and contact me, I will make one account for you on my web server which is live 24 hours, and you can then see its working and performance. Message me if required.

Benefits of TRACCAR and its possible usage …

– Any Vehicle Tracking / maintain history
– Can be used for personnel tracking
– Can be used as a commercial solution as well
– Can be used to track your lost mobile phone
– You can inquire about location by sending SMS to the device and it will return sms you the location with URL [this feature will be implemented later]
– Maintain History and Track of the device and speed of vehicles with addressess
– Many others …



Hardware Software used in this Guide.

1- Linux base System , I used Ubuntu 12.04 32 bit edition as an example (hardware specs can be anything, nothing fancy required) , The system should have static public ip or it can work port forwarding as wel (if you dont have one, it can be manipulate with some workarounds like ddns too)
2- TRACCAR application which will be used to store/update client data and web portal for management purposes.
3- For client side tracking, I used ANDROID base mobile phone with GPS and GPRS. (HTC DESIRE HD MODEL with Ufone base GPRS (for location update on server, so GPRS must be activated on the SIM in order to update data from client to server) and WiFi where its available (it can store data if no internet is available and will update when it will get access to internet)

First we will configure SERVER side.





[UBUNTU 12.04 32bit Edition]

Login to your linux server with root, and first update and install Java DK.

apt-get update
aptitude install openjdk-7-jre-headless


Now download TRACCAR server application in temp folder, unzip it and run its installer.

mkdir /temp
cd /temp


Now Start TRACCAR service

service traccar start
sudo /opt/traccar/bin/traccar start

You should see some thing like on successful startup …

traccar server status

You can see its logs as well for troubleshooting and information purposes.

tail -f /opt/traccar/logs/tracker-server.log
TRACCAR server logs

TRACCAR server logs

Now access it from the WEB by


It may take some times to load the page / plugin.
Login With following default credentials

ID = admin
Pass = admin

After successful login, you will see TRACCAR web panel with default map.
On left side you will see DEVICES menu, Click on ADD button, and enter details
As showed in the image below …

ADd device in Traccar Server Panel

ADd device in Traccar Server Panel

NAME = Your Device or Person Name

UNIQUE IDENTIFIER =  Enter your IMEI number, you can find it on your device properties.

Click on SAVE.

Now moving to CLIENT end configuration …




For test purposes, I am showing you howto add android mobile device for tracking (as most of android phones nowa days have GPS module. So basically what you need is a GPS capable Device with Internet Access, (your SIM OR mobile must have Internet access in order to update data like coordinates and others to the server. in case your mobile/device have no internet access, it will store data locally and will update as soon it gets internet access.

Download TRACCAR-CLIENT application on your mobile and install it,

or you can install it directly from Google play store like

Once its installed open it (traccar client)
As showed in the image below …

TRACCAR client on android

TRACCAR client on android


Now you must modify settings as shown, [pretty simple and common to understand :p ]

traccar client settings

traccar client settings

– DEVICE IDENTIFIER  =  In Device identifier, you will see you unique IMEI No. (International Mobile Equipment Identity number IMEI) you should add the same in your server section as well (In ADD device)

– SERVER ADDRESS   =  Enter your server IP address (traccar server) or if you dont have static ip, you can use DYNAMIC DNS on your dsl/router and do port forwarding of required ports like 8082 for web panel , and 5005 (it depend on device model)

– SERVER PORT  =  In general cases port may be same as for this model its 5002, (but it can vary from GPS device model)

– FREQUENCY  =  How often (in seconds) client should upload data to the server (For initial test purpose make this value less like 60 seconds)

– LOCATION PROVIDER  =  Select MIXED provider, so that if GPS is not working, it should update possible coordinates with the nearest mobile network tower. The exact location may not be accurate in network provider settings , but sometimes sufficient to get idea.GPS only settings provide more accurate position but it requires sky sight.

– SERVICE STATUS  =  select this option so that the client starts sending data. (this service be running all the time )

If you click on MENU and then on STATUS, you can see the LOGS
As showed in the image below …





Some more snaps of settings for android client, just for reference purposes

Android Base Mobile - Location Settings

Android Base Mobile – Location Settings

ANDROID = Traccar-client Configuration

ANDROID = Traccar-client Configuration


Android - traccar-client location provider settings

Android – traccar-client location provider settings

Traccar-client LOGS, on successful connection

Traccar-client LOGS, on successful connection




Now at server end… select the device you added earlier and you will start seeing its status. For a better tracking view, Go outside with your device and have a 4-5 kilometers walk or running (its good for health too you know but I myself is so lazy that even with over weight, I dont walk much😛 )
Now see the view IN DIFFERENT STYLE😉





UPDATING TRACCAR-WEB.WAR for new features enhancements

To add some features and enhancements to your previous traccar web portal by Anton Tananaev, update it with Mr.Vitaly Litvak version.
Here are instructions:

> Download the updated .war file


Now stop traccar service and replace the war file in installed folder.

service traccar stop
cp traccar-web.war /opt/traccar/
service traccar start

Now you will see new enhanced featured like which don’t exist in original traccar-web project:

See following FEATURES list at



Howto show Address field:

This column displays address value from archived positions. It is hidden by default, to make it visible use controls of archive grid (available by clicking down arrow button in any column header):

Columns settings

Please note that by default traccar does not fill that column. To make it work the ‘reverse geocoding’ must be enabled in traccar configuration file:

<!-- Geocoder options -->
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'></entry>

Thanks to Mr. Vitaly Litvak for pointing me in the right direction🙂


In User account, you can set his email address and notifications type that user will receive on given email address.



In SETTINGS > NOTIFICAITON, you can configure your GMAIL account to send out emails using your gmail account. You must enable LESS SECURITY in gmail before using this app or gmail will block any attempt of using there smtp using 3rd party app.


Use ‘Test’ button to check settings validity. It will just test the connection. and you will see TEST PASSED popup.

More information on notification can be seen here.


If time will allow , I will add some more snaps and customizations that can be made. Its a open source application, you can make your contribution as well.


You can get more details on this project from following link



Syed Jahanzaib


  1. Phew!! This is awesome. And your dissemination of such useful applications is really cool. Love your blog. Thanks a lot mate for the good stuff you are doing.

    I run a Cable ISP at Mumbai. Right now I am working to get Dude, Cacti and Syslog on a single machine. Will keep you updated once I wrap it up. I know that almost all Cable ISPs would love to have a single Install file for the above three.

    Thanks again mate for your awesome blog.


    On Thu, Dec 11, 2014 at 2:47 PM, Syed Jahanzaib Personnel Blog to Share

    Comment by Sridhar Iyer — December 11, 2014 @ 2:50 PM

  2. Thank you for your help…
    your blog is one of our favorite

    Best regards,

    Comment by Fiber Net — December 11, 2014 @ 4:27 PM

  3. cam i use VPS as server ??

    Comment by Husham — December 11, 2014 @ 7:15 PM

  4. UPDATING TRACCAR-WEB.WAR for new features ehancements ) in this section plz correct last command🙂

    Comment by Sardar Husham Khalid — December 11, 2014 @ 8:09 PM

  5. Thank you mr: Jahanzaib
    will try and of curse first i will call you😉

    Comment by Hisham N Ali — December 11, 2014 @ 9:19 PM

  6. For testing purposes this is very good. But how will this prevent car lift ?.. For example according to this method we need to have android phone with GPS available all the time at client side for tracking. It also means we need to charge the phone all the time and hide it inside the car. How do we deal with that situation ??

    Comment by Khizer — December 13, 2014 @ 1:17 AM

    • @Khizer,
      Initially, the aim of this project was to aim TRACKING only, not to prevent lifting. for complete anti car lift system, the device must be capable of receiving sms for specific action and cut of power relay or perform other functions other then tracking. one Example is
      its a very good GPS Tracking + car block/unlock feature. Give it a try. I don’t have access to any GPS device other then mobiles, that’s why I used my GPS enabled mobile for test purposes.
      Regarding your question about charging, If you are using mobile phone, then surely you have to arrange the car charger and with the help of good electrition you can make it hidden under your seat and hide the wiring, make sure that it start charging only when the ignition is ON, otherwise it will keep draining your battery.

      Comment by Syed Jahanzaib / Pinochio~:) — December 13, 2014 @ 9:44 AM

  7. Awesome sharing like always zaib bro!
    Its good for tracking your employees or kids but not to prevent car theft!
    Because professional car thieves always carry jammers with them.
    Still its a good project, I was looking for something like this for some other purpose🙂

    Comment by Taimoor Zaffar — December 13, 2014 @ 9:18 AM

    • @Taimoor Zaffar,
      Initially, the aim of this project was TRACKING only, not to prevent lifting. for complete anti car lift system, the device must be capable of receiving sms for specific action and cut of power relay or perform other functions other then tracking. one Example is
      its a very good GPS Tracking + car block/unlock feature. Give it a try. I don’t have access to any GPS device other then mobiles, that’s why I used my GPS enabled mobile for test purposes.
      Modern devices have Anti Jamming feature enabled with them including battery backups, so when they will detect JAMMERS they can perform specific action immediately or after specific xxx minutes also they have some PANIC button too, which can block the engine after few minutes if not deactivated.

      Comment by Syed Jahanzaib / Pinochio~:) — December 13, 2014 @ 9:47 AM

  8. Really you are ultimate…Really i love to spend more time on your blog…

    Comment by Satish — December 13, 2014 @ 11:08 AM

  9. Dear Sir,

    Asalam O Alaikum.

    I want to know more about Mikrotik, QoS where I can give priority to some services level 1 and others on normal,

    I have a situation where we need youtube and Torrent on high priority ( strange ), and other services need to be in low, its an residential area so ppl are more interested in torrents and youtube.

    can you please guide me.

    shukria Bhai jaan ..

    Malik Mazhar Ali.

    Sent from Windows Mail

    Comment by malik mazhar ali — December 13, 2014 @ 9:05 PM

  10. Assalam Va Alekum

    i am trying to install above traccar server in ubuntu 12.04.5 desktop.but i am new user of ubuntu.that’s why i missing some zip to unzip and install traccar.please help me which commands i am using in terminal

    Comment by prasad — January 4, 2015 @ 4:08 PM

  11. asalamualaikum
    hy syed
    I am from Indonesia
    always healthy and successful greeting, amen
    I want to ask me to install traccar in windows but on my android is always a message logs: conection succeded, location update, send failed
    what no mistake ports
    server: / ip public
    Her port 5005 and has been added in the firewall
    or must be installed in ubuntu
    before him I thank you

    Comment by adhi — January 4, 2015 @ 10:09 PM

  12. Aslamoalekum sir : first of all Thanks for sharing all stuff for us .
    Sir i have static ip and my network like this ptcl modam > mikrotik > Switch > servers

    pleas help men ho can i foreword or jump my public ip to server i am beginner pleas help me .w8ing 4 your kinde reply . Muhammad Tariq

    Comment by Muhammad Tariq — January 14, 2015 @ 9:55 AM

  13. Syed Sir,
    I’ve a problem with Traccar. I’m in my home but it updates different locations in traccar web panel. Please provide me the solution, sir.

    Comment by aayush — February 6, 2015 @ 9:45 PM

  14. hi,
    can i add my cellphone to your server. its just one car🙂. Thank you

    Comment by alex — February 25, 2015 @ 12:11 PM

  15. Hi,
    Mr Syed Jahanzaid can you please make a account for me on your web server sothat i can test the tracking of my gps devices.

    Tasadduq hussain

    Comment by Tasadduq — June 6, 2015 @ 9:55 PM

  16. Dear Jahanzaid Bahi,please tell me what i should gave Tracking Server port in Traccar Client for HTC Explorar.


    Comment by Tasadduq — June 8, 2015 @ 3:22 PM

  17. cool

    Comment by prince — June 21, 2015 @ 10:10 PM

  18. To delete notifications?

    Comment by Nazario — July 15, 2015 @ 9:36 AM

  19. Alsalamo alikom Brother,

    Jazak Allah khairan for this useful article,

    I’m asking if you found some enhanced traccar mobile client that can recieve commands for example by SMS,


    Comment by rgf2004 — October 14, 2015 @ 11:47 AM

  20. I got best mobile application to track your mate, friend, device and vehicles too freev
    of cost, just download from google play store:
    Below is the link

    Download free Mobile application
    family finder

    Comment by emma john — December 3, 2015 @ 12:08 PM

  21. Hi,

    Im getting send failed after 3-4 location updates and also the coordinates are not being updated on the local server. Im using a static IP.

    Comment by ARC — December 4, 2015 @ 5:46 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: