> ## Content Index
> Fetch the complete content index at: https://blog.uptime.bet/llms.txt
> Use this file to discover other available public pages before exploring further.

# Traccar 6.17: Self-Host Your Own GPS Tracking Server with Docker Compose
- URL: https://blog.uptime.bet/traccar-self-hosted-gps-tracking-server-docker/
- Published: 2026-11-27T08:00:00.000Z
- Updated: 2026-11-27T08:00:00.000Z
- Description: Traccar is an Apache-2.0 GPS tracking server that speaks more than 200 tracker protocols and turns any phone into a tracker. Here is what it does and how to run Traccar 6.17 with Docker Compose.
- Author: Alexandre Nebeling
- Tags: Trending, Self-Hosted, Open Source, Docker, Homelab, Monitoring, Traccar

Where is the car right now? Did the family get home safely from the holiday trip? Which route did the van take last Tuesday? Plenty of apps and gadgets answer those questions, but almost all of them send your location history to someone else's cloud. If you would rather keep that data on a server you control, there is one project that has been the go-to answer for years: **Traccar**.

Traccar is not a brand-new GitHub sensation. It is a mature project that keeps shipping: **version 6.17.0 landed on 1 November 2026**, and the official Docker images (`6.17.0`, `6.17`, `6` and `latest`) were published the same day. Reason enough to take a closer look.

## What is Traccar?

