cellMembrane · amoeba skin · markdown · petalTongue:false

Membrane Composition Model

·

petalTongue Grammar · Membrane Composition ModelCNS/PNS = 3.880Target 1/ln(2) = 1.4427 · domain:ecology0 static HTML files · 100% Living Rust + petalTongueWords1205Headings11Siblings6

Membrane Composition Model

Version: 1.0.0

Date: May 26, 2026

Status: Active

Authority: cellMembrane team

License: AGPL-3.0-or-later

Related: CELLMEMBRANE_ARCHITECTURE.md, infra/plasmidBin/ports.env

---

Abstract

A membrane composition defines which primals, channels, ports, and firewall

rules are active on a given membrane host. Compositions form a monotonic

ladder — each tier includes everything from the tier below plus additional

services. This document specifies the four composition tiers and the rules

for extending the model.

---

Composition Ladder

  nest     = tower + NestGate + rhizoCrypt + loamSpine + sweetGrass
    ↑
  tower    = rustdesk + BearDog + SkunkBat (BTSP identity boundary)
    ↑
  rustdesk = relay + RustDesk hbbs/hbbr (remote desktop)
    ↑
  relay    = Songbird TURN (minimal viable membrane)

Each composition is a strict superset of the one below. You cannot deploy

tower without relay capabilities. You cannot deploy nest without

tower.

---

Tier 1: Relay

The minimal viable membrane. A single Songbird TURN relay providing NAT

traversal for gates behind restrictive networks.

AttributeValue
Primalssongbird
Channels activeChannel 2 (Relay)
Ports22/tcp, 3478/tcp+udp
Systemd unitssongbird-relay.service
CredentialsTURN key in /etc/songbird/relay-credentials
Health checksongbird doctor or TURN allocate probe
Dark ForestMinimal — no identity, no BTSP

Use case: Temporary relay for gate-to-gate connectivity when no

identity boundary is needed. Testing. Bootstrapping before Tower is ready.

membrane.toml example

[membrane]
name = \"relay-only\"
composition = \"relay\"

[membrane.channels.relay]
port = 3478
primal = \"songbird\"

---

Tier 2: RustDesk

Adds RustDesk remote desktop rendezvous and relay on top of Songbird.

This is the first composition that provides direct interactive access

to gates behind NAT.

AttributeValue
Primalssongbird
Symbiotichbbs, hbbr (RustDesk — not ecoPrimals)
Channels activeChannel 2 (Relay), Channel 2b (RustDesk)
Ports22, 3478, 21115, 21116/tcp+udp, 21117
Systemd unitssongbird-relay, hbbs-membrane, hbbr-membrane
CredentialsTURN key + RustDesk key pair (auto-generated)
Health checkSongbird + hbbs TCP connect on 21116
Dark ForestMinimal — RustDesk has its own encryption

Use case: Remote access sovereignty. Replace commercial remote desktop

(TeamViewer, AnyDesk) with self-hosted infrastructure.

---

Tier 3: Tower

Adds the BTSP identity boundary (BearDog + SkunkBat) on top of RustDesk.

Tower is the trust perimeter — it establishes encrypted, authenticated

primal-to-primal communication via BTSP. This is the standard production

composition for a membrane.

AttributeValue
Primalsbeardog, songbird, skunkbat
Symbiotichbbs, hbbr
Channels activeChannel 2, Channel 2b
Ports22, 3478, 21115, 21116/tcp+udp, 21117
Systemd unitsbeardog-membrane, songbird-relay, skunkbat-membrane, hbbs-membrane, hbbr-membrane
CredentialsTURN key, RustDesk key, tower.env (FAMILY_SEED, FAMILY_ID)
Boot orderBearDog → Songbird → SkunkBat (systemd After=)
Health checkbeardog doctor, songbird doctor, SkunkBat liveness
Dark ForestFull — BTSP enforced, stripped binaries, encrypted secrets

Tower introduces tower.env — the composition identity file containing

BEARDOG_FAMILY_SEED, FAMILY_ID, MEMBRANE_ROLE=tower, and

