Railway

Deploy Langwatch (AI Observability)

Deploy and Host Langwatch (AI Observability) with Railway

Deploy Langwatch (AI Observability)

/var/lib/clickhouse

Just deployed

/data

Just deployed

Just deployed

/var/lib/postgresql/data

Deploy and Host LangWatch (AI Observability) on Railway

LangWatch is an open-source LLM observability platform for monitoring, evaluating, and improving AI applications. It captures traces and spans from your LLM calls, runs automated evaluations and guardrails, tracks quality and cost analytics, and includes an optimization studio for prompt and pipeline tuning — giving teams full visibility into how their AI behaves in production.

About Hosting LangWatch (AI Observability)

Hosting LangWatch means running a multi-service stack: the Next.js app (UI and API), a background workers process, a Go-based NLP engine, the LangEvals evaluation service, plus three datastores — PostgreSQL for primary data, Redis for queues, and ClickHouse for trace indexing and time-series analytics. This template wires all seven services together over Railway's private network, provisions managed Postgres and Redis, mounts persistent volumes for ClickHouse and the databases, and auto-generates the encryption and auth secrets on deploy. The app runs Prisma migrations on first boot, so you get a working instance with no manual database setup.

Common Use Cases

  • Monitoring LLM applications in production with full trace and span visibility, cost tracking, and latency analytics
  • Running automated evaluations and guardrails to catch quality regressions, hallucinations, and unsafe outputs before they reach users
  • Iterating on prompts and agent workflows in the optimization studio, with topic clustering and sentiment analysis over real traffic

Dependencies for LangWatch (AI Observability) Hosting

  • PostgreSQL — primary application data store (managed by Railway)
  • Redis — queue backend for the workers process (managed by Railway)
  • ClickHouse — analytics, trace indexing, and time-series storage
  • LangEvals service — powers evaluators and guardrails
  • LangWatch NLP service — powers the optimization studio, topic clustering, and sentiment analysis

Deployment Dependencies

Implementation Details

The app and workers share the same image (langwatch/langwatch:latest); the workers service overrides the start command to run the queue processor:

bash -lc "cd /app/langwatch && pnpm run start:workers"

Encryption and auth secrets are generated once on the app service and referenced by the workers so both share identical values (required — the workers decrypt credentials the app wrote):

# app
NEXTAUTH_SECRET="${{ secret(32) }}"
CREDENTIALS_SECRET="${{ secret(64, "0123456789abcdef") }}"
API_TOKEN_JWT_SECRET="${{ secret(32) }}"

# workers
CREDENTIALS_SECRET="${{app.CREDENTIALS_SECRET}}"

Services communicate over Railway's private network using RAILWAY_PRIVATE_DOMAIN references (e.g. http://${{nlp.RAILWAY_PRIVATE_DOMAIN}}:5561). The private network is IPv6-only, so ClickHouse must be configured to listen on ::.

Why Deploy LangWatch (AI Observability) 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 LangWatch (AI Observability) 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

More templates in this category

View Template
SigOnly
Deploy SigNoz with a working demo app & config in one click

zoeyjones
View Template
Unwrapped Spotify Music Stats
Unwrapped Spotify Music Stats, Estatísticas de músicas disponíveis

Jorge Henrique
View Template
OpenTelemetry Collector and Backend
OpenTelemetry Collector with Backend Stack

Melissa