[Traccar](https://github.com/traccar/traccar?ref=blog.uptime.bet) is a free, open-source GPS tracking platform. The main repository contains the Java back-end server, which according to the README supports **more than 200 GPS protocols and over 2,000 tracker models** out of the box. It works with the major SQL databases and exposes a [REST API](https://www.traccar.org/traccar-api/?ref=blog.uptime.bet).

The project describes its audience as fleet operators, resellers running a white-label tracking platform, and individuals tracking their own devices. That last group is where homelabbers come in.

The basics:

- **License:** Apache License 2.0 (server, web app and mobile apps).
- **Stack:** Java server; React, Material UI and MapLibre for the [web app](https://github.com/traccar/traccar-web?ref=blog.uptime.bet).
- **Databases:** H2 by default (for testing), MySQL, PostgreSQL / TimescaleDB for production.
- **Hosting:** self-host for free, or use the project's paid managed hosting if you don't want to run a server.
- **Current version:** 6.17.0 (1 November 2026).

## The Traccar ecosystem

Traccar is more than one container. The pieces fit together like this:

- **Traccar server** – receives positions from devices on dedicated ports, stores them and runs events, reports and notifications.
- **Traccar web app** – the browser dashboard with the live map, reports, geofences and device management. It is bundled with the server, so you don't have to build it yourself.
- [**Traccar Manager**](https://github.com/traccar/traccar-manager?ref=blog.uptime.bet) – a mobile app (Android and iOS) for *viewing and managing* your devices.
- [**Traccar Client**](https://github.com/traccar/traccar-client?ref=blog.uptime.bet) – a mobile app (Android and iOS) that *turns a smartphone into a GPS tracker* and reports its location to your server.

![Traccar Client mobile app showing the tracking card with device identifier, continuous tracking toggle, send location and SOS buttons, and the server URL setting](https://blog.uptime.bet/content/images/2026/11/traccar-traccar-client.webp)

The Traccar Client app turns a phone into a tracker: set a device identifier and your server URL. [Source: traccar/traccar-client on GitHub](https://github.com/traccar/traccar-client?ref=blog.uptime.bet) (Apache-2.0)

So you don't need to buy dedicated hardware to start. A phone with Traccar Client is enough to test everything, and you can add real GPS trackers (OBD dongles, motorbike trackers, pet trackers and so on) later.

## Key features

The README lists the core features, and the documentation fills in the details:

- **Real-time GPS tracking** on a live map.
- **Geofencing** – draw areas and get events when devices enter or leave them.
- **Alarms and notifications** – Traccar has web and email channels enabled by default and can also deliver notifications via push (Traccar Manager / Firebase), SMS, Telegram and WhatsApp.
- **Reports** – detailed and summary reports.
- **Driver behaviour monitoring** for fleets.
- **Account and device management** for multiple users and devices.
- **Single sign-on** – OpenID Connect and LDAP options in the configuration reference, including an `openid.adminGroup` setting to grant admin rights by group.
- **REST API** for integrations.

![Traccar Manager mobile app with a map of Paris, a device marker and a details popup showing fix time, address link, speed and total distance](https://blog.uptime.bet/content/images/2026/11/traccar-traccar-manager.webp)

Traccar Manager shows your devices on a map with fix time, speed and distance. [Source: traccar/traccar-manager on GitHub](https://github.com/traccar/traccar-manager?ref=blog.uptime.bet) (Apache-2.0)

## Why self-host your GPS tracking?

- **Privacy:** location history is about as personal as data gets. With Traccar it lives in your own database.
- **No subscription per device:** many consumer trackers come with a monthly fee for the vendor's app. A lot of them speak a standard protocol that Traccar understands, so you can point them at your own server instead (check the [supported devices list](https://www.traccar.org/devices/?ref=blog.uptime.bet) first).
- **One dashboard for everything:** phones, car trackers and dedicated devices end up on the same map.
- **Mature and well documented:** the project has been around for a long time, and the configuration reference is extensive.

## Installing Traccar with Docker Compose

Traccar publishes official multi-arch images on Docker Hub as `traccar/traccar` (Alpine, Debian and Ubuntu variants for `linux/amd64` and `linux/arm64`). The default H2 database is fine for a quick test, but the docs explicitly don't recommend it for production. For a homelab, the official **MySQL** example is the easiest path; the project recommends TimescaleDB for large installations.

### Step 1: Prepare Docker

The official VPS guide recommends disabling Docker's userland proxy. The reason: Traccar listens on a large range of device ports, and with the userland proxy Docker starts a separate `docker-proxy` process for every published port, which costs a lot of memory.

```bash
echo '{"userland-proxy": false}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker

```

If you already have a `daemon.json`, add the key to it instead of overwriting the file. The alternative is to publish only the ports you actually need (see the tips below), which is what I'd recommend for a homelab anyway.

### Step 2: Create the directories and get the compose file

```bash
sudo mkdir -p /opt/traccar/data /opt/traccar/logs
cd /opt/traccar
sudo curl -o compose.yaml https://raw.githubusercontent.com/traccar/traccar/master/docker/compose/traccar-mysql.yaml

```

### Step 3: Review and adjust the compose file

The official file defines three services: `database` (MySQL), `traccar` and `autoheal`. Here is a trimmed version with the changes I'd make for a home setup: real passwords, a pinned Traccar version and only the ports for the phone app and the web UI.

```yaml
services:
  database:
    image: mysql:lts
    restart: unless-stopped
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: "yes"
      MYSQL_DATABASE: traccar
      MYSQL_USER: traccar
      MYSQL_PASSWORD: change-me-to-a-long-random-password
    volumes:
      - /opt/traccar/data:/var/lib/mysql

  traccar:
    image: traccar/traccar:6.17.0
    restart: unless-stopped
    depends_on:
      - database
    environment:
      CONFIG_USE_ENVIRONMENT_VARIABLES: "true"
      DATABASE_DRIVER: com.mysql.cj.jdbc.Driver
      DATABASE_URL: >-
        jdbc:mysql://database:3306/traccar
        ?zeroDateTimeBehavior=round
        &serverTimezone=UTC
        &allowPublicKeyRetrieval=true
        &useSSL=false
        &allowMultiQueries=true
        &rewriteBatchedStatements=true
        &autoReconnect=true
        &useUnicode=yes
        &characterEncoding=UTF-8
        &sessionVariables=sql_mode=''
      DATABASE_USER: traccar
      DATABASE_PASSWORD: change-me-to-a-long-random-password
    healthcheck:
      test: [ "CMD", "wget", "-q", "--spider", "http://localhost:8082/api/health" ]
      interval: 2m
      timeout: 5s
      start_period: 1h
      retries: 3
    ports:
      - "8082:8082"   # web UI and API
      - "5055:5055"   # OsmAnd protocol (Traccar Client app)
    volumes:
      - /opt/traccar/logs:/opt/traccar/logs

```

A few notes on what I changed and why:

- **Passwords:** the upstream example uses `traccar` / `traccar`. Change both `MYSQL_PASSWORD` and `DATABASE_PASSWORD` to the same long random value.
- **Ports:** the upstream file publishes `5000-5500` (TCP), so every protocol port is reachable. If you only use the phone app, port **5055** is all you need (the Traccar Client docs name 5055 as the correct port). Add the specific port of each hardware tracker you own.
- **Environment variables:** with `CONFIG_USE_ENVIRONMENT_VARIABLES` set to `true`, any key from the configuration file can be set as an environment variable: replace dots with underscores and use screaming snake case (the docs' example: `mail.smtp.fromName` becomes `MAIL_SMTP_FROM_NAME`). Environment variables take precedence over the XML file.
- **autoheal:** the upstream file adds a `willfarrell/autoheal` container that restarts unhealthy containers. It needs the Docker socket mounted (read-only), so I left it out of this trimmed version. Add it back if you want automatic restarts and are comfortable with that trade-off.

### Step 4: Start it

```bash
cd /opt/traccar
sudo docker compose up -d
sudo docker compose logs -f traccar

```

Once the logs settle, open `http://your-server:8082` in a browser.

### Step 5: Create the admin account

There is no default login. Traccar's code makes the **first user who registers an administrator**. So register immediately after the first start, before anyone else can reach the page. Afterwards, other users can only register if registration is enabled in the server settings, so check that setting and turn it off if you don't want self-registration.

### Step 6: Connect your phone

1. Install **Traccar Client** on Android or iOS.
2. Note the **device identifier** shown in the app.
3. In the web UI, click **+** and add a device with exactly that identifier.
4. In the app, set the **server URL** to a full URL with port 5055, for example `http://traccar.example.com:5055`.
5. Enable tracking and allow unrestricted background usage for the app, otherwise the phone's battery optimisation can cause large gaps in your tracks.

## Configuration tips

**Put the web UI behind HTTPS.** Traccar doesn't support TLS natively. The official [Secure Connection guide](https://www.traccar.org/secure-connection/?ref=blog.uptime.bet) adds a Caddy service to the same compose file:

```yaml
  caddy:
    image: caddy:latest
    restart: unless-stopped
    depends_on:
      - traccar
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /opt/traccar/caddy/Caddyfile:/etc/caddy/Caddyfile
      - /opt/traccar/caddy/data:/data

```

with a Caddyfile like this:

```
traccar.example.com {
  reverse_proxy traccar:8082
}

```

When you use a reverse proxy, remove the `8082:8082` port mapping so the web UI is only reachable via HTTPS, and set `WEB_URL` (`web.url`) to your public URL. Traccar uses it for links in notifications and reports and for OpenID Connect.

**Device ports are not HTTP.** Most trackers talk raw TCP or UDP to their protocol port, so they can't go through Caddy. Not sure which port your tracker needs? The [protocol identification guide](https://www.traccar.org/identify-protocol/?ref=blog.uptime.bet) suggests pointing the device at port 5001 and inspecting the log. Some protocols use UDP: the official `docker run` example publishes the range for both TCP and UDP, while the compose example only maps TCP. If your tracker uses UDP, add a `/udp` mapping for its port.

**Limit enabled protocols.** By default Traccar enables every protocol that has a port. The `protocols.enable` setting (env: `PROTOCOLS_ENABLE`) takes a comma-separated list such as `osmand,teltonika`, so only the protocols you use are listening.

**Notifications.** Email needs SMTP settings (`mail.smtp.*`), either server-wide or per user. Telegram needs a bot key and chat ID (`notificator.telegram.key`, `notificator.telegram.chatId`), and the channel has to be listed in `notificator.types`. You can test channels right from the notification settings.

**Single sign-on.** If you already run an OIDC provider such as [Pocket ID](https://blog.uptime.bet/pocket-id-self-hosted-passkey-sso-oidc-docker/), set `openid.clientId`, `openid.clientSecret` and `openid.issuerUrl` (as `OPENID_CLIENT_ID`, `OPENID_CLIENT_SECRET`, `OPENID_ISSUER_URL`). `openid.force` skips the Traccar login page entirely.

**Monitor it.** The container's health check uses `/api/health` on port 8082, and the same endpoint works for an HTTP monitor in [Uptime Kuma](https://blog.uptime.bet/uptime-kuma-2-self-hosted-uptime-monitoring-docker/). Don't forget to back up `/opt/traccar/data`, or better, take a proper MySQL dump.

## Honest limitations

- **Port exposure is unavoidable for remote devices.** Phones and trackers out on the road have to reach your server, so at least one device port has to be reachable from the internet (or through a VPN on the phone). Keep that exposure as small as possible.
- **The setup is heavier than it looks.** A Java server plus MySQL is more than a single small Go binary. Fine for a mini PC or VPS, less so for the smallest single-board computers.
- **Hardware compatibility needs checking.** "Supports 2,000+ models" doesn't mean every cheap clone works perfectly. Check the devices list and the forums before buying a tracker.
- **Phones need tuning.** Battery optimisation on Android and iOS can interrupt background tracking. The client docs are upfront about this.
- **Some features depend on external services.** Push to the official Traccar Manager app uses a key from a traccar.org account, and SMS or WhatsApp need a provider.
- **The release notes are sparse.** The GitHub release for 6.17.0 only lists binaries without a changelog, so it's hard to tell from GitHub what changed between versions.

## Self-hosted vs. managed Traccar

The project itself offers both options: the open-source server you run yourself for free, and [official managed hosting](https://www.traccar.org/pricing/?ref=blog.uptime.bet) if you'd rather not run a server. The apps work with both. For a homelab where you want full control over your location data, self-hosting is the obvious choice. If you are tracking a business fleet and don't want to be on call, the managed option exists and funds development.

## Conclusion

Traccar is one of those projects that quietly does its job very well. It's Apache-2.0, ships official multi-arch Docker images, understands an enormous range of trackers and comes with polished web and mobile apps. With the official compose file you have it running in a few minutes. The real work is deciding which ports to expose and putting the web UI behind HTTPS.

If you have an old phone in a drawer, install Traccar Client on it, put it in the car, and you have your own private vehicle tracker tonight.

Looking for more homelab projects? Browse the [Self-Hosted](https://blog.uptime.bet/tag/self-hosted/) and [Monitoring](https://blog.uptime.bet/tag/monitoring/) tags, or check out [Pulse](https://blog.uptime.bet/pulse-self-hosted-proxmox-docker-monitoring/) and [Beszel](https://blog.uptime.bet/beszel-lightweight-server-monitoring-docker/) to keep an eye on the server Traccar runs on.

## Sources

- [traccar/traccar on GitHub (README, license, compose examples)](https://github.com/traccar/traccar?ref=blog.uptime.bet)
- [Traccar 6.17.0 release](https://github.com/traccar/traccar/releases/tag/v6.17.0?ref=blog.uptime.bet)
- [Traccar Docker documentation](https://www.traccar.org/docker/?ref=blog.uptime.bet)
- [Install Traccar on a VPS](https://www.traccar.org/install-vps/?ref=blog.uptime.bet)
- [Secure Connection guide](https://www.traccar.org/secure-connection/?ref=blog.uptime.bet)
- [Configuration file reference](https://www.traccar.org/configuration-file/?ref=blog.uptime.bet)
- [Notifications configuration](https://www.traccar.org/notifications/?ref=blog.uptime.bet)
- [Traccar Client configuration](https://www.traccar.org/client-configuration/?ref=blog.uptime.bet)
- [Protocol identification](https://www.traccar.org/identify-protocol/?ref=blog.uptime.bet)
- [traccar/traccar-web](https://github.com/traccar/traccar-web?ref=blog.uptime.bet), [traccar-manager](https://github.com/traccar/traccar-manager?ref=blog.uptime.bet), [traccar-client](https://github.com/traccar/traccar-client?ref=blog.uptime.bet)