Skip to content

Lago

Self-hosted usage-based billing engine for teams that meter product usage and invoice it

Copyleft (OSI) · AGPL-3.0 EU-based
  • Self-hosted

Listed by , founder & editor

82

Health

Thriving

Overview

Stars

10,917

Last commit

4 days ago

Nov 2026

Repository age

4 years

since Feb 2022

Latest version

v1.57.0

Nov 2026

Contributors

–

17 active in 90 days

Releases

25

last 12 months

Docker pulls

31k

getlago/lago

Language

Go

Lago is a billing system for usage-based, subscription and hybrid pricing, written in Go. You meter events such as tokens, compute or API calls, then turn that usage into pricing, credits, entitlements, invoices and payments. You can use it for your own product or embed it to power billing for your customers.

It is API-first, with a REST API, SDKs, a CLI and an MCP server. A local demo prices sample AI requests and checks the totals through the API. It needs Docker, curl and jq. You can self-host it, and Lago Cloud is available as a hosted service.

The license is AGPL-3.0. Lago does not process payments itself, so you connect a gateway such as Stripe. It replaces Chargebee for usage-based billing and covers part of Stripe Billing, but it has no hosted checkout or customer portal on par with theirs.

Who it's for

AI and API product companies billing by usage

You can meter tokens, compute or API calls and turn them into invoices.

Skip if: You need a hosted checkout and customer portal out of the box.

SaaS teams moving off Chargebee

You keep your own pricing logic and can self-host the billing system.

Skip if: You rely on built-in dunning and revenue recovery.

Platforms billing their own customers

The embedded mode lets you power monetization for your customers.

Skip if: AGPL-3.0 obligations conflict with your distribution model.

The problem it solves

Flat subscription tools struggle with pricing based on tokens, compute or API calls. Building a metering and invoicing system yourself takes time. Lago gives you a billing engine you can run yourself and drive through an API.

Strengths

  • Meters usage events and turns them into invoices and credits
  • REST API, SDKs, CLI and MCP server
  • Self-hostable with Docker
  • 25 releases in the past year
  • Local demo checks usage totals through the API

Trade-offs

  • No payment processing; you need a gateway such as Stripe
  • No hosted checkout or customer portal comparable to Stripe's
  • Less built-in dunning and revenue recovery
  • AGPL-3.0 license has network copyleft obligations

Lago replaces

Self-host Lago

Self-hostable
Yes
Docker image
getlago/lago
Docker Compose
The repository ships a Compose file
Hosted plan
Available · pricing

Quick start

./examples/agentic-ai-demo/run.sh

From the project's own install instructions. Check the docs for production settings.

In the community

Frequently asked questions

Is Lago free to self-host?

Yes. You can self-host it under AGPL-3.0. Lago Cloud is available as a hosted option.

Does Lago process payments?

No. You connect a payment gateway such as Stripe.

Can I try it locally?

Yes. A demo script starts Lago with Docker Compose and prices sample AI requests. It needs Docker, curl and jq.

How is it licensed?

AGPL-3.0.

What does it replace?

It is a direct replacement for Chargebee in usage-based billing and a partial one for Stripe Billing.

Similar tools in Accounting and invoicing software

Fava

Accounting and invoicing software

Web interface for Beancount plain-text double-entry accounting

2.6k 427 today Active MIT

Replaces QuickBooksQuicken

FOSSBilling

Accounting and invoicing software

Self-hosted billing and client management for web hosting and online service businesses

1.8k 373 today Active Apache-2.0

GnuCash

Accounting and invoicing software

Free double-entry desktop accounting for individuals and small businesses

4.4k 1k yesterday Active GPL-2.0+

Replaces QuickenQuickBooks

SolidInvoice

Accounting and invoicing software

Self-hosted invoicing and quotes for freelancers and small businesses

991 252 today Thriving MIT

Replaces QuickBooks

Bigcapital

Accounting and invoicing software

Self-hosted double-entry accounting with inventory for small businesses

4.2k 624 today Thriving AGPL-3.0

Replaces QuickBooks

Midday

Accounting and invoicing software

Invoicing, time tracking and receipt matching for freelancers and solo founders

15k 1.9k 5 months ago Dormant AGPL-3.0