Course content
How to Update Traccar to the Latest Version on DigitalOcean
Keep your Traccar system up to date with this guide for DigitalOcean.
Emmanuel Díaz Leal Hernández
How to Update Traccar to the Latest Version on DigitalOcean
If you are interested in keeping your Traccar system updated, follow these steps. If you are coming from this blog, the steps are similar with a few changes. Here I will guide you through the whole process.
Traccar Course
Access the Traccar course here: Traccar Course
Disclaimer
You can use this link to sign up and receive 25 for each registration.
The information is based on the official Traccar guide at https://www.traccar.org/linux/, simplified for clarity.
1. Stop and Uninstall the Traccar Service
Stop and remove the service with these commands:
service traccar stop && sudo rm /etc/systemd/system/traccar.service
2. Download and Install Traccar
Delete the old file and download the new version:
rm traccar-linux* && wget https://www.traccar.org/download/traccar-linux-64-latest.zip
Unzip and install:
unzip traccar-linux-*.zip && ./traccar.run
3. Replace the XML File if Modified
If you modified the traccar.xml file, replace it. If not, skip this step:
cat > /opt/traccar/conf/traccar.xml << EOF
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key="config.default">./conf/default.xml</entry>
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost/traccar?zeroDateTimeBehavior=round&serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>root</entry>
<entry key='database.password'>root</entry>
</properties>
EOF
4. Start the Traccar Service
Start the service:
service traccar start
5. Update Custom Frontend
If you have a custom version, replace it in the modern folder.
Common Issues
If accessing your droplet's IP http://000.000.000.00:8082/ does not show the page, there might be a problem with the service. Try stopping and starting the service again:
service traccar stop && service traccar start