---
title: Topics (self-hosted)
sidebarTitle: Topics
description: Configure the Topics infrastructure on a self-hosted Langfuse deployment.
label: "Version: v4"
---

# Topics

Topics runs on your existing Langfuse web and worker services, using Postgres, ClickHouse, Redis, and blob storage. Clustering runs inside the worker and the official worker image includes the required native module.

This page covers infrastructure configuration. For project setup and usage, see the [Topics guide](/docs/observability/features/topics).

## Configure the dispatch worker [#enable-topics]

Topics is enabled by default. To process traces, set `QUEUE_CONSUMER_EVENTS_DISPATCH_QUEUE_IS_ENABLED=true` on one worker service and redeploy it. If you run a single worker service, use that service.

Event dispatch defaults to `true`. If you set `LANGFUSE_EVENTS_DISPATCH_ENABLED=false` on the dispatch worker or any OpenTelemetry ingestion worker, remove the override and redeploy the affected services. In each project, map filters and sampling determine which recorded traces Topics analyzes.

## Configure model access [#model-access]

Create project or inherited organization [LLM connections](/docs/administration/llm-connection), then follow the [Topics setup steps](/docs/observability/features/topics#get-started) to select your models.

Both **web and worker** need access to the configured provider endpoints. Web validates the model configuration, and the worker processes traces and names topics. Use the deployment's existing [`ENCRYPTION_KEY`](/self-hosting/configuration/encryption#application-level-encryption) on both services so they can read the stored credentials.

If you use a private model endpoint or gateway, [allow outbound requests to that endpoint](/self-hosting/configuration/hardening#outbound-url-allowlists) from both services.

### Embedding compatibility

Choose a dimension count supported by your embedding model. Langfuse accepts **64–2,048 dimensions**, with **1,024** as the default. The model must return the configured number of dimensions.

## Configure storage retention [#storage-retention]

Live maps stage temporary transcripts under `events-dispatch/trace-transcript/` in the event-upload bucket. If your deployment sets `LANGFUSE_S3_EVENT_UPLOAD_PREFIX`, prepend its existing value to that path.

Configure a [blob storage lifecycle policy](/self-hosting/deployment/infrastructure/blobstorage) to expire objects at that path after three days, or set `LANGFUSE_EVENTS_DISPATCH_TRANSCRIPT_CLEANER_ENABLED=true` on the worker. The cleaner is disabled by default and needs permission to list and delete those objects.

For versioned storage or soft delete, configure lifecycle expiry for retained versions too.

  These temporary objects contain trace content. Trace and project deletion do
  not remove them; cleanup depends on the configured cleaner or lifecycle policy.

## Start processing

To verify live processing, create a live map filtered to a test workflow with 100% sampling. Send a matching trace with a recorded model conversation and check that its summary appears after the readiness delay and processing.

## Tune worker load [#worker-load]

The worker runs up to 20 per-trace jobs concurrently per queue shard by default. Set `LANGFUSE_TOPICS_TRACE_QUEUE_PROCESSING_CONCURRENCY` only if you need to tune this, for example to stay within provider rate limits.

Clustering consumes worker CPU and memory too. Allow headroom alongside ingestion and evaluation jobs; see [sizing and scaling](/self-hosting/configuration/scaling) for worker deployment options.

---

If you experience any issues when self-hosting Langfuse, please:

1. Check out [Troubleshooting & FAQ](/self-hosting/troubleshooting-and-faq) page.
2. Use [Ask AI](/docs/ask-ai) to get instant answers to your questions.
3. Ask the maintainers on [GitHub Discussions](/gh-support).
4. Create a bug report or feature request on [GitHub](/issues).

  Enterprise-grade support is available when self-hosting Langfuse. Learn more on
  our [pricing page](/pricing-self-host).

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/self-hosting/configuration/topics.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx @langfuse/cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
