---
title: "Deploy OpenTelemetry Collector"
description: "Deploy and Host an OpenTelemetry Collector node"
category: "Observability"
url: https://railway.com/deploy/opentelemetry-collector
---

# Deploy OpenTelemetry Collector

Deploy and Host an OpenTelemetry Collector node

**[Deploy OpenTelemetry Collector on Railway](https://railway.com/template/opentelemetry-collector)**

- **Creator:** Jonas Atienza's Projects
- **Category:** Observability
- **Total deploys:** 2

## Template content

### OpenTelemetry Collector https://devicons.railway.app/opentelemetry

- **Source:** jratienza65/otel-lgtm-railway
- **Public domain:** Yes

## Documentation

# Deploy and Host OpenTelemetry Collector on Railway

The **OpenTelemetry (OTel) Collector** is a vendor-agnostic way to receive, process, and export telemetry data. It acts as a central proxy for your observability pipeline, allowing you to shift the burden of data delivery away from your applications. By using a standalone collector, you can aggregate logs, metrics, and traces from multiple sources and reliably send them to an external OTLP-compatible backend.

## About Hosting the OpenTelemetry Collector

Hosting a standalone OpenTelemetry Collector on Railway allows you to create a high-performance telemetry gateway with zero infrastructure overhead. This template deploys the collector pre-configured with an **external OTLP HTTP exporter**, enabling you to route data from your Railway services (or external apps) to any third-party observability platform or a remote LGTM stack.

Railway simplifies the deployment by managing service discovery and environment variables. Once deployed, your collector provides a stable internal endpoint for your other services, ensuring that telemetry data is buffered and retried even if your downstream provider experiences downtime.

---

## Common Use Cases

* **Telemetry Aggregation:** Collect data from multiple microservices and export it to a single external provider.
* **Protocol Translation:** Receive data in various formats (OTLP, Jaeger, Zipkin) and normalize it before exporting.
* **Data Transformation:** Mask sensitive information or add infrastructure-level attributes (like `railway.service.id`) to your spans and logs.
* **Offloading Workload:** Reduce application overhead by moving heavy compression and batching logic to the collector.

---

## Dependencies for OpenTelemetry Collector Hosting

* **OpenTelemetry Collector Contrib:** The core binary responsible for data processing.
* **OTLP HTTP Exporter:** The primary component for shipping data to external backends.

### Deployment Dependencies

- OpenTelemetry: https://opentelemetry.io/docs/
- OpenTelemetry Collector: https://opentelemetry.io/docs/collector/

### Implementation Details

This deployment utilizes Railway's private networking to receive data securely from your other services. It is configured to export data to an external OTLP/HTTP endpoint defined in your environment variables.

**Internal Ingestion Endpoints (for your apps):**

* **OTLP gRPC:** `http://${{RAILWAY_PRIVATE_DOMAIN}}:4317`
* **OTLP HTTP:** `http://${{RAILWAY_PRIVATE_DOMAIN}}:4318`

**Required Configuration:**
To connect to your external provider, ensure the following variables are set:

| Variable | Description |
| --- | --- |
| `RAILWAY_OTEL_EXPORTER_OTLP_ENDPOINT` | The full URL of your external OTLP receiver (e.g., `https://otlp.example.com`). |
| `RAILWAY_OTEL_EXPORTER_OTLP_IS_INSECURE` | Set to `true` if your external endpoint does not use TLS (rare for production). |
| `RAILWAY_LOKI_ENDPOINT ` | The full URL of your Loki receiver. |
| `RAILWAY_TEMPO_ENDPOINT ` | The full URL of your Tempo receiver. |
| `RAILWAY_PROMETHEUS_ENDPOINT ` | The full URL of your Prometheus receiver. |
| `VERSION` | The specific OTel Collector image tag. |

---

## Why Deploy OpenTelemetry 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 OpenTelemetry Collector 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.

## Similar templates

- [Pyroscope profiling](https://railway.com/deploy/pyroscope-profiling) — Protected continuous profiling with durable Pyroscope storage.
- [SigOnly](https://railway.com/deploy/sigonly) — Deploy SigNoz with a working demo app & config in one click
- [Unwrapped Spotify Music Stats](https://railway.com/deploy/wide-bold) — Unwrapped Spotify Music Stats, Estatísticas de músicas disponíveis

Open this page in a browser: https://railway.com/deploy/opentelemetry-collector
