Open source · MIT · Docker

Self-hosted LLM observability with one Docker command

Spanlens is an open source LLM observability and monitoring platform you can run entirely on your own infrastructure. Request logging, cost tracking, agent tracing, and evals for OpenAI, Anthropic, and Gemini. Your prompts, completions, and provider keys never leave your network.

Up and running in minutes

Pre-built images are published to GHCR for amd64 and arm64. The bundled docker-compose starts the dashboard, the proxy and API server, and ClickHouse together. Bring a free Supabase project for auth and relational data.

curl -o docker-compose.yml \
  https://raw.githubusercontent.com/spanlens/Spanlens/main/docker-compose.yml

docker compose up -d
# Dashboard on :3000, proxy + API on :3001

Full walkthrough with env vars, schema setup, and backups in the self-hosting docs.

Everything in the cloud version, on your infra

Request logging

Every OpenAI, Anthropic, and Gemini call captured with model, tokens, cost, latency, and full body.

Cost tracking

Per-request breakdowns, daily rollups, budget alerts, and model-swap savings suggestions.

Agent tracing

Multi-step workflows rendered as waterfall span trees with the critical path highlighted.

Anomaly detection

Spend spikes, latency regressions, and error bursts surfaced automatically.

PII and injection scanning

Request bodies scanned at log time. API keys are masked before storage.

Evals and Prompt A/B

LLM-as-judge scoring and statistical prompt experiments with Welch t-test built in.

Why teams self-host Spanlens

Frequently asked questions

Is self-hosting Spanlens free?

Yes. The entire repository is MIT licensed, including the dashboard, the proxy, evals, and security scanning. There is no enterprise edition folder, no feature gate, and no license key. Self-hosting is free forever.

What infrastructure do I need to self-host?

A Supabase project (the free tier works), a ClickHouse instance (the bundled docker-compose ships one), and anywhere that can run Docker. The full stack starts with one docker compose up command.

Does my LLM data leave my network when self-hosting?

No. The proxy, the request logs, the traces, and your encrypted provider keys all stay on your own infrastructure. Spanlens never sees your prompts or completions.

How do I upgrade a self-hosted deployment?

Run docker compose pull and docker compose up -d. Images are published to GHCR with semver tags for both amd64 and arm64, and schema migrations are idempotent so re-running them is safe.

Can I use the hosted dashboard with a self-hosted backend?

Yes. You can run only the API server on your infrastructure and point the hosted dashboard at it, or run the full stack including the web dashboard yourself.

Not ready to run your own infra? The hosted version is free for 50K requests a month, and you can migrate to self-hosted later without changing your SDK code.

MIT licensed · Docker one-liner · No feature gates