MEMBRANE_GATE_ID. This file is the root of trust for all intracellular

communication.

Boot order constraint: BearDog must start first (it provides BTSP).

Songbird depends on BearDog for authenticated relay. SkunkBat depends on

both for audit context. This is enforced via systemd After= and

Requires= directives.

Use case: Production membrane with identity and audit. The standard

deployment for membrane.primals.eco.

---

Tier 4: Nest

Adds NestGate (sovereign storage) and the provenance trio (rhizoCrypt,

loamSpine, sweetGrass) on top of Tower. Nest enables Channel 3 Surface

with TLS content delivery.

AttributeValue
Primalsbeardog, songbird, skunkbat, nestgate, rhizocrypt, loamspine, sweetgrass
Symbiotichbbs, hbbr, caddy (TLS termination)
Channels activeChannel 1 (Signal/DNS), Channel 2 (Relay), Channel 2b (RustDesk), Channel 3 (Surface)
Ports22, 53, 3478, 21115-21117, 80, 443, 8443, 9500, 9602, 9700, 9850
Systemd unitsTower units + nestgate-membrane, rhizocrypt-membrane, loamspine-membrane, sweetgrass-membrane, caddy-tls
CredentialsTower credentials + NestGate config, Caddy TLS certs
Boot orderTower boot → NestGate → provenance trio → Caddy
Health checkTower checks + NestGate :9500 + Caddy TLS probe
Dark ForestFull + content provenance validation

Nest adds significant surface area. The additional ports (9500, 9602,

9700, 9850) are for Nest-internal primal communication; they should be

firewall-restricted to known gate IPs in production.

NestGate runs in cache-only mode on the membrane (NESTGATE_MODE=cache-only).

It caches content synced from gates but does not originate content. The

membrane remains a broker, never a data plane.

Use case: Full sovereign content delivery. Replace GitHub Pages and

CDN with self-hosted membrane. The membrane.primals.eco deployment

at Phase 1.5.

---

Composition Requirements Table

RequirementRelayRustDeskTowerNest
Songbird binaryYesYesYesYes
RustDesk binaries (hbbs/hbbr)NoYesYesYes
BearDog binaryNoNoYesYes
SkunkBat binaryNoNoYesYes
NestGate binaryNoNoNoYes
Provenance trio (3 binaries)NoNoNoYes
Caddy binaryNoNoNoYes
tower.env identity fileNoNoYesYes
BTSP enforcedNoNoYesYes
TURN credentialsYesYesYesYes
TLS certificatesNoNoNoYes
Dark Forest full complianceNoNoYesYes

---

Extending the Model

To add a new composition tier:

1. Define the tier in this document with the full attribute table.

2. Add to MembraneComposition enum in cellmembrane-types/composition.rs.

3. Define the CompositionSpec — list required primals, ports, services.

4. Update FirewallRuleset derivation in cellmembrane-types/firewall.rs.

5. Add systemd unit templates to infra/plasmidBin/membrane/.

6. Register in MembraneService registry (cellmembrane-types/src/service/registry.rs).

7. Validate with cellmembrane-types against the reference membrane.toml.

To add a new primal to an existing tier:

1. Add to the tier's primal list in this document and in CompositionSpec.

2. Register the port in both this document and ports.env.

3. Create a systemd unit in membrane/.

4. Update firewall rules if the primal needs an externally-reachable port.

---

Alignment with biomeOS Atomics

Membrane CompositionbiomeOS AtomicPrimals in Common
TowerTower (electron)beardog, songbird, skunkbat
NestNest (neutron)+ nestgate, rhizocrypt, loamspine, sweetgrass

The membrane does not deploy the Node atomic (toadstool, barracuda,

coralreef). Compute stays on gates, never on the membrane. This is by

design — the membrane is a rendezvous broker, not a compute substrate.

The full NUCLEUS atomic (Tower + Node + Nest, 10 primals) runs only on

gates managed by projectNUCLEUS, never on a membrane fieldMouse.