Back to Lago

README

README.md

1.45.26.7 KB
Original Source
<!-- PROJECT LOGO --> <p align="center"> <a href="https://github.com/getlago/lago"> </a> <h1 align="center">Lago</h1> <p align="center"> The AI-native billing platform
Open-source metering, billing & revenue infrastructure for product-led companies.




<a href="https://doc.getlago.com">Docs</a>
·
<a href="https://getlago.com">Website</a>
·
<a href="https://www.getlago.com/slack">Slack</a>
·
<a href="https://github.com/getlago/lago/issues">Issues</a>
·
<a href="https://getlago.canny.io/">Roadmap</a>
</p> </p> <p align="center"> <a href="https://github.com/getlago/lago/stargazers"></a> <a href="https://github.com/getlago/lago/releases"></a> <a href="https://github.com/getlago/lago/blob/main/LICENSE"></a> <a href="https://www.getlago.com/slack"></a> <a href="https://www.ycombinator.com"></a> </p>

Trusted by

<p align="center"> <a href="https://www.getlago.com"></a> <a href="https://www.getlago.com"></a> <a href="https://www.getlago.com"></a> <a href="https://www.getlago.com"></a> <a href="https://www.getlago.com"></a> </p>

What is Lago?

Lago is the open-source billing platform for usage-based, subscription-based, and hybrid pricing models. If you can track it, you can bill for it.

  • Open-source — self-host for full control over your data, or use Lago Cloud to get started faster. Either way, the code is transparent
  • Payment-agnostic — works with Stripe, Adyen, GoCardless, or any payment gateway
  • API-first — every feature available via REST API
  • SOC 2 Type II certified

Features

FeatureDescription
Usage MeteringReal-time event ingestion and aggregation for any pricing dimension
Billing & InvoicingAutomated invoice generation for subscriptions, usage, and hybrid plans
EntitlementsFeature access management tied directly to your billing plans
Cash CollectionPayment orchestration with dunning, retries, and multi-gateway support
Revenue AnalyticsCross-stream visibility into MRR, usage trends, and revenue drivers
Lago EmbeddedWhite-label billing for platforms and marketplaces
Lago AIAI-powered billing intelligence and MCP server for AI agents
IntegrationsNetSuite, Xero, Salesforce, HubSpot, Avalara, AWS/Azure/GCP Marketplace, and more

Get Started

Cloud (fastest)

Start billing in minutes — no infrastructure to manage.

Sign up for Lago Cloud or email [email protected]

Self-hosted

Requirements

  • Docker & Docker Compose
  • Git

Quick start

bash
# Clone the repo
git clone --depth 1 https://github.com/getlago/lago.git
cd lago

# Generate RSA key
echo "LAGO_RSA_PRIVATE_KEY=\"$(openssl genrsa 2048 | openssl base64 -A)\"" >> .env
source .env

# Start Lago
docker compose up

Open http://localhost for the UI. The API is at http://localhost:3000.

After an update

bash
docker compose up

Configuration

If your server is not at localhost, set these in your .env:

LAGO_API_URL="http://your-server:3000"
LAGO_FRONT_URL="http://your-server"

For the full list of environment variables and advanced configuration (S3/GCS storage, SMTP, SSL, dedicated workers for high-volume), see the self-hosted docs.

Find your API key

  1. Open the Developer section in the sidebar
  2. Go to the API keys tab
  3. Click Copy

Documentation

SDKs & Client Libraries

LanguagePackage
Node.jslago-javascript-client
Pythonlago-python-client
Rubylago-ruby-client
Golago-go-client

Full OpenAPI spec: lago-openapi

Stay up to date

Contributing

We welcome contributions! See our contributing guide and the development environment setup.

Look for issues labeled beginner or help-wanted to get started.

License

Distributed under the AGPLv3 License. Why we chose AGPLv3.

Analytics & Tracking

Lago tracks basic actions on self-hosted instances by default. No customer PII or financial data is collected. Learn more or opt out.