---
title: "Deploy Traccar"
description: "Traccar GPS tracking behind a password, with phone-app position tracking"
category: "Other"
url: https://railway.com/deploy/traccar
---

# Deploy Traccar

Traccar GPS tracking behind a password, with phone-app position tracking

**[Deploy Traccar on Railway](https://railway.com/template/traccar)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/traccar/manifest.json

- **Creator:** Youssef Siam
- **Category:** Other

## Template content

### traccar

- **Image:** traccar/traccar:6.15

### caddy

- **Image:** ghcr.io/youssefsiam38/traccar-railway-caddy:1.0.0
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Traccar on Railway

Traccar is a leading open-source GPS tracking platform: a web dashboard with live maps, geofences, reports and
events, fed by phone apps or GPS hardware. This is a community-maintained template; it is not affiliated with the
Traccar project.

## About Hosting Traccar

Traccar is a Java server with a web UI and a database, plus dozens of device-protocol listeners. On a public URL
it exposes login and registration — and on a fresh instance the first person to register becomes the
administrator. It also needs the right reverse-proxy headers, and devices need a reachable protocol port to
report to.

This template runs Traccar on Railway behind one password. A Caddy front-door adds HTTP basic authentication over
the web dashboard and REST API (keeping the instance private and closing the first-user-admin race), while an
open `/osmand` path routes the OsmAnd protocol so the free Traccar Client phone apps (and other HTTP trackers)
can report positions over HTTPS. Data is stored in an embedded database on a volume, so it is fully
self-contained; an external MySQL/PostgreSQL is optional.

## Common Use Cases

- Personal or family location tracking with the free Traccar Client / OsmAnd phone apps.
- A private fleet dashboard with live maps, geofences and trip reports.
- A self-hosted alternative to commercial GPS tracking services.

## Dependencies for Traccar Hosting

- Nothing required — the embedded database and phone-app ingestion work out of the box.
- Optional: an external MySQL/PostgreSQL for larger deployments; a Railway TCP proxy for a binary-protocol
  hardware tracker.

### Deployment Dependencies

- Traccar: https://github.com/traccar/traccar (Apache-2.0)
- Caddy: https://caddyserver.com (Apache-2.0)
- Template repository, image and tests: https://github.com/youssefsiam38/traccar-railway

### Implementation Details

Traccar runs upstream's official image, pinned by digest, configured from the environment with self-registration
turned off. A Caddy front-door adds HTTP basic authentication over the dashboard and API, leaves `/osmand` open
for device reporting, strips the front-door credential before Traccar (so Traccar uses its own session), and
forces the HTTPS scheme Traccar needs for secure cookies and live updates. Binary hardware protocols use a
Railway TCP proxy added per device port.

Tested in CI and on a live deployment of this template: authentication gates the dashboard and API, the OsmAnd
path is open and ingests a position end to end (admin created, device registered, position stored), and a
redeploy keeps the data volume.

The deploy form generates `OWNER_PASSWORD` (front-door username `owner`). Copy it from the caddy service's
variables, open the domain, create your Traccar admin account, and point the Traccar Client app at
`https://YOUR-DOMAIN/osmand`.

## Why Deploy Traccar on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your
infrastructure so you don't have to deal with configuration, while allowing you to vertically and
horizontally scale it.

By deploying Traccar on Railway, you are one step closer to supporting a complete full-stack application with
minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/traccar
