Turn a Raspberry Pi Into a GPS Tracking Server
In this guide I will show you how to install Traccar GPS tracking software onto a Raspberry Pi which can receive data from compatible obd gps tracker devices over the internet, logging their positions onto a map for real time tracking, and also tracking playback.
What is Traccar
Traccar is a free and open-source GPS tracking system for various types of GPS tracking devices. It allows businesses and individuals to track their assets, vehicles, and people in real-time using GPS technology. Traccar can be used with various GPS tracking devices, including smartphones, tablets, and GPS trackers.
Traccar is highly customizable and offers a web-based user interface that allows users to monitor their assets and vehicles in real-time. Users can track and manage multiple devices simultaneously and access detailed reports and analytics about their assets’ movements and behavior.
What is a Raspberry Pi
A Raspberry Pi is a small single-board computer developed by the Raspberry Pi Foundation in the UK. The Raspberry Pi is designed to be an affordable and easy-to-use computer that can be used for a variety of projects and applications.
The Raspberry Pi board is about the size of a credit card and has a CPU, GPU, RAM, USB ports, HDMI port, Ethernet port, and a microSD card slot. It can run various operating systems, including Linux-based distributions, and can be used for a wide range of applications, such as web browsing, media center, gaming, programming, and robotics.
Get a Raspberry Pi here:
🖥️Buy Raspberry Pi 🖥️
Software Notes:
- Traccar Version: traccar-linux-64–4.8 (alternatively you can use the ARM version of traccar.)
- Raspberry Pi Version: Linux raspberry 4.19.0–9-amd64 #1 SMP Debian 4.19.118–2 (2020–04–29) x86_64 GNU/Linux
- Traccar comes with Java, so it is not required to install a stand-alone version of Java.
Raspberry Pi System Requirements:
- wget installed (to download the zip file, you do not need it if you copy it with other tools) (Already installed on Raspberry Pi 4.19.0–9)
- unzip installed (to unzip the zip file, you do not need it if you unzip the content with other toots) (Already installed on Raspberry Pi 4.19.0–9)
- If you don’t have as Rasperry Pi, you can get it from here: Raspberry Pi
Step 1: SSH Into Your Raspberry Pi
(Raspberry Pi SSH access is disabled by default)
Instructions for enabling SSH can be found here: https://www.raspberrypi.org/documentation/remote-...
The image shows PuTTy, a popular SSH program used to access Linux based servers/devices. Windows 10 computers should now have SSH natively built in, but we will use an SSH application in this case.
Step 2: Create the /opt/traccar Directory
This is the directory where the Traccar GPS tracking software will be installed to.
sudo mkdir /opt/traccar
Step 3: Change Into the /opt/traccar Directory
Change into the /opt/traccar directory as it will be easier to work where the files are located.
cd /opt/traccar
Step 4: Download Traccar Installer Files
Download the latest Traccar server .zip file from traccar.org/downloads
Currently, 4.8 is the latest version (Feb 2020 release).
sudo wget https://github.com/traccar/traccar/releases/download/v4.8/traccar-linux-64-4.8.zip
Step 5: Check File Integrity
Perform an md5 checksum to ensure your file is not corrupted.
md5sum traccar-linux-64–4.8.zip
The md5sum result for version md5sum traccar-linux-64–4.8.zip should be
4993f55e16a62e0e025533a2b0e33e68
Nb. The md5sum results will be different if you are installing a different version of traccar from what I have shown.
Step 6: Extract the Traccar .zip File Contents to Your Working Directory
Extract the contents of the traccar-linux-64–4.8.zip file using unzip. Raspberry Pi has unzip installed by default.
sudo unzip traccar-linux-64–4.8.zip
Step 7: Clean Up After Yourself
Delete the no longer required traccar-linux-64–4.8.zip file using remove.
sudo rm traccar-linux-64–4.8.zip
Step 8: Run Traccar Run
At this point you can proceed to install/run Traccar.
sudo ./traccar.run
Pay close attention to the output when installing. Take note of any error messages that may appear.
A successful install should look as pictured.
Step 9: Start Traccar
Start the Traccar service with system ctl
sudo systemctl start traccar.service
tep 10: Check Logs for Errors
Using tail with the follow switch & lines set to 300, observe and monitor the Traccar logs for error entries.
tail -f -n 300 /opt/traccar/logs/tracker-server.log
Step 11: Check the Web Portal
Open a web browser to check the system is online.
From your Raspberry Pi Web Browser
http://localhost:8082/
From your Computer on the same network.
http://192.168.0.1:8082/
Note, above IP address is for example purpose. Your IP address will most probably be different.
If successful, you should see the login screen and be able to log in as the below user:
Email: admin
Password: admin
List of Supported Devices:
https://www.traccar.org/devices/
Links to some GPS trackers:
2G GPS Tracker on Aliexpress (2G devices are not supported in most countries)
3G/4G GPS Tracker on Amazon Marketplace (3G will be phased out in 2022~2023 in many countries)
4G GPS Tracker suitable for the OBD
Other handy links: