Self-hosting: every step a stranger needs to run mcl-mail on their own box today, marked product vs fleet-only, and the shortest path to one command #16

Closed
opened 2026-11-23 13:49:00 +00:00 by mars · 3 comments
Member

Purpose (measurement): a stranger can run mcl-mail on their own hardware with one documented command, and we know today's gap step by step before any code is written.

Owner rule: DECIDED 2026-11-23 "people are supposed to be able to run a mcl service ON THEIR OWN HARDWARE WITHOUT TOO MUCH FRICTION" (relayed by the Supervisor).

mcl-mail is the example service. The result is meant to apply to every mcl-* service.

Package (Uranus): measurement first, no code

  1. List every step a stranger needs today, from a clean Linux machine to a working mcl-mail. For each step give its source with file:line evidence: README, compose file, image registry access, keys, realm/licence, signer, fleet.
  2. Mark each step:
    • product: the service itself needs it.
    • fleet-only: only our fleet needs it (signer chain, bots, allowed_signers, reconciler, fleet-ops).
  3. Propose the shortest path, aiming at one documented command per service.
  4. Constraint: our fleet's ops path stays internal. It must never become something a self-hoster needs.

Done when

  • One page, posted as a comment on this issue: the step table (step · source file:line · product/fleet-only), then the proposed shortest path.
  • No code changes in this package. The build that follows is a separate ruling.

Placed by Mars (dispatcher) for the Supervisor.

Purpose (measurement): a stranger can run mcl-mail on their own hardware with one documented command, and we know today's gap step by step before any code is written. Owner rule: DECIDED 2026-11-23 "people are supposed to be able to run a mcl service ON THEIR OWN HARDWARE WITHOUT TOO MUCH FRICTION" (relayed by the Supervisor). mcl-mail is the example service. The result is meant to apply to every mcl-* service. ## Package (Uranus): measurement first, no code 1. List every step a stranger needs **today**, from a clean Linux machine to a working mcl-mail. For each step give its source with file:line evidence: README, compose file, image registry access, keys, realm/licence, signer, fleet. 2. Mark each step: - **product**: the service itself needs it. - **fleet-only**: only our fleet needs it (signer chain, bots, allowed_signers, reconciler, fleet-ops). 3. Propose the shortest path, aiming at **one documented command per service**. 4. Constraint: our fleet's ops path stays internal. It must never become something a self-hoster needs. ## Done when - One page, posted as a comment on this issue: the step table (step · source file:line · product/fleet-only), then the proposed shortest path. - No code changes in this package. The build that follows is a separate ruling. Placed by Mars (dispatcher) for the Supervisor.
Member

Self-hosting mcl-mail today: every step, measured (Uranus, 2026-11-23)

Read from mcl-mail main b4197f7 (git archive), macula-fleet main, mcl-om main, and probes made from outside our network (anonymous HTTP). Owner rule: DECIDED 2026-11-23 "people are supposed to be able to run a mcl service ON THEIR OWN HARDWARE WITHOUT TOO MUCH FRICTION".

The steps a stranger takes today, from a clean Linux box

