Self-host Lago
v1.57.0Open-source usage-based billing and metering platform
docker run -d --name lago -p 80:80 -p 3000:3000 getlago/lago:latest- Stars
- 10 789
- Ports
- 3000 (API back-end (API_PORT, mapped as ${API_PORT:-3000}:3000)), 80 (Front-end application (FRONT_PORT, mapped as ${FRONT_PORT:-80}:80))
getlago/apiWhat is Lago?
Lago is an open-source billing and metering platform for teams that charge by consumption, such as AI token usage, compute, API calls, seats or custom events. Usage arrives through a REST API (single events or batches) and is de-duplicated by transaction ID, then aggregated into billable metrics and priced with flat recurring fees, prepaid units, percentages, graduated or volume tiers, packages, minimum commitments and hybrids of those. Credit wallets with automatic top-ups, allowances and entitlements sit between metering and billing; on the invoice side Lago handles subscriptions, credit notes, taxes, several currencies and more than one billing entity. Money is collected through external providers: Lago computes the charges, renders the invoice and then drives Stripe, Adyen, GoCardless or another processor with retries and dunning. The API-first core comes with a web UI, MRR and revenue analytics, signed webhooks and client libraries for Node.js, Python, Ruby and Go, plus Prometheus metrics for the running services. Operators deploy it with the one-click image, the Docker Compose stack in the repository, or the official Helm charts on Kubernetes; PostgreSQL and Redis are mandatory, while ClickHouse with a Kafka/Redpanda pipeline, object storage, Memcached and an SMTP server are optional. The AGPLv3 build is free to run yourself; Okta SSO, RBAC, a client portal and the AI assistants are part of Lago Premium, which is quoted per deployment.
Lago alternatives
lotusAn open-source, self-hosted pricing and billing engine for SaaS teams: build usage-based or per-seat plans, manage subscriptions, and test pricing experiments.Comparelotus with Lago
polarUsage-based billing, subscriptions and merchant-of-record platform for AI startups; open-source Apache-2.0 code behind a hosted dashboard.Comparepolar with Lago
openlegionSelf-hosted platform for isolated AI agent teams with credential vaulting, spend limits, and a web dashboard — free for internal use under a source-available license.Compareopenlegion with Lago
SolidInvoiceSelf-hosted open-source invoicing for freelancers with quotes, recurring billing, multi-currency, online payments, and REST API under MIT license.CompareSolidInvoice with Lago
Big-AGISelf-hosted, open-source AI workspace for experts: run 2 to 24 models in parallel with Beam, personas, image generation, voice and BYO API keys via Docker.CompareBig-AGI with Lago
MachinaOSSelf-hosted open-source AI organisation with six specialised employees owning business functions end-to-end. Token budget, bring your own model keys.CompareMachinaOS with Lago
heliconeHelicone is a self-hosted, open-source LLM observability platform and AI gateway for 100+ models with cost tracking, agent tracing, prompt management, and a playground.Comparehelicone with Lago
monoscopeOpen-source, self-hosted observability that keeps logs, metrics and traces in your own S3 buckets, with plain-English queries, scheduled AI agents and session replay.Comparemonoscope with Lago
All self-hosted alternatives to Chargebee → All self-hosted alternatives to Stripe Billing → All self-hosted alternatives to Zuora →
Should you self-host Lago?
Lago scores 72/100 on selfhost.directory (how scoring works) and ranks #1 of 13 in Billing. It has 10 789 GitHub stars, +128 in the last 30 days.
It shipped 20 stable releases in the past year. The latest, v1.57.0, came out on 5 November 2026. New versions land roughly every 2 weeks.
Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Go.
Its closest alternative on selfhost.directory is meteroid (55/100, 1 357 stars). Lago scores higher overall. See Lago vs meteroid side by side.
Features
- AI billing assistantsFinance Assistant is beta / early access; Billing Assistant is a Premium beta available on request.
- Customer billing portalOffered as a Lago Premium feature.
- Dedicated background workers
- Entitlements
- Flexible charge pricing models
- Payment provider orchestration
- PDF invoice generation
- Prepaid credits and wallets
- Prometheus Metrics
- REST API and SDKs
- Revenue and MRR analyticsThe pricing page lists the built-in analytics dashboard under Lago Premium.
- Role-based Access ControlListed among Lago Premium features.
- Subscriptions, invoices and credit notes
- Usage metering from events
- Webhooks
Lago README
Agentic-first monetization infrastructure for AI products
Meter tokens, compute, API calls, or any product usage.
Turn usage into pricing, credits, entitlements, invoices, payments, and revenue.
Use Lago Direct for your own product, or Lago Embedded to power monetization for your customers.
Talk to us about Lago Cloud
·
Build with your AI agent
·
Run the AI billing demo
·
Documentation
FAQ
Does Lago replace my payment processor?
No. Lago works out the charges, produces the invoice and applies tax, then hands collection to processors such as Stripe, Adyen or GoCardless.
How is Lago different from Stripe Billing, Chargebee, or Zuora?
Lago is open source, so teams can read the code, host it themselves and extend it, instead of depending on a closed vendor platform.
How much does Lago cost?
Self-hosting the open-source edition is free; Lago Premium is not publicly priced and is discussed per deployment when you book a demo.
Can teams run Lago on their own infrastructure?
Yes, the AGPLv3-licensed code can be self-hosted, or you can run the managed Lago Cloud service instead.
How do applications integrate with Lago?
Applications talk to Lago over its REST API and official JavaScript, Python, Ruby and Go SDKs, and receive signed webhooks; the public OpenAPI spec documents each path.
What is Lago?
Lago is an open-source billing platform covering usage-based, subscription, prepaid and hybrid pricing, connecting product usage and commercial terms to customer invoices.
More in Billing
lotusAn open-source, self-hosted pricing and billing engine for SaaS teams: build usage-based or per-seat plans, manage subscriptions, and test pricing experiments.
meteroidSelf-hosted, open-source billing and monetization platform: usage metering, subscriptions, quotes/CPQ, invoicing, entitlements and hybrid pricing, built in Rust.
OpenEMRSelf-hosted, open-source EHR and clinic management suite with scheduling, e-billing, prescriptions, FHIR APIs and a patient portal; runs on Docker or a LAMP stack.
openmeterOpenMeter is a self-hosted, open-source metering and billing platform for AI and API products that ingests usage events in real time.
paymenterOpen-source billing platform for hosting companies: automated subscriptions, Stripe/PayPal/Mollie gateways, hosting-panel integrations and a WHMCS importer.
pnlcsPNLCS is a free, open-source, self-hosted hosting billing platform and WHMCS alternative with invoicing, domains, SSL, tickets, Docker apps, and Proxmox VPS sales.
polarUsage-based billing, subscriptions and merchant-of-record platform for AI startups; open-source Apache-2.0 code behind a hosted dashboard.
SHKeeperSHKeeper is a self-hosted, open-source cryptocurrency payment processor and gateway for merchants, accepting 19+ coins with invoices, payouts and CMS modules.
SolidInvoiceSelf-hosted open-source invoicing for freelancers with quotes, recurring billing, multi-currency, online payments, and REST API under MIT license.
stack-authSelf-hosted open-source user platform for SaaS apps: auth with passkeys, teams and RBAC, API keys, payments, emails, webhooks, and product analytics with replays.
TimeTrackerOpen-source, self-hosted time tracking and invoicing app with timers, projects, expenses and Peppol e-invoicing — an alternative to Toggl, Clockify and Harvest.
UniBeeUniBee is a self-hosted, open-source billing platform for SaaS companies that manages subscriptions, invoices, usage-based charges, and payments via many gateways.

0 comments