Skip to content

Packs / billing-and-subscriptions-public

self-host-lago-billing

Self-host Lago usage-based billing from the upstream compose, pinned to a release and bound to localhost (AGPL-3.0, flagged)

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-billing-and-subscriptions-public

Install

logicpacks pack use billing-and-subscriptions-public/self-host-lago-billing
get_pack billing-and-subscriptions-public/self-host-lago-billing

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: lago-dockerkillbill
  • Checks: 2 in outcome/checks.yaml
  • Code: install.sh
  • Tools: bash, docker, git

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Self-host Lago usage-based billing from the upstream compose, pinned to a release and bound to localhost (AGPL-3.0, flagged)

Goal

A working Lago where we create a billable metric and a plan, send usage events and see a draft invoice.

Steps

  1. bash code/install.sh clones getlago/lago at the pinned tag and starts its docker-compose.
  2. UI on 127.0.0.1:80: create a billable metric, a plan with graduated charges, a customer, a subscription.
  3. POST /api/v1/events with usage; check the draft invoice; export.

Edge cases

  • Lago generates its own secrets on first run (see upstream README).
  • AGPL: changes served to others must be published.

Don'ts

  • Don't track main.
  • Don't expose Postgres/Redis.