Railway

Deploy Railtrack

Your Railway logs, streamed to Datadog, Honeycomb, and beyond.

Deploy 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

  1. Connect — provide your Railway API token and environment ID
  2. Deploy — RailTrack spins up a dedicated agent on Railway via the API
  3. Stream — the agent tails your service logs in real time via the Railway CLI
  4. 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:

DependencyVersionPurpose
Railway CLIlatestTails environment logs via WebSocket stream
Vector≥ 0.36.0Parses, transforms, and routes log lines to sinks
Docker≥ 20.10Container 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

SinkType
DatadogNative Vector sink
HoneycombNative Vector sink
AxiomHTTP (Vector-compatible endpoint)
Better StackHTTP with bearer auth
Custom HTTPAny 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

EventBehaviour
Agent deployedRailway CLI subprocess starts per service ID
Subprocess exitsAutomatic restart with exponential backoff (5s → 60s cap)
Sink unreachableVector buffers to disk, retries automatically
Agent stoppedAll subprocesses terminate cleanly on SIGTERM
Sink added or removedAgent 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

More templates in this category

View Template
SigOnly
Deploy SigNoz with a working demo app & config in one click

zoeyjones
View Template
NEW
Unwrapped Spotify Music Stats
Unwrapped Spotify Music Stats, Estatísticas de músicas disponíveis

Jorge Henrique
View Template
OpenTelemetry Collector and Backend
OpenTelemetry Collector with Backend Stack

Melissa