Deploy intermodal
Your one stop shop for Railway logs and metrics.
intermodal
Just deployed
Deploy and Host intermodal on Railway
intermodal is a single Go binary that turns Railway into a first-class observability source. It exports your services' platform metrics (CPU, memory, disk, network) in Prometheus format and streams their logs — deploy, HTTP/edge, and build — to Prometheus, Grafana Loki, or any OpenTelemetry collector. Railway ships neither a metrics endpoint nor a log drain; intermodal is both.
About Hosting intermodal
Hosting intermodal means running one lightweight service inside your Railway project. You give it a Railway API token and point it at your metrics and/or logs backends; it handles the rest. It discovers your services, polls Railway's GraphQL API for metrics on a background interval (staying within the API rate limit), and opens real-time GraphQL‑WS subscriptions for logs. Metrics are served at /metrics for scraping and/or pushed over OTLP; logs are normalized and fanned out to your sinks with batching, retries, and backpressure, so a slow sink never stalls collection. It's configured entirely through environment variables and runs as a singleton per project scope.
Common Use Cases
- Ship Railway service metrics (CPU, memory, disk, network) into Prometheus, Mimir, or Grafana Cloud for dashboards and alerting.
- Drain Railway logs — deploy stdout/stderr, HTTP/edge request logs, and build output — into Grafana Loki or an OpenTelemetry Collector, the log drain Railway doesn't provide.
- Centralize observability across multiple Railway projects into a single Grafana/LGTM stack, correlating request logs with resource metrics per service.
Dependencies for intermodal Hosting
- A Railway API token — either an account/workspace token (monitors every project it can see) or a project token (scoped to one environment).
- A metrics and/or logs backend to receive the data — a Prometheus-compatible store (Prometheus, Mimir, or Grafana Cloud) and/or an OpenTelemetry Collector or Grafana Loki endpoint.
Deployment Dependencies
- intermodal source & docs
- Railway Public API & tokens
- Prometheus · Grafana Loki · OpenTelemetry Collector
Implementation Details
intermodal is configured through environment variables (prefix INTERMODAL_). A minimal setup that exposes Prometheus metrics, pushes metrics + logs over OTLP, and includes HTTP request logs:
# Railway API token — pick ONE:
RAILWAY_API_TOKEN=... # account/workspace token (all visible projects)
# INTERMODAL_PROJECT_TOKEN=... # or a project token (single environment)
# Metrics: serve /metrics (pull) and/or push via OTLP
INTERMODAL_METRICS_EXPORTERS=prometheus,otlp
# Logs: which sinks (stdout, loki, otlp) and which streams
INTERMODAL_SINKS=otlp
INTERMODAL_HTTP_LOGS=true # also stream edge/request logs (services with a domain)
# OTLP target — shared by metric push + log sink
INTERMODAL_OTLP_ENDPOINT=opentelemetry-collector.railway.internal:4318
INTERMODAL_OTLP_INSECURE=true # internal, plain-HTTP collector
- Endpoints:
GET /metrics(Prometheus),/healthz(liveness),/readyz(readiness). - Run
intermodal doctoronce after setting the token to print a capability report — identity, discovered services, a trial metrics call, and a trial log subscription.
Why Deploy intermodal 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 intermodal 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
intermodal
jratienza65/intermodalINTERMODAL_OTLP_ENDPOINT
Host:port or full http(s) URL.
INTERMODAL_PROJECT_TOKEN
Project token (Project-Access-Token header). Scoped to a single environment.