Deploy Traccar
Traccar GPS tracking server with Postgres, admin set up on first start
Just deployed
/var/lib/postgresql/data
Just deployed
/opt/traccar/data
Deploy and Host Traccar on Railway
Traccar is an open-source GPS tracking server. It receives positions from more than 200 GPS tracker protocols and from the Traccar Client phone app, and shows live locations, trip history, geofences, alerts and reports in a web app. A REST API lets you plug it into your own tools.
About Hosting Traccar
Traccar is a Java server with a built-in web app. It needs a database for positions, devices and users, a public HTTPS address for the web app and the phone app, and a TCP port for each hardware tracker protocol you use. This template runs Traccar 6.17.0 from a pinned official image with Railway Postgres, a volume for media files and a health check on /api/health. On the first start it creates your administrator before the web port opens, so nobody else can claim a fresh instance, and self-registration stays off. Updates arrive as notices when the template's repo changes.
Common Use Cases
- Live tracking of a vehicle fleet, delivery vans or field staff
- Tracking family phones with the Traccar Client app on your own server
- Geofence, speeding and ignition alerts, plus trip and stop reports
Dependencies for Traccar Hosting
- PostgreSQL (Railway's Postgres service, included)
- A volume for Traccar's media files (included)
Deployment Dependencies
- Traccar: https://www.traccar.org
- Docker image and versions: https://hub.docker.com/r/traccar/traccar
- Release notes: https://github.com/traccar/traccar/releases
- Configuration keys: https://www.traccar.org/configuration-file/
- Template source: https://github.com/aalfath/traccar-railway-template
Implementation Details
Sign in at https://YOUR-DOMAIN with the login admin (the TRACCAR_ADMIN_EMAIL variable) and the generated TRACCAR_ADMIN_PASSWORD from the Traccar service's Variables tab. Then change both under Settings → Account.
- Phone app: in Traccar Client, set the server URL to
https://YOUR-DOMAIN. Traccar forwards these posts to its OsmAnd protocol. - Hardware trackers: add a TCP Proxy in the Traccar service's networking settings for your device's protocol port (for example 5023 for GT06 or 5027 for Teltonika), then point the tracker at that host and port. Railway has no UDP proxy, so set UDP-only devices to TCP.
- More settings: any Traccar config key can be set as a variable, in upper case with dots as underscores, for example
MAIL_SMTP_HOSTfor email notifications.
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.
Template Content
