Install Traccar on Google Cloud

Create a new server running the latest stable Ubuntu release on Google Cloud, then connect to it via SSH.

The default user on Google Cloud doesn't have direct root access. Switch to a root shell before running the commands below.

sudo -i

Install Docker Engine with the Compose plugin using the official install script, which tracks upstream releases more closely than the Ubuntu-packaged version

curl -fsSL https://get.docker.com | sh

Disable the Docker userland proxy so the large port range below doesn't spawn a process per port

echo '{"userland-proxy": false}' > /etc/docker/daemon.json && systemctl restart docker

Create directories for persistent data and logs

mkdir -p /opt/traccar/data /opt/traccar/logs

Download the official Docker Compose file that runs Traccar together with a MySQL database

curl -o /opt/traccar/compose.yaml https://raw.githubusercontent.com/traccar/traccar/master/docker/compose/traccar-mysql.yaml

Start Traccar

cd /opt/traccar && docker compose up -d

Google Cloud's default firewall blocks inbound traffic on custom ports, so you'll also need to open them there before Traccar is reachable. Create a firewall rule: VPC network → Firewall → Create Firewall Rule → Targets: All instances in the network → Source filter: 0.0.0.0/0 → under Protocols and ports, allow tcp:8082 and udp:5000-5500.

Traccar will be available on port 8082. See the Docker page for more configuration options, including a TimescaleDB (PostgreSQL) compose example.

Note that you can use the above commands on any Ubuntu server, not just Google Cloud.

Traccar is now running over plain HTTP. As a next step, see the Secure Connection guide to serve it securely with a free automatic SSL certificate.

Other Hosting Providers

DigitalOcean · AWS · Azure · Vultr · Linode · Hetzner · OVHcloud · Contabo · Oracle Cloud