Self-hosted app·Finance, billing and payments
Lago hosting on a Swiss VPS.
Lago hosting on a Swiss VPS in ALP1: Docker Compose setup for v1.56.0, sizing, ports, backups and costs. Pay in crypto, no KYC.
- Ruby on Rails
- PostgreSQL
- Redis
- ClickHouse
ALP1·Swiss Alps
In stockRecommended for this use case
- 1 Gbps port10 TB of transfer a monthIncluded
- Debian 13preinstalled with the orderIncluded
- DDoS protection, 1 IPv4VNC console and full rootIncluded
Optional: daily backups +20% · extra IPv4 $2 · priority support $10
Pay yearly: $62.99 a year, about 25% less
- No KYC
- Crypto only
- Swiss jurisdiction
ALP1 · Swiss Alps · Our own hardware, under Swiss law, paid in crypto
- 2 vCPU, 2 GB RAM
- 80 GB NVMe local storage
- 10 TB transfer on a 1 Gbps port
- DDoS protection included
- Swiss jurisdiction, outside the EU
01/05
What Lago is and who runs it.
Lago is an open-source metering and usage-based billing system. Your application sends usage events to its REST API; Lago aggregates them against billable metrics and plans, issues invoices and credit notes, manages wallets, coupons and credits, and hands collection to a payment provider such as Stripe, Adyen or GoCardless. It is built by the company of the same name (backed by Y Combinator). The open-source edition is AGPL-3.0 and free; a premium edition under a commercial licence adds features and support, and Lago also sells a hosted cloud. The current release is v1.56.0, which the main repository adopted on 2 November 2026.
The people who self-host it are SaaS and API companies whose pricing has outgrown flat subscriptions, AI products billing per token, and teams that want the system of record for revenue in their own Postgres rather than in a vendor's. Lago's documentation is candid that a self-hosted team operates the application, its databases, upgrades and monitoring. If you bill twenty customers a fixed monthly fee, a hosted tool is less work than this page.

