Deploy Langfuse | Open Source LLM Observability (DataDog Alternative)
Self Host Langfuse on Railway. Traces, Evals & Prompt Management
New Group
Just deployed
/var/lib/postgresql/data
Clickhouse
Just deployed
/var/lib/clickhouse
Redis
Just deployed
/data
Minio
Just deployed
/data
Langfuse Worker
Just deployed
Langfuse Web
Just deployed
Deploy and Host Langfuse on Railway
๐ชข Langfuse is an open-source LLM engineering platform that gives teams full visibility into their AI applications โ traces, evals, prompt management, cost tracking, and dashboards, all in one place.
Self-host Langfuse on Railway with a one-click deploy and get the exact same platform that powers Langfuse Cloud, running entirely on your own infrastructure.

๐ Getting Started with Langfuse on Railway
After your Railway deploy is live, there are a few important first-time setup steps to follow in order:
Step 1 โ Sign up while registration is open ๐
Set, AUTH_DISABLE_SIGNUP to false, meaning anyone with your URL can self-register. Open your langfuse-web Railway domain in a browser and create your admin account now, before locking it down.
Step 2 โ Disable open signup ๐
Once your account is created, go to your langfuse-web service on Railway, set AUTH_DISABLE_SIGNUP="true", and redeploy. After this, no one can self-register โ your instance is private.
Step 3 โ Set up SMTP for email invites ๐ง
To invite teammates, Langfuse needs to send emails. Add these two variables to langfuse-web and langfuse-worker, then redeploy:
EMAIL_FROM_ADDRESS="no-reply@yourdomain.com"
SMTP_CONNECTION_URL="smtps://user:password@smtp.yourprovider.com:465"
Common providers: SendGrid (smtp.sendgrid.net:465), Resend (smtp.resend.com:465), Postmark (smtp.postmarkapp.com:465).
Step 4 โ Invite your team ๐ฅ Go to Settings โ Members โ Invite User inside your org. Enter a teammate's email โ they'll receive a link that creates an account scoped directly into your organization.
After setup, navigate to Settings โ API Keys to generate your LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY for instrumenting your application.
# Install the Python SDK and start tracing
pip install langfuse
export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."
export LANGFUSE_HOST="https://your-langfuse-web.up.railway.app"

