Upgrading Traccar

Check the release notes before upgrading. A new version may update the database, so always back up your data first.

Linux and Windows

  1. Stop the Traccar service.
  2. Back up the database, conf/traccar.xml, and the media folder if used. Store backups outside the installation directory.
  3. Uninstall the previous version and install the new version using the Linux or Windows instructions.
  4. Restore traccar.xml and the media folder. If using the default H2 database, also restore the data folder. For an external database such as MySQL or PostgreSQL, keep the existing database.
  5. Start the Traccar service.

If you customized templates or other files, reapply those changes to the new version. Older files may not be compatible with the new release.

Docker Compose

Make sure your database, configuration and media are stored outside the container so they survive its replacement.

  1. Stop Traccar with docker compose stop traccar and back up your data.
  2. Update the Traccar image tag in your Compose file if you use a specific version.
  3. Pull the image and recreate the service:
docker compose pull traccar
docker compose up -d --no-deps traccar

Run these commands from the folder containing your Compose file. Replace traccar if your service has a different name. Keep the existing database and volumes.

For a standalone Docker container, recreate it with the new image and the same mounts, environment settings and ports.

After upgrading

Log in and check that devices are reporting and history is available. If the server does not start, check the logs for errors. Database updates can take longer on large installations.

To return to the previous version, stop Traccar, reinstall that version and restore your pre-upgrade backup. Changing only the application version does not undo database updates. Restoring the backup also loses any data received since it was taken.