Appearance
Packaging and Deployment
Soma ships as two artifacts: one Tauri V2 desktop app and one server binary (somad). Both are thin shells around the same shared Rust crates — the desktop embeds them in its src-tauri host process via the desktop-* crates, the server runs them as subcommands of a unified binary. This page summarizes how each is packaged and operated.
Desktop Application Packaging
- Targets – macOS
arm64(notarized.dmg+.zip) and Linuxamd64+arm64(.deb+.AppImage). Windows is not supported. - Contents – a single Tauri V2 bundle built from
desktop/desktop-app/. The React/Vite renderer plus the Rustsrc-taurihost (composed from thedesktop-*crates) ship as one app; the peer and agent runtimes are embedded in-process inside the host binary. There are no separate daemon or agent binaries and no native.nodeaddon. - Build tooling – the Tauri bundler (
tauri build) drives both the renderer build and the macOS/Linux bundle/sign/notarize steps. Noelectron-builder, no@napi-rs/cli, no externaldesktop/packaging/tooling, no@soma/packagingCLI. - macOS signing + notarization – the Tauri bundler signs with a Developer ID Application certificate and notarizes via
notarytool(credentials are passed from the workflow's Apple secrets). It produces a notarized.dmg(open and dragSoma.appinto Applications) and a notarized.zip(unzipSoma.appanywhere). No/Library/LaunchAgents, nopkgbuild, no sudo, noxattrquarantine stripping, no install/uninstall scripts. - Linux – one
.deband one.AppImageper arch published to the GitHub Release. Install the.debwithsudo apt install ./soma-desktop-linux-<arch>.deb; orchmod +xthe.AppImageand run it directly. No systemd unit is shipped; autostart is the user's choice (a~/.config/autostart/.desktopfile is the conventional path). - Release pipeline –
.github/workflows/release-desktop.yml(workflow_dispatch) reads the(os, arch)matrix from.github/targets.json, builds thedesktop/desktop-app/bundles viatauri-apps/tauri-action, signs + (on macOS) notarizes, renames the bundles to the versionlesssoma-desktop-<os>-<arch>.<ext>convention, and publishes them to adesktop-v*GitHub Release alongside aSHA256SUMSfile. (The macOS signing/notarization path was confirmed by a realworkflow_dispatchrun.) - Login items – a macOS Login Item / autostart is registered when the user opts in; the peer is alive only while the process is running, and the macOS tray keeps it live after the window closes.
The embedded peer is online only while Soma is open. Long-term availability for a space is provided by a somad bot running as a space mirror — see "Supporting Infrastructure" below.
Server: somad
One binary, subcommand-dispatched. Modes are selected at runtime; behavior shared across all of them (clap CLI + env, mimalloc, tracing) is unified.
somad bot [--http-addr ...] [--db-url ...] [--listen-addrs ...] [--mode bot|admin]
somad relay [--http-addr ...]
somad rendezvous [--http-addr ...]
somad bff [--http-addr ...] [--p2p-enable]
somad all --config server.toml # composes multiple modes in one processEach subcommand also accepts a generate-identity action where applicable (somad relay generate-identity, somad rendezvous generate-identity, somad bot generate-identity) for one-shot keypair creation. SOMA_DATA_DIR (env) anchors the persisted libp2p identity files; see somad <subcommand> --help for the authoritative flag list.
Packaging:
- One image —
ghcr.io/<owner>/somad. Built from oneDockerfile(no per-service targets). - Base —
gcr.io/distroless/static-debian12:nonroot. - Multi-arch —
amd64+arm64, built from prebuilt MUSL binaries copied in (no Rust compile duringdocker build). - Release pipeline —
.github/workflows/release-server.yml(workflow_dispatch) reads the server slice of.github/targets.jsonand publishes one image, runtime-multiplexed by subcommand.
Mode is selected at runtime via the entrypoint args, e.g. docker run ghcr.io/.../somad bot --http-addr 0.0.0.0:8080 ....
Supporting Infrastructure
The same somad image provides every server-side role; each subcommand is its own Helm release.
Rendezvous Server
somad rendezvousruns the libp2p rendezvous discovery protocol, letting peers register under namespaces likesoma-prodorsoma-dev.^rendezvous- Deployed via Helm, usually as a simple Deployment with a public LoadBalancer Service exposing TCP/QUIC/WS ports.
- Identity persists at
${SOMA_DATA_DIR}/rendezvous/identity.keyso the Peer ID is stable across restarts (back it with a Kubernetes Secret or PVC). - Exposes
GET /healthzandGET /metrics(Prometheus); metrics are prefixedrendezvous_.
Circuit Relay Nodes
somad relayprovides/p2p-circuitaddresses for peers that cannot accept inbound connections because of restrictive NAT or firewalls.^relay- Multiple relay pods can be deployed for redundancy; each persists its libp2p identity at
${SOMA_DATA_DIR}/relay/identity.keyso the Peer ID survives restarts. - Peers discover relays via static config or rendezvous announcements and attempt hole punching (DCUtR) to upgrade connections whenever possible.
- Exposes
GET /healthzandGET /metrics; metrics are prefixedrelay_.
LLM BFF (somad bff)
- HTTP-only provider integration for LLMs (no libp2p by default). Listens on
0.0.0.0:8083and exposes/metrics; the BFF API itself is served on the same port. --p2p-enableturns on an optional diagnostic libp2p peer for testing — off in production.- Deployed via Helm like the other services; horizontally scalable behind a normal Service/Ingress since it holds no peer state.
Optional Hosted Bots
somad bot(--mode bot|admin) provides always-on availability for a space (a "space mirror"). The same image runs as a headless peer + cache, configured via flags/env forSOMA_DATABASE_URL, libp2p listen addrs, and (inadminmode) the authenticated control-plane endpoints under/v1/*. The cache/announce semantics are described in AGENTS.md § "Bots and always-on availability".
Release and Operations Workflow
- Build, sign, and notarize the Soma desktop app via
release-desktop.yml; the workflow publishes per-(os, arch)assets plus aSHA256SUMSfile to adesktop-v*Release. Users download directly from GitHub — there is nocurl | bashbootstrap. - Build the
somadserver image viarelease-server.yml; the workflow publishes multi-arch tags toghcr.io/<owner>/somad. - Update Helm chart values with new container tags for rendezvous, relay, or hosted bot deployments.
- Use
helm upgradeto roll out infrastructure changes; Kubernetes handles restarts and liveness probes keep pods healthy. - Monitor relay bandwidth/memory and rendezvous registration counts to plan scaling.
The infrastructure components never store user content — they only facilitate peer discovery and encrypted transport — so PII risk stays on user-controlled devices while still delivering reliable connectivity.