All Templates / Observability
Grafana Stack
One-click observability with Loki, Prometheus, Tempo, and Grafana
Grafana
MykalMachon/railway-grafana-stack
Just deployed
/var/lib/grafana/
Loki
MykalMachon/railway-grafana-stack
Just deployed
/loki
Prometheus
MykalMachon/railway-grafana-stack
Just deployed
/prometheus
Tempo
MykalMachon/railway-grafana-stack
Just deployed
/var/tempo
This template deploys a complete Grafana observability stack on Railway with just one click! The stack includes four integrated services:
This template is perfect for teams who need a comprehensive observability solution for their railway project without the hassle of manual configuration and infrastructure management.
GF_SECURITY_ADMIN_USER
variableGF_SECURITY_ADMIN_PASSWORD
environment variableVariable | Description | Default |
---|---|---|
GF_SECURITY_ADMIN_USER | Username for the Grafana admin account | Required input |
GF_SECURITY_ADMIN_PASSWORD | Password for the Grafana admin account | Auto-generated secure string |
GF_DEFAULT_INSTANCE_NAME | Name of your Grafana instance | Grafana on Railway |
GF_INSTALL_PLUGINS | Comma-separated list of Grafana plugins to install | grafana-simple-json-datasource,grafana-piechart-panel,grafana-worldmap-panel,grafana-clock-panel |
The Grafana service exposes these environment variables that you can reference in your other Railway applications to easily send data to your observability stack:
Variable | Description | Usage |
---|---|---|
LOKI_INTERNAL_URL | Internal URL for the Loki service | Use in your applications to send logs to and query Loki |
PROMETHEUS_INTERNAL_URL | Internal URL for the Prometheus service | Use in your applications to send metrics to and query Prometheus |
TEMPO_INTERNAL_URL | Internal URL for the Tempo service | Use in your applications to query Tempo |
These variables make it easy to configure your other Railway services to send telemetry data to your observability stack.
Tempo also exposes a few variables to make it easier to push tracing information to the service using either HTTP or GRPC
Variable | Description | Usage |
---|---|---|
INTERNAL_HTTP_INGEST | Internal HTTP ingest server URL for Tempo | Use in your applications to send traces to tempo via HTTP |
INTERNAL_GRPC_INGEST | Internal GRPC ingest server URL for Tempo | Use in your applications to send traces to tempo via GRPC |
Each service has its own VERSION
environment variable that can be set independently in each service's settings in the Railway dashboard:
VERSION
to control the Grafana Docker image tagVERSION
to control the Loki Docker image tagVERSION
to control the Prometheus Docker image tagVERSION
to control the Tempo Docker image tagBy default, all services use the latest
tag, but you can pin specific versions for stability:
Examples:
VERSION=11.5.2
VERSION=3.4.2
VERSION=v3.2.1
VERSION=v2.7.1
This allows you to update each component independently as needed.
This template deploys four interconnected services:
All services are deployed using official Docker images and configured to work together seamlessly.
You can easily ingest all of your railway logs into Loki from any service using Locomotive. Just spin up their template, drop in your Railway API key, the ID of the services you want to monitor, and a link to your new Loki instance and logs will start flowing! no code changes needed anywhere!
Tempo is a bit different than both Prometheus and Loki in that exposes separate GRPC and HTTP servers on ports :4317
and :4318
respectively specifically for ingesting your tracing data or "spans".
When configuring your application to send traces to Tempo, please use one of the preconfigured variables in the Tempo service: INTERNAL_HTTP_INGEST
or INTERNAL_GRPC_INGEST
.
Another thing to note is that the ingest API endpoint for the HTTP server is /v1/traces
. For a working example of this in a node.js express API, see /examples/api/tracer.js
in our GitHub repository.
To send data from your other Railway applications to this observability stack:
LOKI_URL=${{Grafana.LOKI_INTERNAL_URL}}
PROMETHEUS_URL=${{Grafana.PROMETHEUS_INTERNAL_URL}}
TEMPO_URL=${{Grafana.TEMPO_INTERNAL_URL}}
To customize the configuration of Loki, Prometheus, or Tempo:
The pre-configured Grafana connections will continue to work with your customized services.
Developed and maintained by Mykal. For issues or suggestions, please open an issue on the GitHub repository.
Template Content
GF_SECURITY_ADMIN_USER
admin account username
Prometheus
MykalMachon/railway-grafana-stackDetails
Mykal's Projects
Created on Mar 6, 2025
26 total projects
12 active projects
100% success on recent deploys
Observability
More templates in this category
OpenTelemetry Collector and Backend
OpenTelemetry Collector with Backend Stack
Melissa's Projects
77
pgweb | Postgres UI
View and query your Postgres instance with a sleek and minimalistic UI.
Cory "GH5T" James's Projects
Elasticsearch-Kibana
Elasticsearch is a search engine based on the Lucene library.
Mex Delgado
72