Deploy Opik

Open-source LLM tracing, evals and monitoring: full 8-service stack

Deploy Opik

Just deployed

/data

Just deployed

/var/lib/mysql

Just deployed

/data

Just deployed

/var/lib/clickhouse

Just deployed

/data

Just deployed

Deploy and Host Opik on Railway

Deploy on Railway

Opik is Comet's open-source platform (Apache-2.0) for debugging, evaluating and monitoring LLM applications, RAG systems and agents. It records traces and spans from your code, scores them with LLM-as-a-judge and heuristic metrics, runs experiments on datasets, and offers a prompt playground, prompt library and production dashboards.

About Hosting Opik

Opik's self-hosted stack has eight services. This template runs all of them on Railway, wired together over the private network. The web UI (nginx) is the only public service, and it sits behind a login whose password is generated at deploy time. The Java backend runs the MySQL and ClickHouse schema migrations on every start, then serves the API. A Python backend runs evaluation metrics and the optimizer worker. ClickHouse stores traces and spans, with ZooKeeper coordinating it. MySQL holds projects, datasets and prompts, Redis queues jobs, and MinIO keeps attachments. Every stateful service has its own volume. The first deploy takes about 5–10 minutes.

Common Use Cases

  • Trace LLM calls, RAG pipelines and agents (OpenAI, Anthropic, LangChain, LlamaIndex, CrewAI and more) and inspect each step
  • Evaluate prompts and models against datasets with built-in and custom metrics, and compare experiments
  • Monitor production LLM traffic with online evaluation rules, feedback scores and cost/latency dashboards

Dependencies for Opik Hosting

  • MySQL 8.4 and Redis 7.4 (official images, pinned by digest)
  • ClickHouse 26.3, ZooKeeper 3.9 and MinIO, built from this repository's folders

Deployment Dependencies

Implementation Details

ServiceWhat it doesStorage
Opik (public)Web UI and reverse proxy for /api, behind a loginnone
Opik BackendREST API, migrations, background jobsnone
Opik Python BackendPython metrics and the optimizer worker (process executor)none
ClickHouseTraces, spans, feedback scoresvolume
ZooKeeperCoordination for ClickHouse's replicated tablesvolume
MySQLProjects, datasets, prompts, settingsvolume
RedisJob queues, rate limits, cachesvolume
MinIOAttachments (images, files)volume

After deploy: open the Opik service's URL and sign in as opik with the password in that service's OPIK_AUTH_PASSWORD variable. To log traces from the Python SDK, point it at your deployment and send the same password as the API key:

import opik
opik.configure(url="https://YOUR-DOMAIN/api", api_key="OPIK_AUTH_PASSWORD value", workspace="default", use_local=False)

or set OPIK_URL_OVERRIDE=https://YOUR-DOMAIN/api and OPIK_API_KEY= that password in your app's environment. To use the playground or LLM-as-a-judge metrics, add your model provider key under Configuration → AI Providers in the UI.

Updates: every service builds from the public repository aalfath/opik-railway-template, which pins each image by version and digest. When a new Opik release is tested there, Railway shows an "update available" notice on your project. Read CHANGELOG.md first: the backend migrates the databases on start.

Left out on purpose: the guardrails backend (a GPU model server, optional), the OpenTelemetry collector and Jaeger (optional tracing of Opik itself), and the Docker-in-Docker code sandbox (needs privileged containers; Python metrics run in the process executor instead).

Why Deploy Opik 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 Opik 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
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1