02/05
Requirements and sizing.
The Compose stack is seven long-running containers: front (nginx serving the React app), api (Rails), api-worker (Sidekiq), api-clock (the scheduler), db (PostgreSQL 15 with the pg_partman extension), redis (Redis 7) and pdf (Gotenberg, a Chromium-based renderer for invoices). A short-lived migrate container applies database migrations at each start. Three of those processes boot the same Rails application, and Gotenberg is the one that spikes when a billing run produces PDFs in bulk. Lago does not publish a hardware minimum; its compatibility matrix fixes software only: PostgreSQL 15 or later with pg_partman, Redis 7.x or Valkey 7.2+.
The table below is our judgement, not a benchmark.
| Plan | vCPU / RAM / NVMe | Included transfer | Price/month | Where it fits |
|---|---|---|---|---|
| VPS Starter | 2 / 2 GB / 80 GB | 10 TB | $6.99 | Trial, staging, low-volume production with a swap file |
| VPS Standard | 4 / 4 GB / 160 GB | 15 TB | $12.99 | Production with regular PDF runs or a dedicated events worker |
| VPS Power | 12 / 16 GB / 640 GB | 40 TB | $42.99 | Starting point if you add ClickHouse and Redpanda for high event volume |
On Starter, give the kernel somewhere to put a burst instead of killing a container: fallocate -l 2G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile, plus the matching line in /etc/fstab.
The default event store is Postgres, which Lago says it has validated up to about 10,000 events per second. That figure is Lago's, on Lago's hardware; a 2-vCPU VPS will run out of CPU long before it. Beyond that, Lago's high-volume path is a ClickHouse event store fed through Kafka or Redpanda, a different deployment altogether. Lago's own guidance is also to bring your own Postgres and Redis in production, because the bundled services are meant for trials. Our view is more relaxed for small instances: bundled Postgres with nightly dumps shipped off the box is an acceptable risk while volumes are low. Once the invoices are money you cannot easily re-issue, move Postgres to a second VPS or a dedicated server.
Inbound, the finished setup needs 22, 80 and 443 and nothing else. Outbound, it needs HTTPS to your payment provider and webhook targets, and SMTP to your mail relay.
Our servers are in Switzerland and answer to Swiss law. We act only on orders from competent Swiss authorities, and a request from abroad has to pass through one of them first.
03/05
How to deploy Lago with Docker on our VPS.
Order Starter with Debian 13 from the deploy link and point two DNS names at its IPv4, for example billing.example.com for the app and billing-api.example.com for the API.
- 01
Install Docker and check out a tagged release
apt-get update && apt-get install -y ca-certificates curl git openssl install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc echo "deb [signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" \ > /etc/apt/sources.list.d/docker.list apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin git clone https://github.com/getlago/lago.git /opt/lago cd /opt/lago && git checkout v1.56.0Pin the tag. Lago's documentation warns against the
latestimage tag, and its upgrades come with migration guides that have to be applied in order. The one-commanddocker run getlago/lago:latestimage is for a quick look on a laptop, not for a server that issues invoices. - 02
Replace every placeholder secret
cat > .env <<EOF LAGO_RSA_PRIVATE_KEY="$(openssl genrsa 2048 | openssl base64 -A)" SECRET_KEY_BASE=$(openssl rand -hex 64) POSTGRES_PASSWORD=$(openssl rand -hex 24) LAGO_ENCRYPTION_PRIMARY_KEY=$(openssl rand -hex 16) LAGO_ENCRYPTION_DETERMINISTIC_KEY=$(openssl rand -hex 16) LAGO_ENCRYPTION_KEY_DERIVATION_SALT=$(openssl rand -hex 16) LAGO_API_URL=https://billing-api.example.com LAGO_FRONT_URL=https://billing.example.com LAGO_DISABLE_SEGMENT=true EOF chmod 600 .envWithout this file the stack starts with literal defaults such as
changemeandyour-encryption-primary-key. The three encryption values protect the sensitive fields Lago encrypts in its database; lose them and those fields cannot be read back, so.envbelongs in your backups next to the database dump.LAGO_FRONT_URLmust be the exact URL your staff open, because since v1.56.0 the API refuses WebSocket connections from any other origin.LAGO_DISABLE_SEGMENT=trueswitches off the telemetry a self-hosted instance sends by default: activation events, and the organisation name and email entered at signup. - 03
Keep Postgres and Redis off the internet
Docker writes its own NAT rules for published ports, and Docker's documentation states that this traffic is diverted before ufw's rules apply. The compose files we reviewed (v1.51.0 and v1.52.1) publish 5432 and 6379 on all interfaces, with no Redis password. Rather than edit the tracked file and fight it at every upgrade, add an override that Compose loads on its own:
# /opt/lago/docker-compose.override.yml services: db: ports: !reset [] redis: ports: !reset [] api: ports: !override - "127.0.0.1:3000:3000" front: ports: !override - "127.0.0.1:8080:8080"The
!resetand!overridetags need a recent Compose v2; the plugin from Docker's repository is new enough. The front container listens on 8080 since v1.56.0, which is why the mapping above is not 80. Rundocker compose up -d, wait formigrateto exit with code 0, then check withss -tlnpthat nothing apart from sshd listens on a public address. - 04
Put TLS in front and close signup behind you
apt-get install -y caddy cat > /etc/caddy/Caddyfile <<'EOF' billing.example.com { reverse_proxy 127.0.0.1:8080 } billing-api.example.com { reverse_proxy 127.0.0.1:3000 } EOF systemctl reload caddyCaddy obtains and renews Let's Encrypt certificates itself, which spares you the certbot scripts in Lago's
extra/folder and the v1.56.0 caveats about mounting your own nginx configuration into a non-root container. A proxy on the same host reaches Lago from a private or loopback address, which Lago trusts forX-Forwarded-Forby default;LAGO_TRUSTED_PROXIESonly matters if you later put a public CDN in front. Open 22, 80 and 443 in nftables or ufw, which now protects what it appears to protect.Then open
https://billing.example.com, create your organisation and lock the door: addLAGO_DISABLE_SIGNUP=trueto.envand rundocker compose up -dagain. Until you do, anyone who guesses the hostname can create an organisation on your instance. - 05
Storage, email, backups and upgrades
Invoice PDFs land in a local Docker volume unless you say otherwise. Lago supports S3-compatible endpoints, so our S3-compatible object storage works: set
LAGO_USE_AWS_S3=true,LAGO_AWS_S3_ENDPOINT, the bucket name and the access keys we issue with the bucket, andLAGO_AWS_S3_REGION=us-east-1, which Lago requires even though an S3-compatible endpoint ignores it. Lago talks to the bucket through the S3 API; there is nothing to format or mount.For email, set
LAGO_SMTP_ADDRESS, port 587 and the credentials of a relay you trust, and leave Lago's defaults of authenticated login and STARTTLS alone. Outbound port 25 is open on every VPS if you want to run your own MTA, but a fresh IP delivering invoices to corporate inboxes is a project of its own. Lago also sends nothing until an organisation email is set under Settings.The backup set is the Postgres dump,
.env, and thelago_storage_datavolume if PDFs stay local; Redis holds the job queue and cache, not records. A nightlydocker compose exec -T db pg_dump -U lago -Fc lago > /var/backups/lago-$(date +%F).dump, shipped with restic to a bucket, covers it. Restore it once on a scratch VPS before you need it. Our daily VPS backups are a useful second layer, not a substitute for a logical dump.For upgrades, read Lago's migration notes before changing the tag. v1.56.0 expects the v1.54.0 migration to be done first, moved the front container to port 8080 and switched the PDF service to
ghcr.io/getlago/lago-gotenberg:8.39. The routine is dump,git fetch --tags && git checkout <tag>, check the override still matches the ports,docker compose pull && docker compose up -d.
04/05
What Lago hosting costs.
The open-source edition is free. The infrastructure, from our catalogue:
| Item | Monthly |
|---|---|
| VPS Starter (2 vCPU, 2 GB, 80 GB NVMe, 10 TB transfer) | $6.99 |
| VPS Standard (4 vCPU, 4 GB, 160 GB NVMe, 15 TB transfer) | $12.99 |
| Daily VPS backups | +20 % of the plan |
| Object storage, 250 GB | $1.99 |
| Extra IPv4 | $2.00 |
Starter with daily backups and a 250 GB bucket comes to about $10.38 a month (theoretical: 6.99 × 1.2 + 1.99), and yearly billing is about 25 % lower. VPS traffic is not unmetered: each plan includes the monthly transfer shown. A billing system uses little of it; a million 200 KB invoice PDFs would be about 200 GB, theoretically, against Starter's 10 TB.
We take crypto only (Monero, Bitcoin, Tether, Ethereum, Litecoin and other coins), with prices and balances in US dollars. Top-ups run from $25 to $5,000, with a bonus of 5 % from $50 up to 20 % from $500, and the unused paid part of a top-up is refundable within 14 days. Ordering is no-KYC: an email address is enough, and we accept business customers paying in crypto. The full grid is on pricing.
05/05
Jurisdiction, data and acceptable use.
A Lago database is a register of your customers: names, addresses, tax numbers, usage and invoices. You decide what goes into it and why, so under the revised Swiss FADP, in force since 1 September 2023, the obligations that follow from those decisions sit with you. The European Commission's review of 15 January 2024 confirmed that Switzerland still ensures an adequate level of protection, so billing data about EU customers can come to ALP1 without additional safeguards.
The server's location is only half of the picture. Lago calls out to whatever you connect: payment providers, accounting and CRM integrations, Lago's OAuth proxy at proxy.getlago.com for integrations that use it, and Segment unless you disabled it. Since 15 September 2024 Switzerland treats US companies certified under the Swiss-U.S. Data Privacy Framework as adequate, so check each US provider you plug in. As of 31 October 2026 the US Department of Justice lists CLOUD Act executive agreements only with the United Kingdom and Australia, none with Switzerland. That removes a shortcut for foreign requests to us as a Swiss host; it does nothing for the copy of your invoices held by a US payment processor. The wider picture is on our Swiss jurisdiction page.
What we do not accept on these servers: billing for fraud, such as fake invoices or payment pages that impersonate another business; collecting for goods or services that are unlawful in Switzerland; and using the instance's mail path for bulk unsolicited email. If what you bill is a crypto-asset service, Swiss sanctions in force since 26 February 2026 prohibit providing it to Russian nationals, people residing in Russia and entities established there, subject to the exceptions in the ordinance; screening your customers is your job. Invoice content, VAT and retention rules are yours too, as is the security of the instance: patches, secrets and the ports above. A DMCA notice has no direct legal effect in Switzerland. We forward complete complaints to the customer, who must remove the content or justify it, and we act on a decision of a competent Swiss authority, or where content is manifestly unlawful (Swico Code of Conduct Hosting 2025).
Catalogue·Options
Every configuration, every option, every price.
Six cloud VPS plans on AMD EPYC with local NVMe. Transfer is included on every plan, from 10 TB to 100 TB a month.
| Plan | vCPU | Memory | NVMe | Transfer | Port | Price | Deploy |
|---|---|---|---|---|---|---|---|
| StarterRecommendedStaging, dev | 2 | 2 GB | 80 GB | 10 TB / month | 1 Gbps | $6.99/mo | Deploy Starter |
| StandardSmall apps | 4 | 4 GB | 160 GB | 15 TB / month | 1 Gbps | $12.99/mo | Deploy Standard |
| ProProduction | 6 | 8 GB | 320 GB | 20 TB / month | 1 Gbps | $22.99/mo | Deploy Pro |
| PowerHeavy workloads | 12 | 16 GB | 640 GB | 40 TB / month | 2 Gbps | $42.99/mo | Deploy Power |
| UltraDatabases | 16 | 32 GB | 1000 GB | 60 TB / month | 2 Gbps | $65.99/mo | Deploy Ultra |
| SummitDense hosts | 32 | 64 GB | 2000 GB | 100 TB / month | 5 Gbps | $119.99/mo | Deploy Summit |
Every plan runs on AMD EPYC with local NVMe. Yearly billing costs about 25% less.
Every plan
- AMD EPYCon every host
- Local NVMenot network storage
- DDoS protectionalways on
- 1 IPv4 addressmore at $2 each
- VNC consoleand full root access
FAQ
Questions people ask first.
Short answers about running this in ALP1. If yours is not here, open a ticket from your panel.
Is 2 GB of RAM enough for Lago?
For a trial, staging, or a small production instance with a swap file, we expect it to be, but we have not published a measurement yet. The pressure point is the billing run, when the worker and Gotenberg are busy at the same time. If that run pushes the VPS into swap, move to VPS Standard with 4 GB at $12.99 a month.
Can I use the one-command docker run getlago/lago:latest image?
It works for a look around, and Lago documents it. For anything that issues real invoices, use the Compose stack on a pinned tag: Lago warns against latest, and upgrades need its migration guides applied in order, which a moving tag hides from you.
Do I need ClickHouse and Redpanda?
Not to start. Postgres is the default event store, and Lago reports validating it up to about 10,000 events per second on its own hardware. ClickHouse also powers activity, API and security logs, so you may want it for those features; it requires the Kafka or Redpanda pipeline and is sized well beyond VPS Starter.
Does a self-hosted Lago send data to anyone by default?
Yes. It sends activation events and the organisation name and email from signup to Lago via Segment, which LAGO_DISABLE_SEGMENT=true turns off. Integrations you enable, such as a payment provider, receive the data they need to work.
What does the AGPL-3.0 licence mean for me?
Running unmodified Lago for your own billing raises no special issue. If you modify the code and let other people interact with your modified version over a network, for instance through a customer portal, the AGPL requires you to offer them the source of your changes. Read the licence itself for the exact terms; we are a host, not your lawyer.
Who operates the servers and how do I reach you?
Switzerland Hosting is operated by Hosta AG, a Swiss société anonyme (IDE CHE-107.875.655), Käppeligasse 1, 4125 Riehen, Switzerland; the servers are in ALP1 in the Swiss Alps. To contact us, open a support ticket from the client panel. General questions are answered in the FAQ.
Sources
Every fact on this page, with its source
Checked 4 Nov 2026 unless noted.
Swiss law and authorities
- Revised FADP in force since 1 September 2023Fedlex RS 235.1
- Swiss-U.S. Data Privacy Framework recognised since 15 September 2024Federal Office of Justice
- Crypto-asset services to Russian nationals, residents and entities prohibited since 26 February 2026 (SR 946.231.176.72, art. 20(2))SECO press release of 25 February 2026
EU and other countries
- EU adequacy for Switzerland confirmed 15 January 2024European Commission
- CLOUD Act executive agreements limited to the UK and Australia, as of 31 October 2026US Department of Justice · checked 31 Oct 2026
Industry, providers and software
- Lago README: AGPL-3.0 licence, self-hosted quick start, telemetry noticegithub.com/getlago/lago
- v1.56.0 adopted in the main repository (PR #850, merged 2 November 2026)github.com/getlago/lago/pull/850
- Postgres 5432 and Redis 6379 published on the host, no Redis password, proxy.getlago.comdocker-compose.yml
Other references
- Containers, environment variables, default secrets, Postgres event store (~10K events/s), "bring your own Postgres/Redis in production", S3-compatible storage, SMTP defaultsLago docs: Docker
- Front on port 8080, WebSocket origin check, LAGO_TRUSTED_PROXIES, Gotenberg 8.39 image, v1.54.0 prerequisiteLago docs: Migration to v1.56.0
- PostgreSQL 15+ with pg_partman, Redis 7.x / Valkey 7.2+, ClickHouse 25.6+, Redpanda 25.2+Lago docs: Compatibility matrix
- Self-hosted operations are the operator's responsibilityLago docs: Self-hosting overview
- Default telemetry and LAGO_DISABLE_SEGMENTLago docs: Tracking and analytics
- Docker-published ports bypass ufwdocs.docker.com
ALP1·Swiss Alps
Your server in the Alps, ready when you are.
Cloud VPS start at $6.99 a month and are usually set up within minutes of your order.