About Hosting Langfuse ๐ง
Langfuse is purpose-built for LLM applications โ it understands token usage, model parameters, prompt/completion pairs, multi-turn conversations, and agentic workflows natively. Traditional APM tools tell you if your service is up; Langfuse tells you whether your model is actually performing well.
Key features:
- ๐ Tracing โ nested traces for every LLM call, retrieval step, tool call, and custom logic with full context
- ๐ Prompt Management โ version-controlled prompts with server + client-side caching and zero added latency
- ๐งช Evaluations โ LLM-as-a-Judge, user feedback collection, manual labeling, and custom eval pipelines
- ๐ Datasets โ test sets for pre-deployment benchmarks and continuous regression testing
- ๐ Playground โ jump directly from a bad trace to the prompt editor to iterate and fix
- ๐ 50+ integrations โ OpenAI SDK, LangChain, LlamaIndex, LiteLLM, OpenTelemetry, and more
- ๐ MIT licensed โ no usage caps, no telemetry when self-hosted, full data ownership
The v3 architecture queues all incoming trace events to S3 (MinIO) immediately on receipt, then the worker ingests them into ClickHouse asynchronously. This means traffic spikes never cause trace loss or UI slowdowns.
Why Deploy Langfuse on Railway โ
Railway handles the infrastructure so you can focus on your AI app:
- ๐ One-click deploy โ all 6 services pre-configured and private-networked
- ๐ Private networking between services โ ClickHouse, Redis, and MinIO never exposed publicly by default
- ๐ฆ Persistent volumes โ Postgres, ClickHouse, and MinIO data survives redeploys
- ๐ฐ No per-event cloud fees โ pay Railway infra costs only; no Langfuse usage billing on self-hosted
- ๐ One-command upgrades โ update the Docker image tag on web + worker and redeploy; migrations run automatically
Common Use Cases ๐ ๏ธ
- Debugging RAG pipelines โ trace every retrieval step alongside the LLM call to pinpoint where answers go wrong
- Prompt version rollouts โ A/B test prompt variants in production and score outputs before committing a new version
- Agent observability โ visualize multi-step agentic workflows as graphs; see exactly where decisions were made and why
- Cost monitoring โ track token usage and cost per user, project, or model across your entire team's production traffic
Dependencies for Langfuse ๐ฆ
- langfuse-web โ
docker.io/langfuse/langfuse:3(github.com/langfuse/langfuse) - Postgres โ Railway managed Postgres (v17)
- ClickHouse โ
clickhouse/clickhouse-server(OLAP analytics store) - Redis โ Railway managed Redis (v7)
- MinIO โ
minio/minio(S3-compatible blob storage)
โ๏ธ Environment Variables Reference
| Variable | Description | Required |
|---|---|---|
AUTH_DISABLE_SIGNUP | Set true to block open self-registration | Recommended |
CLICKHOUSE_CLUSTER_ENABLED | Must be false for single-node Railway deploys | โ |
Deployment Dependencies ๐
- Docker Hub: hub.docker.com/r/langfuse/langfuse
- Official docs: langfuse.com/self-hosting
- Config reference: langfuse.com/self-hosting/configuration
๐ต Is Langfuse Free to Self-Host?
Yes โ Langfuse is fully open-source under the MIT license and free to self-host with no usage limits. There are no caps on traces, events, users, or data retention when running your own instance. You pay only for Railway infrastructure (compute + storage).
Langfuse Cloud (the managed version) has a free Hobby tier (50k events/month, 2 users, 30-day retention), a Core plan at $29/month, and a Pro plan at $199/month.
๐ฅ๏ธ Minimum Hardware Requirements for Langfuse
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU | 4+ vCPU |
| RAM | 4 GB | 8โ16 GB |
| Storage (Postgres) | 10 GB | 20 GB+ |
| Storage (ClickHouse) | 20 GB | 50 GB+ (grows with trace volume) |
| Storage (MinIO) | 10 GB | 50 GB+ |
| Node.js (containers) | Bundled in image | Bundled in image |
ClickHouse is the most resource-intensive component โ it needs adequate RAM for analytics queries. For low-traffic instances (< 10k traces/day), 4 GB total RAM across the Railway project is workable. High-traffic production setups should scale ClickHouse to at least 4 GB RAM of its own.
๐ Self-Hosting Langfuse Outside Railway
Docker Compose (quickest local setup):
git clone https://github.com/langfuse/langfuse.git
cd langfuse
docker compose up
# UI available at http://localhost:3000
Kubernetes (recommended for production):
helm repo add langfuse https://langfuse.github.io/langfuse-k8s
helm repo update
helm install langfuse langfuse/langfuse \
--set langfuse.nextauth.secret="your-secret" \
--set langfuse.salt="your-salt" \
--set langfuse.encryptionKey="your-64-hex-key" \
--set postgresql.auth.password="your-pg-password"
๐ Langfuse vs LangSmith vs Helicone
| Feature | Langfuse | LangSmith | Helicone |
|---|---|---|---|
| Open source | โ MIT | โ Closed source | โ Open source |
| Self-hostable | โ Free | โ Enterprise only | โ Free |
| Framework agnostic | โ | โ ๏ธ LangChain-first | โ |
| Prompt management | โ Full | โ Full | โ ๏ธ Basic |
| LLM-as-a-Judge evals | โ | โ | โ |
| Datasets & experiments | โ | โ | โ |
| Proxy-based integration | โ SDK-based | โ SDK-based | โ URL-swap |
| Built-in caching | โ | โ | โ |
| Cloud free tier | 50k events/mo | 5k traces/mo | 100k req/mo |
Langfuse is the strongest choice when you need full data ownership, framework flexibility, and a complete prompt-to-eval workflow. LangSmith wins for pure LangChain stacks. Helicone is faster to set up if you only need cost tracking and a proxy layer.
โ FAQ
What is Langfuse? Langfuse is an open-source LLM engineering platform for tracing, prompt management, evaluations, and analytics. It helps teams understand what's happening inside their AI applications โ beyond just "the API returned 200" โ by capturing every prompt, completion, tool call, and retrieval step with full context.
Why does Langfuse need ClickHouse? ClickHouse is a columnar OLAP database designed for fast analytical queries on high-volume append-only data โ exactly what trace analytics requires. Langfuse v3 migrated from Postgres-only to a Postgres + ClickHouse architecture to support sub-second dashboard queries even with millions of traces. You can't remove it from the stack.
Why is MinIO included? Langfuse buffers all incoming trace events to object storage (MinIO) before the worker ingests them into ClickHouse. This decoupling means traffic spikes don't cause trace loss or timeouts. MinIO also stores media attachments (images, audio) that SDKs upload directly โ which is why it needs a public URL.
Does Langfuse support SSO? Yes โ Google, GitHub, Azure AD, Okta, Auth0, AWS Cognito, Keycloak, and JumpCloud are supported via environment variables. SSO enforcement (blocking username/password login) is an Enterprise Edition feature requiring a license key.
Can I migrate from LangSmith or Helicone to Langfuse? Langfuse provides Python scripts for migrating traces, prompts, and datasets between instances (including from Langfuse Cloud to self-hosted). Direct migration tooling from LangSmith or Helicone doesn't exist officially, but both platforms export data in formats that Langfuse's API can ingest with custom scripts.
Template Content
Langfuse Worker
langfuse/langfuse-worker:3Langfuse Web
langfuse/langfuse:3AUTH_DISABLE_SIGNUP
Left empty intentionally. Set to 'false' for first signup; it becomes admin, then set true to disable further registrations (see setup guide: https://railway.app/template/your-template)
Clickhouse
clickhouse/clickhouse-server:24Redis
redis:8.2.1Minio
minio/minio