Railway

Deploy Langfuse (Self-Hosted LangSmith Alternative)

Self-hosted LLM observability & tracing — a LangSmith alternative

Deploy Langfuse (Self-Hosted LangSmith Alternative)

postgres

postgres:17

Just deployed

/var/lib/postgresql/data

redis

redis:7

Just deployed

/data

Just deployed

Just deployed

Just deployed

/var/lib/clickhouse

Deploy and Host Langfuse (Self-Hosted LangSmith Alternative) on Railway

[Updated Aug '26] Langfuse is an open-source LLM engineering platform for tracing, prompt management, evaluations, and analytics — a self-hosted alternative to LangSmith. This template deploys the full v3 stack (web app, async worker, Postgres, ClickHouse, Redis, and MinIO S3 storage) so traces, evals, and dashboards work out of the box, with every secret auto-generated and services wired over Railway’s private network.

About Hosting Langfuse (Self-Hosted LangSmith Alternative)

Hosting Langfuse means running six coordinated services: a Next.js web app, a background worker, Postgres for transactional data, ClickHouse for high-volume trace analytics, Redis for the queue, and an S3-compatible object store (MinIO) for event and media blobs. This template pins every image to a known-good tag, generates NEXTAUTH_SECRET, SALT, and a 64-character hex ENCRYPTION_KEY, points CLICKHOUSE_URL and CLICKHOUSE_MIGRATION_URL at the correct HTTP and native ports, and attaches a persistent volume to each stateful service. On first boot the web service runs database migrations and serves a sign-up page — create the first account to claim the instance. Note this is a genuine multi-service stack, so it uses more resources than a single-container template; that is what makes tracing, evals, and analytics reliable.

Common Use Cases

  • Tracing and debugging LLM and agent applications across models and providers
  • Prompt management, versioning, and collaborative prompt engineering
  • Running evaluations, scoring, and analytics dashboards on production traffic

Dependencies for Langfuse (Self-Hosted LangSmith Alternative) Hosting

  • PostgreSQL 17, ClickHouse 25.12, Redis 7, and MinIO object storage (all included and pre-wired)
  • A Langfuse public/secret API key pair, created inside the app after your first login

Implementation Details

The web and worker services share the same DATABASE_URL, ClickHouse, Redis, and S3 configuration. SALT and ENCRYPTION_KEY are generated on the web service and referenced by the worker so they always match. MinIO creates the langfuse bucket on startup, and CLICKHOUSE_CLUSTER_ENABLED is set to false for single-node operation.

Why Deploy Langfuse (Self-Hosted LangSmith Alternative) 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.


Template Content

More templates in this category

View Template
Pyroscope profiling
Protected continuous profiling with durable Pyroscope storage.

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

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

Jorge Henrique
1