Deploy Grafana Alloy LGTM
Deploy and Host the Grafana LGTM stack with Alloy and Faro RUM
Prometheus
Just deployed
/data
Just deployed
/data
Just deployed
Just deployed
/data/grafana
Just deployed
/data
Deploy and Host Grafana Alloy LGTM on Railway
Grafana Alloy LGTM is a complete observability stack — Loki for logs, Tempo for traces, Prometheus for metrics, and Grafana for visualization — fronted by Grafana Alloy instead of an OpenTelemetry Collector. Alloy accepts both browser telemetry from the Faro Web SDK and standard OTLP from your services, so frontend and backend observability arrive through one gateway.
About Hosting Grafana Alloy LGTM
Hosting this stack means running five services: Alloy as the ingest gateway, and Loki, Tempo, Prometheus and Grafana behind it on the private network. Alloy replaces the collector here because the Faro Web SDK posts its own payload that no collector build can accept — running Alloy as the gateway avoids deploying a second service purely to relay what Alloy already parsed.
On Railway the three backends each take a volume, Grafana ships with datasources and a frontend dashboard already provisioned, and every cross-service address is wired through private networking. Grafana and the Alloy gateway get public domains; nothing else is exposed.
Common Use Cases
- Full-stack observability where frontend RUM matters as much as backend telemetry
- Self-hosting a replacement for Grafana Cloud Frontend Observability, on infrastructure you control
- Correlating browser errors and Core Web Vitals with backend traces and metrics in one Grafana
- Centralizing telemetry from several applications into a single stack with per-app retention
Dependencies for Grafana Alloy LGTM Hosting
- Grafana Alloy
- Grafana
- Prometheus
- Loki
- Tempo
Deployment Dependencies
- Grafana Alloy: https://grafana.com/docs/alloy/latest/
- Grafana: https://grafana.com/docs/
- Prometheus: https://prometheus.io/docs/introduction/overview/
- Loki: https://grafana.com/docs/loki/latest/
- Tempo: https://grafana.com/docs/tempo/latest/
- Grafana Faro Web SDK: https://github.com/grafana/faro-web-sdk
Implementation Details
The Alloy gateway serves three ports. PORT steers Railway's health probe at Alloy's own server, while each domain keeps its own target port:
PORT=12345 # Alloy's HTTP server; the health probe target
12347 # faro.receiver — browser and mobile RUM
4318 # OTLP/HTTP — application telemetry
Both ingest paths are authenticated, and differently. Browsers send x-api-key; services send HTTP basic auth:
FARO_API_KEY="${{ secret(32) }}"
FARO_CORS_ALLOWED_ORIGINS="https://app.example.com,http://localhost:3000"
OTEL_INGEST_USERNAME="railway"
OTEL_INGEST_PASSWORD="${{ secret(32) }}"
Alloy writes to the backends over private networking, using each one's OTLP path:
RAILWAY_LOKI_ENDPOINT="http://${{Loki.RAILWAY_PRIVATE_DOMAIN}}:3100/otlp"
RAILWAY_TEMPO_ENDPOINT="http://${{Tempo.RAILWAY_PRIVATE_DOMAIN}}:4318"
RAILWAY_PROMETHEUS_ENDPOINT="http://${{Prometheus.RAILWAY_PRIVATE_DOMAIN}}:9090/api/v1/otlp"
Grafana takes the same variable names but each backend's base URL, since it queries rather than writes:
RAILWAY_LOKI_ENDPOINT="http://${{Loki.RAILWAY_PRIVATE_DOMAIN}}:3100"
RAILWAY_TEMPO_ENDPOINT="http://${{Tempo.RAILWAY_PRIVATE_DOMAIN}}:3200"
RAILWAY_PROMETHEUS_ENDPOINT="http://${{Prometheus.RAILWAY_PRIVATE_DOMAIN}}:9090"
Grafana boots with a randomized admin password, preinstalled plugins, logs-to-traces and exemplar correlation already wired, and a Frontend Observability dashboard built over the Faro data.
Why Deploy Grafana Alloy LGTM 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 Grafana Alloy LGTM 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
