---
title: How do I troubleshoot the self-hosted Langfuse Assistant?
description: Resolve common model, MCP, worker, and sandbox setup issues for the self-hosted Langfuse Assistant.
tags: [self-hosting]
---

# Troubleshoot the self-hosted Langfuse Assistant

Use these checks when the self-hosted Langfuse Assistant does not start or work as expected. For the complete configuration flow, see [Set up the self-hosted Langfuse Assistant](/self-hosting/configuration/langfuse-assistant).

## The Assistant is not visible

Confirm `LANGFUSE_IN_APP_AGENT_ENABLED=true` on both web and worker, then recreate both services. Enabling organization AI Features does not show the Assistant on its own.

## Runs stay queued or time out

Confirm at least one worker is running with `LANGFUSE_IN_APP_AGENT_ENABLED=true` and shares Redis with web. A worker without it does not consume the run queue.

## Runs fail during agent initialization

The worker could not connect to the MCP server. Confirm it can reach `/api/public/mcp` at `LANGFUSE_MCP_BASE_URL` when set, otherwise at `NEXTAUTH_URL`. Add a different internal hostname to `LANGFUSE_MCP_ALLOWED_HOSTS` on web. A `403` with `Invalid Host header` means the hostname is not allowed.

## The UI reports that the model is not configured

Set `LANGFUSE_AI_PROVIDER` and `LANGFUSE_AI_MODEL` on both services. Also set `LANGFUSE_AI_API_KEY` for `anthropic` or `openai`, then recreate both services.

## Bedrock returns access denied or model not found

Check the Region, model access, and invoke permissions in [Configure the model](/self-hosting/configuration/langfuse-assistant#configure-the-model). An AWS Marketplace subscription error means an administrator must activate the model for the account first.

## An OpenAI-compatible gateway returns 404

Include `/v1` in `LANGFUSE_AI_BASE_URL`. The endpoint must serve `POST {base}/chat/completions`, or `POST {base}/responses` when `LANGFUSE_AI_USE_RESPONSES_API=true`.

## Sandbox tools are missing

This is expected when `LANGFUSE_IN_APP_AGENT_SANDBOX_PROVIDER` is unset. Configure `lambda-microvm` and all required sandbox variables to add file and code-execution tools.

## File or code-execution tools fail

Confirm `lambda:PassNetworkConnector` covers `HTTP_INGRESS` and the egress connector. Also confirm that the MicroVM image matches the running Langfuse version.

## The image build fails

Confirm Lambda MicroVMs are available in the Region, the AWS CLI supports `lambda-microvms`, the build role can read the artifact, and the caller has `iam:PassRole` on the build role.

<!-- 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/faq/all/troubleshoot-self-hosted-langfuse-assistant.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>.
