# Self-host Traccar

> An open-source GPS tracking platform supporting over 170 device protocols.

- Page: https://levelrail.com/templates/traccar/
- JSON: https://levelrail.com/templates/traccar.json
- Category: IoT
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/traccar/traccar
- Upstream docs: https://www.traccar.org/documentation/

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 6.6

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| traccar | traccar/traccar | 6.6 | 8082 | none |
| traccar-db | postgres | 16-alpine | none | traccar_postgres_data -> /var/lib/postgresql/data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| traccar | CONFIG_USE_ENVIRONMENT_VARIABLES | preset |
| traccar | DATABASE_DRIVER | preset |
| traccar | DATABASE_PASSWORD | generated |
| traccar | DATABASE_URL | preset |
| traccar | DATABASE_USER | preset |
| traccar-db | POSTGRES_DB | preset |
| traccar-db | POSTGRES_PASSWORD | generated |
| traccar-db | POSTGRES_USER | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy traccar --name my-traccar
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/traccar/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Traccar on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Traccar, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image traccar/traccar:6.6, postgres:16-alpine is what you deploy there.

Self-host Traccar, Traccar docker compose file, deploy Traccar on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
