Deploy Railtrack
Your Railway logs, streamed to Datadog, Honeycomb, and beyond.
Railtrack
Just deployed
RailTrack Agent
Stream your Railway logs to any destination in real time.
RailTrack deploys a dedicated ingestor agent per Railway environment. It connects directly to your Railway log stream, pipes everything through Vector, and forwards to wherever your team already works — Datadog, Honeycomb, Axiom, Better Stack, or any HTTP endpoint.
How it works
- Connect — provide your Railway API token and environment ID
- Deploy — RailTrack spins up a dedicated agent on Railway via the API
- Stream — the agent tails your service logs in real time via the Railway CLI
- Forward — Vector routes every log line to your configured sinks
One agent per environment. No shared infrastructure. Your logs never touch anyone else's pipeline.
Deploy and Host
About Hosting
RailTrack agents are deployed and hosted on Railway. When you connect an environment, RailTrack uses the Railway API to provision a dedicated service in your account — or in RailTrack's own project, depending on your plan. The agent runs as a long-lived container, tailing your logs continuously.
You do not run or manage the agent yourself. RailTrack handles provisioning, restarts, and redeployment when your sink configuration changes.
Why Deploy
Railway exposes your logs in its dashboard, but provides no native way to forward them to external systems. There is no built-in log drain, no alerting on log content, and no API for real-time log events outside of the CLI.
RailTrack closes that gap. The agent uses the Railway CLI — the same WebSocket stream powering Railway's own dashboard — and routes your logs to the tools your team already uses for observability. You get full-fidelity log forwarding without changing your application code or leaving Railway.
Common Use Cases
Centralised log aggregation — forward logs from multiple Railway environments into a single Datadog or Honeycomb workspace alongside your other infrastructure.
Cost visibility — ship logs to Axiom or Better Stack where retention is cheaper than Railway's native 7–30 day window, with no cap on how long you keep them.
Compliance and audit trails — route logs to a long-retention sink to meet SOC2, HIPAA, or GDPR requirements that Railway's retention limits cannot satisfy.
Alerting pipelines — feed logs into an observability platform that supports log-based monitors, giving you Slack or PagerDuty alerts when error patterns appear.
Multi-environment visibility — connect staging and production environments to the same sink workspace and filter by environment tag — something Railway's per-project UI cannot provide natively.
Dependencies for Railtrack Hosting
Here's what you'll need
- Railway API Key
- Deployed service with logs
Deployment Dependencies
The following must be available in the environment where the RailTrack agent runs:
| Dependency | Version | Purpose |
|---|---|---|
| Railway CLI | latest | Tails environment logs via WebSocket stream |
| Vector | ≥ 0.36.0 | Parses, transforms, and routes log lines to sinks |
| Docker | ≥ 20.10 | Container runtime for the agent image |
All three are bundled inside the agent Docker image. You do not need to install them separately — RailTrack handles this as part of the provisioning step.
If you are self-hosting the agent image, ensure your container runtime can pull from the RailTrack image registry and that outbound connections to backboard.railway.com and your configured sink endpoints are permitted.
Supported Sinks
| Sink | Type |
|---|---|
| Datadog | Native Vector sink |
| Honeycomb | Native Vector sink |
| Axiom | HTTP (Vector-compatible endpoint) |
| Better Stack | HTTP with bearer auth |
| Custom HTTP | Any endpoint, optional bearer token + headers |
Multiple sinks can be active simultaneously. Every log line goes to all configured destinations.
What the Agent Runs
Each deployed agent is a Docker container containing:
- Railway CLI — tails your environment logs via WebSocket stream
- Vector — parses, normalises, and routes log lines to sinks
- RailTrack ingestor — orchestrates subprocesses, one per service ID, with automatic restart and exponential backoff
The agent is stateless. Configuration is injected at deploy time via environment variables. No persistent storage required.
Configuration
VECTOR_CONFIG — TOML
Generated by RailTrack based on your configured sinks. Defines the full Vector pipeline: source, transforms, and sink destinations. You can inspect or override this at any time from the RailTrack dashboard.
Lifecycle
| Event | Behaviour |
|---|---|
| Agent deployed | Railway CLI subprocess starts per service ID |
| Subprocess exits | Automatic restart with exponential backoff (5s → 60s cap) |
| Sink unreachable | Vector buffers to disk, retries automatically |
| Agent stopped | All subprocesses terminate cleanly on SIGTERM |
| Sink added or removed | Agent redeployed with updated Vector config |
Security
- Each environment gets an isolated agent — no cross-environment access
- The agent container runs as a non-root user
Requirements
- A Railway account with API access
- At least one service with active log output
- A configured sink destination
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 Railtrack 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
Railtrack
ghcr.io/darkfadr/railtrack:latestRAILWAY_TOKEN
Your Railway API key
VECTOR_CONFIG
The raw config value of your vector config file
ENVIRONMENT_ID
The railway environment id that railtrack will ingest from. (Should be you production environment))
RAILWAY_SERVICES
Comma delimited list of service IDs to track from Railway
VECTOR_CONFIG_FORMAT
The format of the configuration passed to $VECTOR_CONFIG, should be one of [json, yaml, toml]