Railway

Deploy Langfuse | Open Source LangSmith Alternative for LLM Observability

Self-hosted LLM tracing, prompt management and evaluations

Deploy Langfuse | Open Source LangSmith Alternative for LLM Observability

Just deployed

/bitnami

/var/lib/postgresql/data

Just deployed

Just deployed

/var/lib/clickhouse

Just deployed

/data

Just deployed

Deploy and Host Langfuse on Railway

Langfuse is open-source LLM engineering: tracing for every model call, prompt management with versioning, evaluations, and cost and latency analytics. Point any SDK at it and see what your AI application actually did, instead of guessing from application logs.

About Hosting Langfuse

Langfuse v3 is not a single container. It is a web application, a background worker, PostgreSQL for transactional data, ClickHouse for the trace and observation store, Redis for the queue between web and worker, and S3-compatible storage for event and media uploads. This template wires all six together with generated credentials, private networking between them, and persistent volumes on ClickHouse, Postgres, Redis and object storage — the layout Langfuse's own self-hosting guide describes, on infrastructure you don't have to assemble.

Only the web service gets a public domain. Postgres, ClickHouse, Redis and the object store stay on the private network, reachable by the application and by nothing else.

Common Use Cases

  • Debugging an LLM application in production: Follow a single user session through retrieval, tool calls and model responses, and see which step produced the answer you didn't expect.
  • Prompt management without redeploys: Version prompts centrally, roll them out and roll them back from the UI, with client-side caching so it costs no added latency.
  • Cost and quality tracking: Per-model, per-user and per-feature token spend next to evaluation scores, so a cheaper model's real cost in quality is visible before you switch.

Dependencies for Langfuse Hosting

Deployment Dependencies

  • Langfuse v3 — web and worker images
  • PostgreSQL 16 — users, projects, prompts, datasets
  • ClickHouse 24 — traces, observations and scores
  • Redis 7.2 — queue between web and worker
  • S3-compatible object storage for event and media uploads
  • A Langfuse SDK or OpenTelemetry exporter in your application

Implementation Details

The split between Postgres and ClickHouse is the point of v3. Transactional data — accounts, projects, prompt versions — stays in Postgres, while traces and observations, which arrive in volume and are queried analytically, go to ClickHouse. The worker consumes them from Redis so ingestion spikes do not slow the UI.

Every secret is generated per deployment: NEXTAUTH_SECRET, SALT, ENCRYPTION_KEY, the Postgres password and the object-store root credentials. ENCRYPTION_KEY is what protects stored API keys — losing it means losing access to them, so back it up before you rotate anything.

NEXTAUTH_URL is built from the public domain. It has to match the address you actually open, or sign-in redirects fail; if you attach a custom domain, update it.

The Redis connection string carries ?family=6 — Railway's private network is IPv6-only, and the client has to be told to resolve AAAA records or it silently fails to connect.

Volumes are attached to ClickHouse, Postgres, Redis and object storage. The one that grows is ClickHouse: it holds every trace. Retention is worth setting deliberately before the volume decides for you.

Why Deploy Langfuse 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 Langfuse 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.

Resources: six services is a real deployment, not a demo — budget around 2 GB of memory in total and on the order of $25–40 a month at low volume. ClickHouse and the trace volume are what drive it from there.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
113
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
1
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
56