---
title: Troubleshoot OpenLM AI Proxy
description: Fix common problems when you deploy OpenLM AI Proxy, connect it to OpenLM Platform, and route clients through it.
product: OpenLM Platform
---

Find your symptom in the following questions. For the deployment steps, see [Deploy AI Proxy](https://www.openlm.com/documentation/cloud/deployment-operations/ai-proxy/deployment).

## Why don't the containers start?

Check the status and logs, then restart the stack:

```bash
docker compose ps
docker compose logs <service>
docker compose down
docker compose up -d
```

Replace `<service>` with the container name, for example the API or UI service.

## Why does MongoDB not start?

If MongoDB exits on startup, its stored data is usually incompatible with the running MongoDB version. Recreate the data volume.

:::danger[This deletes stored data]

The following command removes the MongoDB volume. It erases usage records, provider settings, the OpenLM Platform connection and the stored API keys, and the stack appears as a new agent in Broker Hub. Back up the volume first if you need the data.

```bash
docker compose down -v
docker compose up -d
```

:::

## Why does the UI return a 500 error?

The UI returns a 500 error when the API container is not ready or is misconfigured. Wait a few seconds for the API to become healthy, then reload. If the error persists, check the UI container logs:

```bash
docker compose logs <ui-service>
```

## Why can't I reach the UI or API?

Confirm the host firewall allows the ports you mapped in `docker-compose.yml`, and confirm you are using those ports in the URL. Verify the containers are running with `docker compose ps`.

## Why does the API container stop right after it starts?

The API doesn't start without an `ENCRYPTION_KEY` setting. Check that the `aiproxyapi` service has one, and that the MongoDB and Redis passwords in the `aiproxyapi` service match the ones in the `mongodb` and `redis` services. Then read the API logs with `docker compose logs aiproxyapi`.

## Why does the connection to OpenLM Platform fail?

In **Receivers Configuration**, select **Check Connection** on the connection. If the status is **Failed**, check the following:

- **Location** is the base address of your OpenLM Platform, for example `https://example.com`.
- The host can reach OpenLM Platform on port 443.
- **Client ID** and **Client Secret** are filled in and correct, if your OpenLM Platform is secured. See [Connect to OpenLM Platform](https://www.openlm.com/documentation/cloud/deployment-operations/ai-proxy/configuration#connect-to-openlm-platform).

## Why is the agent missing in Broker Hub?

The agent appears after the connection is saved. Check that the connection status is **Ok**, then refresh the **AI Proxy** tab in [Broker Hub](https://www.openlm.com/documentation/cloud/data-collection/broker-hub/). If you removed the data volume, the stack appears as a new agent. Delete the old agent in Broker Hub.

## Why is there no data in AI FinOps?

AI Proxy sends usage to OpenLM Platform every 5 minutes, so data can't appear sooner than the next run after a request. Check these points in order:

1. The agent is in Broker Hub and the connection status is **Ok**.
2. The client sends its requests to AI Proxy and not to the provider. See [Configure AI Proxy](https://www.openlm.com/documentation/cloud/deployment-operations/ai-proxy/configuration).
3. The provider in **LLM Configuration** is enabled, and its mode matches how the client authenticates.

## Why does a client get an error from AI Proxy?

If a client is rejected, check its key first. In Managed mode, clients use an API key that AI Proxy issues under **Api Keys Configuration**, not the provider key. In Passthrough mode, clients send their own provider key. If the key is right, check the client endpoint against [Configure AI Proxy](https://www.openlm.com/documentation/cloud/deployment-operations/ai-proxy/configuration).

:::note[Next step]
If the problem remains, open a ticket from the [Customer Portal](https://customer.openlm.com) and include the output of `docker compose ps` and `docker compose logs`.
:::
