---
title: "Deploy Monoscope"
description: "Monoscope | Production Self-Hosted Stack deployment stack"
category: "Other"
url: https://railway.com/deploy/monoscope-1
---

# Deploy Monoscope

Monoscope | Production Self-Hosted Stack deployment stack

**[Deploy Monoscope on Railway](https://railway.com/template/monoscope-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/monoscope-1/manifest.json

- **Creator:** VerifiedStacks's Projects
- **Category:** Other

## Template content

### timescaledb

- **Image:** timescale/timescaledb-ha:pg18-all

### monoscope

- **Image:** ghcr.io/monoscope-tech/monoscope:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host Monoscope on Railway

[Monoscope](https://github.com/monoscope-tech/monoscope) is an open-source, production-grade observability platform designed for logs, metrics, and distributed traces with S3 and TimescaleDB backends. It provides full-text search, high-throughput OpenTelemetry ingestion, natural language telemetry querying, and automated anomaly detection agents.

This 1-click verified deployment template provisions Monoscope on Railway with zero manual configuration. The stack includes the Monoscope core engine, a dedicated TimescaleDB relational database container with persistent block storage, automatic cryptographic secret generation, and automated SSL edge routing.

## About Hosting Monoscope

This deployment stack provisions an isolated multi-service architecture with automated health probes and dedicated persistent storage:

- **Observability Engine (`monoscope`):** The primary Monoscope web dashboard, REST API, and gRPC ingestion server (ports `8080` HTTP and `4317` gRPC). Handles telemetry ingestion, TimeFusion analytics, and AI report generation.
- **Dedicated TimescaleDB Database (`timescaledb`):** PostgreSQL powered by the TimescaleDB extension for hypertable time-series storage, log indexes, and metadata persistence.
- **Persistent Storage Volume:** Attached dedicated block storage mounted at `/var/lib/postgresql/data` ensuring metrics, trace indexes, and configuration state persist across platform redeployments.

## Why Deploy Monoscope on Railway?

- **1-Click Verified Setup:** Instant multi-container deployment without managing Docker daemons, reverse proxies, or SSL certificates manually.
- **Dynamic Cryptographic Key Generation:** High-entropy 32-character secrets are automatically generated during provisioning for database credentials, basic authentication, and API key encryption.
- **Inter-Service Credential Synchronization:** `DATABASE_URL` dynamically references `${{timescaledb.POSTGRES_PASSWORD}}` over Railway's encrypted private mesh network (`timescaledb.railway.internal`).
- **Persistent Relational Storage:** Dedicated persistent volume attached to TimescaleDB to safeguard telemetry tables and application state.
- **Custom Domains &amp; SSL:** Built-in SSL encryption with custom domain routing and automatic edge certificates.
- **Reliable Scaling:** Seamlessly scale RAM and vCPU compute resources as your ingestion workload expands.

## Common Use Cases

- **Centralized Application Observability:** Ingest, visualize, and query OpenTelemetry logs, metrics, and traces across microservices and cloud workloads.
- **Natural Language Telemetry Queries:** Explore complex production error cascades and traces using natural language queries powered by AI agents.
- **Sovereign Telemetry Hosting:** Maintain 100% control over sensitive application logs, audit trails, and compliance metrics without third-party vendor lock-in.

## Dependencies for Monoscope Hosting

- **Container Workload (`monoscope`):** The primary web user interface and REST/gRPC API ingestion service.
- **Container Workload (`timescaledb`):** PostgreSQL 18 with TimescaleDB time-series extensions.
- **Persistent Storage Volume (`timescale_data`):** Dedicated persistent volume attached to `/var/lib/postgresql/data` for database retention.

## Configuration &amp; Environment Variables

| Variable | Default Value | Description |
| :--- | :--- | :--- |
| `DATABASE_URL` | *(auto-wired)* | PostgreSQL connection string connecting to TimescaleDB via Railway private networking with dynamic secret synchronization. |
| `POSTGRES_USER` | `postgres` | Administrative database user on the TimescaleDB instance. |
| `POSTGRES_PASSWORD` | *(auto-generated)* | 32-character random cryptographic password generated per deployment. |
| `POSTGRES_DB` | `monoscope` | Initial database name for Monoscope application state. |
| `HOST_URL` | *(auto-wired)* | Public canonical URL assigned to the deployment (`https://${{RAILWAY_PUBLIC_DOMAIN}}`). |
| `BASIC_AUTH_ENABLED` | `true` | Enforces HTTP Basic Authentication to protect your observability dashboard. |
| `BASIC_AUTH_USERNAME` | `admin` | Default administrative login username. |
| `BASIC_AUTH_PASSWORD` | *(auto-generated)* | 32-character high-entropy secret generated per deployment for dashboard login. |
| `API_KEY_ENCRYPTION_SECRET_KEY`| *(auto-generated)* | 32-character cryptographic key used to encrypt ingested API keys and integration tokens. |
| `PORT` | `8080` | Internal HTTP listening port mapped automatically by Railway edge routing. |
| `GRPC_PORT` | `4317` | OpenTelemetry gRPC ingestion port for OTLP collectors and agents. |
| `MIGRATE_AND_INITIALIZE_ON_START` | `true` | Automatically executes database schema migrations on container boot. |
| `ENABLE_BACKGROUND_JOBS` | `true` | Enables scheduled anomaly detection, report generators, and maintenance workers. |

## First-Time Setup &amp; Onboarding

1. Deploy the template on Railway.
2. In your Railway project dashboard, view the generated `BASIC_AUTH_PASSWORD` under the `monoscope` service's **Variables** tab.
3. Open the public domain generated for your deployment (`https://.up.railway.app`).
4. Log in using `admin` and your generated `BASIC_AUTH_PASSWORD`.
5. Point your OpenTelemetry SDK or OTLP collector to your instance endpoint (HTTP: port `8080` or gRPC: port `4317`) to begin streaming telemetry.

---
*Verified and maintained by **VerifiedStacks**.*


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/monoscope-1