# Step Source / evidence Kind Today
1 Read the README and get the compose file git.macula.io answers an anonymous visitor with a redirect to /user/login, and the API answers 403 for the repo. github.com/macula-services/mcl-mail still answers 200, but that account is suspended and no longer updated. product blocked on the forge; GitHub works only while the frozen copy lasts
2 Install docker or podman with compose, on a box with IPv6 deploy/docker-compose.yml:31-35 (host networking, because stations are IPv6-only) product undocumented prerequisite
3 Pick an image digest docker-compose.yml:28 requires MCL_MAIL_IMAGE_DIGEST. README.md:218 says "of the released image" and names no place to look it up. product digests are recorded only in macula-fleet's pins
4 Pull the image anonymous ghcr pull works, but its newest release is 0.6.0. 0.6.1 (CHANGELOG.md:8, 2026-11-23) is not on ghcr. The forge registry answers 401 anonymously. product stale, or blocked
5 MCL_REALM README.md:207, compose:54. Public: realm_id in https://realm.macula.io/.well-known/macula-realm.json. The README doesn't point there. product findable only if you know where to look
6 MCL_REALM_KEY README.md:208, config/sys.config.src:62 want hex. The well-known file carries public_key in base64. product an undocumented conversion
7 MACULA_STATION_SEEDS + MACULA_STATION_NODE_IDS README.md:209-210, compose:66-67. Required and pinned (mcl_om refuses an unpinned seed). The values live only in macula-fleet (edge/beam02.lab/mcl-mail-config.env, private forge). The stations publish no node id (their /.well-known/* answers 404). product blocked
8 A data directory compose:50 defaults to /bulk0/mcl-mail, a fleet layout (README.md:217) fleet default inside a product file works only after overriding MCL_DATA
9 The Erlang cookie compose:70 hard-codes MCL_COOKIE=mcl_mail while the dist listener binds every interface: measured 0.0.0.0:36413 for mcl_mail on beam02. Filed as #17. product unsafe as shipped
10 docker compose -p mcl-mail -f deploy/docker-compose.yml up -d compose:6-11 product works once 3-9 are done
11 Admission to the realm mcl_om_claim.erl:11-13,212-214 (mcl-om): the boot claim stays pending until the realm's operator admits the node. The org is fixed as mcl-mail (sys.config.src:40), so the stranger becomes one more provider of our org, admitted by us. product (realm policy) blocked on a person, with no documented way to ask
12 Check it works scripts/health.sh (README.md:195) product works
13 Verify the image signature (optional) README.md:229-230: signed by digest with SBOM and provenance. No stranger-facing cosign verify line. product undocumented
— Build from source instead README.md:197-201: needs the macula-ci-otp-rocksdb image. RocksDB is leaving (ci-images#19). product, optional changes with #19

Fleet-only, never a stranger's step: pin-releases and the signer chain (allowed_signers, the image signer, bots), the per-box mcl-mail-config.env and ~/.macula/secrets/mcl-mail.env (fleet compose:3,33-34), the reconciler, and the /bulk0 layout. README.md:241-252 ("Deployment", point 2) describes these fleet steps inside the product README. They should move to macula-fleet.

Today's verdict: a stranger cannot finish. Steps 1, 4, 7 and 11 are blocked, and 9 is unsafe.

The shortest path: one documented command per service

curl -fsSL https://<public home>/mcl-mail/run.sh | sh -s -- --data ~/mcl-mail

What it needs, in order. Each item is product work in the service or the realm, and none of it touches the fleet path:

  1. A public home that an anonymous visitor can read, for the README, the compose file, run.sh, the released image and the signatures. Today nothing qualifies: the forge needs a login and ghcr is frozen. This needs Raf's choice.
  2. The release publishes its own run file. Each v* tag writes mcl-mail.env next to the image: the digest, MCL_REALM, MCL_REALM_KEY in hex, and the station seeds paired with their node ids. Step 3 then disappears, and so do 5-7 as lookups.
  3. The realm publishes its stations. Today their seeds and node ids sit only in the fleet repo. The well-known file (or a sibling) lists them, signed with the realm key the stranger already pins by key_id. The release's env file is filled from that list.
  4. run.sh does the rest: checks for docker/podman and IPv6, makes the data dir under the path given, generates a random cookie into a local 0600 file, pulls by digest, verifies the signature, runs compose up, and prints health.sh's answer and the claim's state.
  5. #17 lands first: distribution on loopback only, no cookie in any shipped file.
  6. Admission: either the realm admits a self-hosted node of a public org without a person, or the claim's pending state prints how and where to ask. This is a realm-policy choice for Raf.

The same shape fits every mcl-* service. The service's repo carries run.sh and its compose file, the release writes the env file, and the realm publishes the stations. The fleet keeps its own compose files and pins, and nothing in run.sh reads from them.

Open for a ruling (not decided here): the public home (item 1) and the admission policy (item 6). No code in this package; the build is a separate ruling.

## Self-hosting mcl-mail today: every step, measured (Uranus, 2026-11-23) Read from mcl-mail main `b4197f7` (git archive), macula-fleet main, mcl-om main, and probes made from outside our network (anonymous HTTP). Owner rule: DECIDED 2026-11-23 "people are supposed to be able to run a mcl service ON THEIR OWN HARDWARE WITHOUT TOO MUCH FRICTION". ### The steps a stranger takes today, from a clean Linux box | # | Step | Source / evidence | Kind | Today | |---|---|---|---|---| | 1 | Read the README and get the compose file | git.macula.io answers an anonymous visitor with a redirect to `/user/login`, and the API answers 403 for the repo. github.com/macula-services/mcl-mail still answers 200, but that account is suspended and no longer updated. | product | **blocked on the forge**; GitHub works only while the frozen copy lasts | | 2 | Install docker or podman with compose, on a box with IPv6 | `deploy/docker-compose.yml:31-35` (host networking, because stations are IPv6-only) | product | undocumented prerequisite | | 3 | Pick an image digest | `docker-compose.yml:28` requires `MCL_MAIL_IMAGE_DIGEST`. README.md:218 says "of the released image" and names no place to look it up. | product | digests are recorded only in macula-fleet's pins | | 4 | Pull the image | anonymous ghcr pull works, but its newest release is **0.6.0**. 0.6.1 (CHANGELOG.md:8, 2026-11-23) is not on ghcr. The forge registry answers 401 anonymously. | product | stale, or blocked | | 5 | `MCL_REALM` | README.md:207, compose:54. Public: `realm_id` in https://realm.macula.io/.well-known/macula-realm.json. The README doesn't point there. | product | findable only if you know where to look | | 6 | `MCL_REALM_KEY` | README.md:208, `config/sys.config.src:62` want **hex**. The well-known file carries `public_key` in **base64**. | product | an undocumented conversion | | 7 | `MACULA_STATION_SEEDS` + `MACULA_STATION_NODE_IDS` | README.md:209-210, compose:66-67. Required and pinned (mcl_om refuses an unpinned seed). The values live only in macula-fleet (`edge/beam02.lab/mcl-mail-config.env`, private forge). The stations publish no node id (their `/.well-known/*` answers 404). | product | **blocked** | | 8 | A data directory | compose:50 defaults to `/bulk0/mcl-mail`, a fleet layout (README.md:217) | fleet default inside a product file | works only after overriding `MCL_DATA` | | 9 | The Erlang cookie | compose:70 hard-codes `MCL_COOKIE=mcl_mail` while the dist listener binds every interface: measured `0.0.0.0:36413` for mcl_mail on beam02. Filed as **#17**. | product | **unsafe as shipped** | | 10 | `docker compose -p mcl-mail -f deploy/docker-compose.yml up -d` | compose:6-11 | product | works once 3-9 are done | | 11 | Admission to the realm | `mcl_om_claim.erl:11-13,212-214` (mcl-om): the boot claim stays **pending** until the realm's operator admits the node. The org is fixed as `mcl-mail` (`sys.config.src:40`), so the stranger becomes one more provider of our org, admitted by us. | product (realm policy) | **blocked on a person**, with no documented way to ask | | 12 | Check it works | `scripts/health.sh` (README.md:195) | product | works | | 13 | Verify the image signature (optional) | README.md:229-230: signed by digest with SBOM and provenance. No stranger-facing `cosign verify` line. | product | undocumented | | — | Build from source instead | README.md:197-201: needs the `macula-ci-otp-rocksdb` image. RocksDB is leaving (ci-images#19). | product, optional | changes with #19 | **Fleet-only, never a stranger's step:** pin-releases and the signer chain (`allowed_signers`, the image signer, bots), the per-box `mcl-mail-config.env` and `~/.macula/secrets/mcl-mail.env` (fleet compose:3,33-34), the reconciler, and the `/bulk0` layout. README.md:241-252 ("Deployment", point 2) describes these fleet steps inside the product README. They should move to macula-fleet. **Today's verdict:** a stranger cannot finish. Steps 1, 4, 7 and 11 are blocked, and 9 is unsafe. ### The shortest path: one documented command per service ```sh curl -fsSL https://<public home>/mcl-mail/run.sh | sh -s -- --data ~/mcl-mail ``` What it needs, in order. Each item is product work in the service or the realm, and none of it touches the fleet path: 1. **A public home** that an anonymous visitor can read, for the README, the compose file, `run.sh`, the released image and the signatures. Today nothing qualifies: the forge needs a login and ghcr is frozen. This needs Raf's choice. 2. **The release publishes its own run file.** Each `v*` tag writes `mcl-mail.env` next to the image: the digest, `MCL_REALM`, `MCL_REALM_KEY` in hex, and the station seeds paired with their node ids. Step 3 then disappears, and so do 5-7 as lookups. 3. **The realm publishes its stations.** Today their seeds and node ids sit only in the fleet repo. The well-known file (or a sibling) lists them, signed with the realm key the stranger already pins by `key_id`. The release's env file is filled from that list. 4. **`run.sh` does the rest:** checks for docker/podman and IPv6, makes the data dir under the path given, generates a random cookie into a local 0600 file, pulls by digest, verifies the signature, runs `compose up`, and prints `health.sh`'s answer and the claim's state. 5. **#17 lands first:** distribution on loopback only, no cookie in any shipped file. 6. **Admission:** either the realm admits a self-hosted node of a public org without a person, or the claim's pending state prints how and where to ask. This is a realm-policy choice for Raf. The same shape fits every mcl-* service. The service's repo carries `run.sh` and its compose file, the release writes the env file, and the realm publishes the stations. The fleet keeps its own compose files and pins, and nothing in `run.sh` reads from them. **Open for a ruling (not decided here):** the public home (item 1) and the admission policy (item 6). No code in this package; the build is a separate ruling.
Member

Stranger walk on a throwaway box: done. It runs up to the boot claim; the claim stays pending until the realm operator admits the node.

Box: Hetzner cx23 fsn1, Ubuntu 24.04.4, label purpose=throwaway, fresh key. cpx11 answered "unsupported location for server type" in fsn1, nbg1 and hel1, so I took the next smallest x86 at the same price (2c/4G, €0.0106/h gross). Created 21:10:18Z, deleted 21:15:35Z (5m17s). GET server, both primary IPs and the SSH key: 404. No server labelled purpose=throwaway remains. Billed hour: about €0.01.

No crew credentials went to the box; everything below is anonymous.

# Step Result
1 Network Dual-stack is required: realm.macula.io and git.macula.io have A records only, and the stations have AAAA only.
2 apt-get install docker.io docker-compose-v2 git jq Docker 29.1.3, Compose 2.40.3
3 git clone https://git.macula.io/macula-services/mcl-mail.git OK (main fd2617b)
4 Image forge mcl-mail:0.6.1 pulls anonymously, digest sha256:971e0747…37dd08. ghcr pulls too, but its newest is 0.6.0. main's compose points at ghcr: fixed in the PR. The forge's anonymous /v2/…/tags/list gives 401, so a stranger can't list versions.
5 Realm MCL_REALM and MCL_REALM_KEY come from the well-known document (abb81b5a…, key 6236 hex chars)
6 Stations read from mcl-echo's mcl_echo_stations.erl (anonymous clone); falkenstein, helsinki, frankfurt
7 docker compose up -d (MCL_DATA=/srv/mcl-mail) started; connected to helsinki in 1 ms
8 Boot claim mcl_om_claim: claim for org=mcl-mail is pending in realm abb81b5a…: an operator must admit this node before its procedures can be advertised
9 scripts/health.sh degraded, HTTP 503, claim pending, 9/9 procedures not_granted (operator_must_grant). Clear enough.

Gaps still open: admission (macula-realm#8), the stations list (macula-realm#7), the signer key (mcl-mail#21). The PR documents the walk in the README ("Run it on your own box").

Stranger walk on a throwaway box: done. It runs up to the boot claim; the claim stays **pending** until the realm operator admits the node. Box: Hetzner **cx23** fsn1, Ubuntu 24.04.4, label purpose=throwaway, fresh key. cpx11 answered "unsupported location for server type" in fsn1, nbg1 and hel1, so I took the next smallest x86 at the same price (2c/4G, €0.0106/h gross). Created 21:10:18Z, deleted 21:15:35Z (5m17s). GET server, both primary IPs and the SSH key: **404**. No server labelled purpose=throwaway remains. Billed hour: about €0.01. No crew credentials went to the box; everything below is anonymous. | # | Step | Result | |---|------|--------| | 1 | Network | Dual-stack is **required**: realm.macula.io and git.macula.io have A records only, and the stations have AAAA only. | | 2 | `apt-get install docker.io docker-compose-v2 git jq` | Docker 29.1.3, Compose 2.40.3 | | 3 | `git clone https://git.macula.io/macula-services/mcl-mail.git` | OK (main fd2617b) | | 4 | Image | forge `mcl-mail:0.6.1` pulls anonymously, digest sha256:971e0747…37dd08. ghcr pulls too, but its newest is 0.6.0. main's compose points at ghcr: fixed in the PR. The forge's anonymous `/v2/…/tags/list` gives 401, so a stranger can't list versions. | | 5 | Realm | MCL_REALM and MCL_REALM_KEY come from the well-known document (abb81b5a…, key 6236 hex chars) | | 6 | Stations | read from mcl-echo's `mcl_echo_stations.erl` (anonymous clone); falkenstein, helsinki, frankfurt | | 7 | `docker compose up -d` (MCL_DATA=/srv/mcl-mail) | started; connected to helsinki in 1 ms | | 8 | Boot claim | `mcl_om_claim: claim for org=mcl-mail is pending in realm abb81b5a…: an operator must admit this node before its procedures can be advertised` | | 9 | `scripts/health.sh` | `degraded`, HTTP 503, claim pending, 9/9 procedures not_granted (operator_must_grant). Clear enough. | Gaps still open: admission (macula-realm#8), the stations list (macula-realm#7), the signer key (mcl-mail#21). The PR documents the walk in the README ("Run it on your own box").
Member

Closing. PR 22 landed as one squash commit, dfb221e0 (main).

Purpose (measurement): "a stranger can run mcl-mail on their own hardware with one documented command, and we know today's gap step by step before any code is written."

  • Met: the gap is known step by step. The walk on a fresh box (c2074) is written up in the README as "Run it on your own box".
  • Not met yet: one documented command. Today it takes 7 documented steps, and the node then waits for admission.

Still open from the walk:

Closing. PR 22 landed as one squash commit, **dfb221e0** (main). Purpose (measurement): "a stranger can run mcl-mail on their own hardware with one documented command, and we know today's gap step by step before any code is written." - **Met:** the gap is known step by step. The walk on a fresh box (c2074) is written up in the README as "Run it on your own box". - **Not met yet:** one documented command. Today it takes 7 documented steps, and the node then waits for admission. Still open from the walk: - macula-io/macula-realm#8: admission. Raf ruled that the operator admits nodes for now. - macula-io/macula-realm#9: a stranger needs both IPv4 and IPv6. - macula-io/macula-realm#7: no published list of stations. - macula-services/mcl-mail#21: the signer's public key is not published. - macula-io/forge-setup#21: the anonymous registry tags/list answers 401.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
macula-services/mcl-mail#16
No description provided.