carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1# Plans
2
3A deployment can give each account a plan. A plan sets limits: how many apps and instances an account runs, how soon its apps sleep, how much disk, storage, email and bandwidth it gets, and whether it can use custom domains or its own boxes. Packs raise some of those limits.
4
5Plans are off unless you turn them on. A deployment with no plan catalog has no limits, which is how every deployment has run until now.
6
7## Turning plans on
8
9Write a catalog file and point the console at it:
10
11```sh
12CARLOS_PLAN_CATALOG=/etc/carlos/plans.json
13```
14
15The console reads the file when it starts. If the file is missing or wrong, the console refuses to start rather than run with no limits.
16
17## The catalog
18
19```json
20{
21 "version": "2026-10-20-v1",
22 "default_plan": "free",
23 "free_accounts_per_person": 1,
24 "plans": {
25 "free": {"paid": false, "limits": {"running_things": 3, "idle_seconds": 90, "memory_tier": "small"}},
26 "personal": {"paid": true, "limits": {"running_things": 25, "idle_seconds": 900}, "packs": ["apps"]}
27 },
28 "packs": {
29 "apps": {"adds": {"running_things": 5}, "max_quantity": 20}
30 },
31 "ceilings": {"running_things": 200}
32}
33```
34
35Every account without a plan of its own is on `default_plan`. Packs may only raise counts and sizes: apps and instances, disk, storage, email and bandwidth. A ceiling is the most any plan with packs can reach.
36
37Change `version` whenever you change the file. The console notices an edit that kept the old version and treats it as a new catalog anyway, so every account's limits are written again.
38
39## Assigning a plan
40
41```sh
42carlos accounts plan --account bac --set personal --reason "upgraded"
43```
44
45The console writes each account's limits to `accounts/<sqid>/limits.json` in the deployment bucket, and the boxes read them from there. A change reaches the bucket straight away, or within a minute if the bucket was unavailable.
46
47## Sponsored accounts
48
49A sponsored account keeps its plan but gets limits of its own where those are more generous, for example the usage it already had when plans were turned on:
50
51```sh
52carlos accounts plan --account bac --set free --sponsored limits.json --reason "existing account"
53```
54
55`limits.json` holds any of the limit names from the catalog. A sponsored limit can go above a ceiling: that is a decision you made for that account.
56