docker compose up command brings up LibreChat, the ClickHouse MCP server, ClickHouse, and Langfuse for observability.
Prerequisites
- Docker with the Compose plugin (Compose v2 or later).
- Git, to clone the repository.
- A model provider API key (such as OpenAI, Anthropic, or Google). The agent needs a model to answer questions, so supply a key during setup or add one in the LibreChat UI before your first chat.
Stand up the stack
Clone the repository
docker-compose.yml, so the whole stack comes up with a single command. See Architecture for the full list of services.Run the demo setup script
.env file with credentials for every service, then offers an interactive menu to configure API keys for a chosen provider. You can also set these keys directly in the .env file. Any provider you skip stays set to user_provided, so you can add your own key in the LibreChat UI instead.On first startup, the stack creates an admin user from .env. The default login is admin@admin.com / password.Set your own login credentials
Set your own login credentials
Run
generate-env.sh with these variables before prepare-demo.sh:prepare-demo.sh then sees the existing .env and goes straight to API-key configuration.Start the services in the background
Open LibreChat and sign in
Once the stack is up, the services are available in your browser:
- LibreChat (chat UI) — http://localhost:3080
- Langfuse (observability) — http://localhost:3000
- Admin Panel (browser-based LibreChat configuration) — http://localhost:3081
- MinIO console (object storage; credentials in
.env) — http://localhost:9091
.env file.Select a model
A model is selected by default. If you want to change it, open the model selector and choose the one you want to use.If you didn’t set a provider key during setup, add one in the UI.
Set a provider key in the UI
Set a provider key in the UI
Open the model selector and click Set API Key next to the provider.Paste your key in the dialog and click Submit. You can set an expiration, or keep the key from expiring.
Select the MCP server
The stack preconfigures its MCP servers in LibreChat’s
librechat.yaml. In the message composer, click MCP Servers and select ClickHouse-Local.Select ClickHouse-Cloud instead to use a ClickHouse Cloud service.Stop or reset the stack
Stop the services without deleting anything:Architecture
docker-compose.yml is a thin entrypoint that includes four Compose files:
| Compose file | Defines |
|---|---|
langfuse-compose.yml | Langfuse and its backing services (ClickHouse, PostgreSQL, Redis, MinIO) |
clickhouse-mcp-compose.yml | The ClickHouse MCP server |
librechat-compose.yml | LibreChat and its backing services (MongoDB, Meilisearch, pgvector, RAG API) |
admin-panel-compose.yml | The LibreChat Admin Panel |
- Health checks and start order. Compose uses health checks to sequence startup. The MCP server waits for ClickHouse, and LibreChat waits for the MCP server.
- Shared environment file. The
.envholds each service’s credentials and connection values, set consistently so the services can reach each other. For example, the MCP server connects to ClickHouse with the ClickHouse credentials from.env. LibreChat is givenLANGFUSE_PUBLIC_KEY,LANGFUSE_SECRET_KEY, andLANGFUSE_BASE_URL, so every run is traced to Langfuse out of the box.
Next steps
- Learn what each piece does in the stack: ClickHouse MCP server, LibreChat, and Langfuse.
- See the overview for how the stack fits together.
- To try the stack against public datasets without installing anything, use AgentHouse, the hosted demo.