Traccar provides official Docker images that are available directly on Docker Hub.
Recommended tags:
Multi-platform images available:
Command to create a container using the default database and configuration:
docker run \ --name traccar \ --hostname traccar \ --detach --restart unless-stopped \ --publish 80:8082 \ --publish 5000-5300:5000-5300 \ --publish 5000-5300:5000-5300/udp \ traccar/traccar:latest
It is usually a good idea to mount the logs, data, and configuration file from the host. Make sure to create the directories and the configuration file first.
--volume /opt/traccar/logs:/opt/traccar/logs:rw --volume /opt/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro --volume /opt/traccar/data:/opt/traccar/data:rw
The default H2 database is not recommended for production use. For non-testing deployments, we recommend TimescaleDB for large installations or MySQL for smaller servers.
The following Docker Compose examples can serve as a starting point for your deployment with a production-grade database: