How it is built

How MantleOS works inside

MantleOS is a team of small programs on one server, each with one job. One fetches mail, one reads files, one answers questions. They pass work to each other through one shared database, which is also their notebook: a long job writes down each step, so after a restart it carries on where it stopped. There is one door in, and everyone who comes through it is asked who they are.

This page is for the person who signs off on the install: every part, every connection, and all the traffic that leaves the machine.

Screen print of a 1970s office building cut open like a doll’s house: one worker per room sorting mail, reading papers, working a switchboard and typing at a terminal, pipes from every room to one shared tank of filing drawers in the basement, and a doorman checking a visitor’s card at the single front door under the mantleOS nameplate.

One question, start to finish

Follow one question through MantleOS

Here is what happens between asking and getting the answer, one stop at a time. Under each stop is the same step at wire level.

  1. Screen print of a woman at a desk speaking into a 1970s telephone.

    Step 1: You ask

    You type a question in the app, on your phone or in Telegram. MantleOS takes it at once, so you can close the tab and it keeps working.

    Under the hood: POST /api/assistant/turn answers 202 with a turn id and queues a DBOS workflow over Postgres.

  2. Screen print of a guard in a booth checking a visitor’s card at a striped barrier gate.

    Step 2: The gate asks who you are

    Every way in has the same one gate. It works out who is asking and gives the question a name tag: a person, a key, an assistant or a link.

    Under the hood: The gate runs the same eight steps for every way in. A route with no policy row is refused.

  3. Screen print of three doors in a corridor, one open, a person with a key card walking through it.

    Step 3: Only your rooms open

    You can read only what is shared with the workspaces you are in. Everything else stays shut, as if it had never been there.

    Under the hood: The transaction carries the actor and its scope; Postgres row rules hide every row the scope does not hold.

  4. Screen print of a card-index cabinet with a drawer open and a magnifying glass over one card.

    Step 4: Memory looks it up

    MantleOS has already read your files and kept the facts, each with where it came from. It finds the pieces that fit, and a small, fast model picks what belongs in the answer.

    Under the hood: Search by meaning (pgvector) and by keyword. Passages and facts are read only where their item is read.

  5. Screen print of a hand pulling a railway switch lever, three locomotives of different sizes waiting on three tracks.

    Step 5: The right model takes it

    Each kind of work has its own model: one for chat, one for reading files, one for summaries, one for pictures. If the chat model fails, a backup can take over.

    Under the hood: Each model route is sent direct or through OpenRouter, and a route can have a backup set up.

  6. Screen print of three small robots at a workbench, one stacking blocks, one drawing, one reading with a magnifying glass.

    Step 6: Specialists do the work

    The assistant hands jobs to specialists for pages, tables, research or code. Each one can use only the tools you gave it, and every step is written down as it finishes.

    Under the hood: Tool groups are checked on the server on every call. Each finished step goes to the DBOS journal, so a restart resumes from the last good one.

  7. Screen print of a hand holding a rubber stamp over a sheet of paper on a desk, a desk bell beside it.

    Step 7: A person says yes

    A risky action waits for a person to approve it. When it runs, MantleOS checks again that the one who asked is still allowed to do it.

    Under the hood: An approved call runs in the scope it was asked in, judged again with the asker’s rights at that moment.

  8. Screen print of a printer giving out a page with one line highlighted, a thread running from it to an open folder.

    Step 8: The answer comes back, with its source

    You watch the answer appear word by word, with the page it came from. It is saved, and every step it took is on the record, so you can check it.

    Under the hood: Text streams over NOTIFY and SSE. The reply is written once to a durable row; the trace keeps every step, tool call and cost.

The answer you keep and the words you watch appear travel separate paths. A crash mid-stream costs you the animation, never the answer.

What runs where

Every part, on one box

A brain is three server processes, ten workers (background programs with one job each, such as fetching mail), the MantleOS web app, and a handful of helper containers. They share one Postgres database: it holds your data, and it is also the queue of waiting work, the journal that lets a job resume, and the signal that tells each part something changed.

Read the picture from the top down. Only the front door listens on the network; everything below it is reachable on the private Docker network and nowhere else. A question runs in server/api while server/web holds your connection, and Postgres carries everything between them, so the design works the same on one box or five.

Edgeapps, clients, channels and sources, outside the box
MantleOS web

The app you work in (the owner UI), in any browser. Your box serves it at your brain’s address, so there is nothing to install.

HTTPSHTTP/3SSE
MantleOS Desktop

The same app for macOS (Apple Silicon), Windows and Linux. It adds notifications, a tray icon, and several brains in one window.

Installers on GitHub Releases

.dmgSetup.exe.deb.AppImage
MantleOS mobile

Your chats, files and approvals on your phone, with push notifications. On the App Store for iPhone. Android is not on Google Play yet.

App Store

iOStoken per device
AI apps

Lets Claude, Codex, ChatGPT, Gemini, GitHub Copilot, Grok and Perplexity work with your brain. Each can add it today as a remote MCP connector (MCP is the standard way AI apps plug into outside tools and data). Some need a paid plan or a setting turned on.

remote MCPOAuth
MCP clients

Any other MCP client. It connects remotely after an OAuth sign-in (the standard step where you approve an app), or on the server itself over stdio, as a local program reached through SSH.

OAuthstdio JSON-RPC
HTTP API

Lets your own scripts and systems read and write the brain. The public, versioned /api/v1 takes a per-login API key: read only or read and write, scoped, and expiring. The other /api routes belong to the MantleOS apps and can change with any release.

HTTPSBearer token30 days
Telegram

Talk to your brain in Telegram, by text or voice, both ways. Each responder (an agent that answers messages) gets its own bot.

Bot API
Mail · Microsoft 365 · calendars

Where your mail, files and calendars come from: IMAP/SMTP on your own mailbox, Microsoft Graph for SharePoint, OneDrive and Outlook, and iCal feeds.

IMAPSMTPMS GraphiCal
Host filesystem

A watched folder on the server. Edit a file with vim or sync it with Syncthing, and the brain picks up the change.

bind mountinotify
  • HTTPS + HTTP/3 → :443
  • session cookie or Bearer
  • SSE (EventSource)
  • stdio JSON-RPC (local)
  • account APIs (outbound, started by the box)
Front doorthe trust boundary: everything below it is reachable only from inside
caddy

The web server at your brain’s address, and the only container that listens on the network. It gets and renews HTTPS certificates from Let’s Encrypt on its own. By default it serves one domain and routes by path: the server paths go to web, everything else to MantleOS web. A second layout gives the owner UI its own domain.

:80:443:443/udpACME256 MB cap
  • reverse_proxy web:3000
  • reverse_proxy client-web:3000
  • internal Docker network
Processesthe server runs its TypeScript directly on tsx, with no build step
client-web

MantleOS web, the owner UI. A Next.js app built in the client repo, run as its own small stack beside the server. It holds no secrets: no database and no session key. Every byte it shows comes from server/web over a bearer token. A headless box (one with no UI) leaves it out.

Next.jsno DBbearer768 MB cap
server/web

The backend. It answers the whole /api surface, the remote MCP endpoint, retrieval (finding the passages that answer a question), files, and the SSE endpoints, which keep a connection open to stream replies and updates to the screen. A Hono HTTP server behind an http-compat shim. It owns the database connection.

Honotsx~470 routes3 GB cap
server/apiawake

The durable runner: it answers every assistant and Telegram turn, and keeps going through a crash. Each turn runs as a DBOS workflow, which records every finished step in its own Postgres system database, so a crash replays from that journal instead of re-running the turn. The background agents live here too: the extractor (reads new items and pulls out facts), the summarizer (condenses older chats), the reflector (notes how you like replies), and the heartbeat tick that lets the brain act without being asked. It has no HTTP surface. Other parts reach it through Postgres by enqueue and LISTEN, and it answers over NOTIFY (Postgres’s built-in signals between processes).

DBOSno HTTPresumableheartbeats3 GB cap
server/mcp

Lets an MCP client on the server use the brain directly over stdio, with no network in between. packages/mcp-core registers one tool set for both this and the HTTP /api/mcp OAuth endpoint, so a local client and a remote client see the same tools.

stdioJSON-RPC
workers ×10

Background processes with one job each, all from the same image: email, telegram, microsoft, files, docs, events, calendar, maintenance, runs, push. A core box (the smaller install for a small server) keeps four of them: files, docs, events and maintenance. They coordinate through Postgres, with pg-boss queues (job lists kept in the database) and LISTEN/NOTIFY, so there is no message broker to run.

pg-bossone image1 GB cap each
sandboxd

Runs code sandboxes: isolated containers where the agent can run code. On by default on a fresh full install, off on core, and switched in Settings > Services. It holds the Docker socket, so it is kept narrow on purpose: bearer auth, a fixed set of actions, and only containers it labelled itself. Sandboxes land on an isolated network that can only reach out, with no route to Postgres, RustFS or web.

Services switch512 MB cap
  • Drizzle pool
  • pg-boss queues
  • DBOS enqueue + journal
  • pg_notify / LISTEN
  • S3 SDK
Data planewhere data lives: one Postgres also runs the queues, the journal and the event bus
postgres

The source of truth, and most of the plumbing between parts too. pgvector holds the 768-dim embeddings (a fingerprint of what each item means, so search can match by meaning) under an HNSW index. pg_trgm handles near-match text search and ltree the item tree. It also holds the pg-boss queues, the DBOS journal, the turn-stream replay buffer, the LISTEN/NOTIFY bus that ties every process together, and the row-level security that limits every login and workspace assistant to what its workspaces hold.

pgvectorpg18LISTEN/NOTIFYno memory cap
rustfs

Stores the bytes of files and attachments, in an S3-compatible object store. Private bucket, internal network, no published port, no anonymous access.

S3 SDK1 GB cap
host volumes

Folders on the server itself: files, backups, an SQLite database per mini-app, and an SQLite database per table in Tables. The Tables folder is mounted into server/web and server/api alike, because the handlers run in both.

bind mountsSQLite
  • HTTP + bearer (internal)
  • WebSocket (internal)
  • Docker socket (updater, sandboxd, autoheal)
  • no published ports
Sidecarshelpers, internal-only, and each one that stays running has its own memory cap
tika

Reads the document formats the built-in parsers miss. It runs on your box, so the bytes never leave it. Always on a full box; on a core box it starts with the Helpers switch.

HTTP :99981.5 GB cap
browser

Makes PDF exports and renders drawings to images. A headless Chromium, driven with puppeteer-core, prints the app’s own signed-in page, so an exported PDF reuses the live CSS. A bad render dies here, not in web. Same Helpers rule as tika.

WebSocketpuppeteer1.5 GB cap
media

Turns video and audio into transcripts, through yt-dlp and ffmpeg. Reads CAD drawings too: DWG through LibreDWG, DXF through ezdxf, and DWF plot sets. Each drawing gives a text digest of its layers and labels, a table of the labels, and a rendered image the vision model can look at. No database, no secrets, no file store.

HTTP :8095bearerServices switch1 GB cap
ollama

Makes embeddings on your own box: EmbeddingGemma at 768 dimensions, behind an OpenAI-compatible API. Off by default, because embeddings are made online by default. When it is in use, the text being embedded never leaves the machine.

HTTP :11434Services switch2 GB cap
tailscale

Lets the brain use a GPU box behind NAT (a machine with no public address, such as one at home), by its MagicDNS name on your Tailscale network, without opening a port. Userspace tailscaled with an outbound HTTP proxy. Always running, and idle until an admin activates it from the settings.

proxy :1055256 MB cap
updater

Installs updates. It has two fixed actions: roll the stack to a new release, and switch an optional service on or off. A roll takes a backup first and is refused if the backup fails. No ports; a file on a private volume triggers it.

Docker socket128 MB cap
migrate

Gets the database ready before anything else starts. A one-shot container from the server image: on each start it runs the database migrations, creates the pg-boss schema, the DBOS system database and the file bucket if they are missing, then exits. Every app service waits for it to finish.

one-shotrestart: no
autoheal

Restarts a worker that is still running but has stopped working, as its liveness probe shows. It touches only containers labelled for it, never Postgres or the front door.

Docker socket64 MB cap
  • HTTPS egress: every kind is listed in the wire table
Outboundmodel calls, your accounts, and the features you turn on
Model providers

Chat, embeddings, vision, speech and images, through OpenRouter or a direct adapter, and a route can have a backup. Keys live in the encrypted vault and tools refer to them by a handle, so the key itself never reaches a tool, a trace or a chat.

HTTPSvault refsprimary + backup
Your accounts and the rest

Your own mail, Microsoft, Telegram and calendars, a push relay for phones, peer brains, web fetch, release checks and image pulls, and Let’s Encrypt. Most start only when you connect an account or turn a feature on.

HTTPSIMAPSMTP

Solid boxes are the default stack on a full box. Dashed boxes are opt-in: they ship today, and start when an admin switches them on in Settings > Services or with an install flag. A memory cap stops a leak from spreading; it does not reserve the memory.

The one gate

Every way in passes one gate

The app, the phone, MCP, an API key, an assistant and a public link all come in through the same gate. It asks who is calling and finds the rule for what they want to do, then hands the request on as a named actor. From there the database decides what that actor may read and change.

Every way in

  • The app
  • The phone
  • MCP
  • An API key
  • An assistant
  • A public link

One gate

  1. Who is calling?
  2. Which rule covers what they want to do?
  3. Which workspaces may it touch?

No rule for it, no way through.

A named actor

  • A person
  • A key
  • An assistant
  • A link
  • A linked brain
  • The system, by name

The database decides

  • Row rules on every read
  • A check on every write
  • The same answer in the app, on the phone, over MCP and the API

The rules live in the database

Every statement runs as its actor, and Postgres decides: row rules on every read, a check on every write. So the app, the phone, MCP and the API all get the same answer, and a route or a tool that forgets a check still cannot return the wrong row.

Hidden looks like missing

An item you may not read answers “not found”, the same as one that never existed. An item you may read but not change answers “forbidden”.

Later work runs as you are then

A scheduled run or an approved action is judged with the asker’s rights at the moment it runs. If their access went in the meantime, it is refused.

Keys and linked brains only narrow

A key acts as the login that made it, as that login is now, and can be held to read only. Neither a key nor a linked brain may change a page or a note that others read.

The checks stay on

Every box runs both database checks on. Turning one down needs an operator’s reason, leaves a record, and every process logs a security line until it is back.

Workspaces

Who sees what

People reach a brain through workspaces: one for each team, site or client. A person sees what their workspaces hold, and nothing else.

Workshop

  • Fitter Moderator
  • Apprentice
  • Pump manual
  • Shift log

Finance

  • Clerk Moderator
  • Contracts
  • Pump manualgranted from Workshop · Write off

Fitter (only you)

  • Fitter
  • Draft notes

Admin runs the brain: settings, logins, assistants, connectors and keys. Its users read only what is granted to the workspaces they are in.

The fitter reads the workshop’s items and their own notes, but not the contracts: to the fitter, those do not exist. The clerk reads the pump manual and cannot change it, because that grant has Write off.

One login, no rights of its own

Every person has one login, from an invite or Add login. What they read and change comes only from the workspaces they are in.

Shared by a grant, with a Write switch

Every item has one home workspace. It is shared by a grant to another workspace, and each grant has its own Write switch. People change an item when Write is on, or when they moderate its home.

Moderators run a workspace

A Moderator adds people and edits the workspace. Only an Admin user ticks someone as a Moderator.

One Admin workspace runs the brain

Its users manage settings, logins, assistants, connectors and keys. Managing is not reading: an Admin user reads only what is granted to the workspaces they are in, and never another person’s chats or private workspace.

Nothing is shared by itself

No grant happens on its own. The one exception: an item placed in a shared folder takes the folder’s grants, and the dialog says so before you confirm.

One assistant per workspace

It reads only that workspace’s items, and changes one only for a person who could change it by hand. Remove someone from a workspace and they lose its items at once.

Linked brains

Brains share by grant, never by default

Two MantleOS brains can answer each other’s questions. Each stays separate, with its own owner, and the two meet only at the border: your brain asks mine, and mine answers only from what it was told to share. Taking a grant back works at once.

Two tokens, one per direction

The token the other brain gave us is stored sealed, because we send it with each call. The token we made for them is kept only as a hash. No inbound secret is stored in a form that can be read back.

Grants are explicit

Grant one document, or a whole kind, worked out each time a question arrives, so granting Pages includes pages written later. Secrets never; email and journal only one document at a time.

The answer is an intersection

A peer gets only what it asked for that is also granted to it. Ask for an ungranted document and the answer is a 404, the same as for one that was never there.

One cross-brain question

  1. The asking brain calls

    Its agent posts the question to the other brain’s federation endpoint with the outbound token.

  2. The answering brain identifies it

    It hashes the token and matches it in a unique index, before anything is read.

  3. The read is scoped at the source

    The search runs only over what that peer’s grants cover, so nothing ungranted is fetched.

  4. It is on the record

    Every cross-brain read opens its own trace, so the owner sees who asked what, and when.

Revoking a peer closes both directions at once. Pairing needs no order: each side adds the other by URL, hands over the token it made, and pastes the one it receives.

Why it is shaped like this

Three choices, and what each one gives you

One database does the plumbing

You back up one thing, restore one thing, and have one thing that can be down. Postgres carries the queue (pg-boss), the journal (DBOS), the event bus (LISTEN/NOTIFY) and the search-by-meaning index (pgvector). No Redis, no Kafka, no separate vector database.

The client holds no secrets

The owner UI has no database credentials and no session key. It reads the server’s address when it runs and talks to it with a bearer token, so one image serves any install.

The runner has no front door

server/api is reached only through Postgres: work is queued for it, and it answers over NOTIFY. A process with no HTTP surface gives an HTTP attack nothing to hit, and a turn survives a restart or a week parked on a question for you.

The boundary

What holds when something goes wrong

What a security review asks next: what stops a persuaded model, a hostile document or a broken helper from turning into a leak.

Ingested content is data, never instructions

Every email, page and message that comes in is content the agent reads, never text that can steer it. That is what makes it safe to leave a brain running with access to your inbox.

Choosing a tool is not permission to use it

The tool the model reaches for is only a request. Tool groups are the hard limit, checked on the server on every call, so a model that has been talked into something still cannot go past its grant.

Diagnostics may be cleaned. Data never is.

Retrieved content is handed to the model word for word, never paraphrased, which is what lets you check a citation. A trace keeps ids and reason codes, not your text, and error text has secret values swapped back to their references.

Secrets are referenced, never written out

API keys live in an encrypted vault, and tools refer to them by a handle. The key never reaches a tool definition, a trace or a chat transcript.

Three containers hold the Docker socket

The updater, the sandbox supervisor and autoheal hold it, which is root on the host. So each has no published port, a fixed set of actions, and is triggered only through a private volume or a call with a bearer token.

A second brain is the outer wall

You decide what a brain may read, and what it may run. Past that, a second brain is the boundary, and any one mistake stays inside one install.

Every wire

Every connection, and what it carries

The picture gives the shape. These lists give every connection in a default install, with its real transport. Open a group to read it.

Getting in6 wires

Only one container answers on the network: Caddy, the web server at your brain’s address, which handles HTTPS and passes each request inside. The backend container, web, also opens a loopback port on the host (3000 by default) for local checks, and nothing outside the machine can reach it. Every other part is reachable on the internal Docker network and nowhere else.

FromToTransportWhat it carries
MantleOS apps (web, desktop, mobile)caddyHTTPS :443 · HTTP/3 (QUIC) · :80Your apps reach the brain at one domain by default, and Caddy routes each request by its path. A second layout puts the owner UI on its own domain. Once the brain has a domain name, its certificates are issued and renewed automatically.
caddyclient-web:3000reverse_proxy, internal networkMantleOS web, the owner UI: every path the server does not own. It reads the server’s address from /env.js each time a request arrives.
caddyweb:3000reverse_proxy, internal networkThe paths the server owns: /api (with the SSE endpoints and /api/mcp), the share pages, the print view, the scripts that run share pages and mini apps in the browser, and the MCP OAuth discovery documents.
MantleOS web and desktopserver/web /api/**HTTPS · session cookie or Authorization: BearerEvery read and every write. The app bundle holds no server actions and no database code. On the default single domain, the browser sends its session cookie. A client on another origin sends a bearer token (a key carried with each request), and only origins an admin lists may call across. Sign-in by browser cookie refuses every token made for one narrow job, such as a phone token or an asset link, so none of them can pass as a full session.
MCP client on the serverserver/mcpstdio JSON-RPC (local process)The full owner tool set, with no network hop. Starting this process already takes owner access to the box.
Remote MCP clientserver/web /api/mcpHTTPS + OAuthThe same tool set. It is registered once, in packages/mcp-core, so the local and remote doors cannot drift apart. The one exception is the terminal tool, which stays off over HTTP unless the operator turns it on. The endpoint itself is off until an admin turns it on. A user who connects gets only what their own workspaces hold.
Answering a message9 wires

A turn is one message and the work of answering it. The turn runs in one process, and the browser’s connection is held by another: always two. Postgres has been the bridge between them from day one.

FromToTransportWhat it carries
MantleOS appserver/web POST /api/assistant/turnHTTPS → 202 Accepted with a turn idThe route queues the turn and returns at once, without waiting for the reply. So the turn survives a reload, a move to another page, or a tab left in the background. An attached file is read first, inside the request.
server/webserver/apiDBOS enqueue over PostgresThe workflow input. server/api has no HTTP surface, so everything reaches it through Postgres: this queue, plus LISTEN channels for Stop, Telegram, routines and indexing.
server/apiPostgres system DBDBOS journalEvery completed step. If the process crashes mid-turn, it replays the journal and carries on from the last good step instead of running the turn again.
server/apiserver/webpg_notify(turn_stream), ~8 KB limit per messageTurn events: turn-start, status, reasoning and text deltas (each new piece as it is written), then done or error. Postgres caps one NOTIFY at about 8 KB, so each event carries one small delta, never a batch.
server/apiturn_stream_bufferINSERT, 15 min TTL, keyed by (turn, seq)A replay log, written before each NOTIFY. NOTIFY keeps no backlog, so an app that reconnects with Last-Event-ID gets the missed events replayed, then follows live.
server/webMantleOS appSSE on GET /api/assistant/turn/:turnId/streamThe same events, in the same shape, for the MantleOS web, desktop and mobile apps. If an event cannot be written as JSON that every client could render, it is modelled wrong.
server/webserver/apipg_notify(turn_cancel)Stop. The runner aborts the model call at once and keeps the part of the reply that has already streamed.
server/apiassistant_messagesdurable writeThe answer, written by the runner: a pending row first, then the final text. Saving the reply and showing it live travel separate paths on purpose. The live stream is never journaled, so a crash mid-stream loses the animation, not the reply.
telegram_messages INSERTserver/apipg_notify(telegram_message_inserted) via triggerA Telegram message starts its own durable workflow in the same runner, and the runner sends the reply back through the Bot API. These turns have no live stream.
Acting on its own5 wires

This is the other half of the product: work that no person starts. A heartbeat is a routine that has an agent do a job on a schedule without being asked, such as a weekly check on the brain’s health. A clock starts it, and it runs through the same tool loop as a chat turn.

FromToTransportWhat it carries
server/api (internal tick)heartbeatsevery 60s; on failure the wait doubles, up to 30 minFind up to 10 routines whose next fire time has passed. The backoff uses the same ticker as the reflector, so a flaky database or provider cannot set the loop spinning.
Gate checkfire / skipearliest_at → cooldown → quiet hours → idleFour gates decide whether a due routine fires now, cheapest first. Each gate is off unless the routine sets it, and Fire now skips all four. Quiet hours use the routine’s own timezone, or else the owner’s profile timezone. The idle gate checks that you have not been active lately, and applies only to a routine that posts to Telegram.
A fired heartbeatthe tool loopin process, not a DBOS workflowThe same tool loop as a chat turn, traced, with the agent’s own tool grants plus the routine tools. It is not journaled: if the process stops mid-fire, the routine fires again on the first tick after the restart.
server/webserver/apipg_notify(heartbeat_due, ownerId)The fast wake-up. A routine you create or edit does not wait up to a minute for the next tick: server/web sends a notice, and the runner is listening. Fire now does not use this wire. It runs the routine at once, inside server/web.
The agentits own routinesfive builtin toolscomplete, snooze, update_state, list, fire. The assistant manages its own schedule, so a routine can decide it is done, or put itself off until Tuesday.
Keeping the screen up to date4 wires

The screen redraws because the database said something changed, not because a timer went off.

FromToTransportWhat it carries
nodes INSERTserver/web · server/apipg_notify(node_ingested) via triggerEvery new item in the brain (each item is a row in the nodes table), whatever put it there. Edits send the same signal from code. The extractor in server/api listens too, and that signal is what starts indexing.
Extractor (server/api)server/webpg_notify(node_indexed)The second signal: the item now has its summary and its embedding. The insert alone has no summary yet, which is why one channel was never enough.
server/webMantleOS appSSE on GET /api/realtime, per ownerA change signal, filtered by type: new and indexed items, approvals, runs, tasks, comments and the file tree. Each server/web process holds one LISTEN connection, and that one connection serves every open tab and every stream. Owners are kept apart on the server, so one owner’s change is never sent to another.
Postgresworker_pushLISTEN, its own connectionNew replies, approvals, items that need you, and login notices: the events that turn into a phone notification.
Bringing your data in8 wires

Ten workers on a full box and four on a core box, all from one image, with no message broker to run. Five of them take jobs from pg-boss queues inside the same Postgres. The others long-poll, watch a folder, run a timer, or LISTEN.

FromToTransportWhat it carries
worker_emailYour mail providerIMAP over TLS, every 2 minBrings in new mail from your own mailbox. There is no mail server (MTA) to run, and your contacts list decides whose mail is read. Mail the agent writes leaves from the process that runs the tool.
worker_telegramTelegram Bot APIHTTPS long-pollBrings messages in, with one poll loop per bot. The agent’s replies leave from server/api. This worker sends only pairing and approval prompts.
worker_microsoftMicrosoft GraphHTTPSBrings in SharePoint, OneDrive and Outlook mail. Tokens refresh against the Microsoft sign-in service.
worker_filesHost filesysteminotify over a bind mountMirrors edits made outside MantleOS back into the brain, whether they come from vim, Syncthing or a plain cp. The server tells the worker the moment a file in the shared folder changes. Loop-safe: a file whose bytes already match is not written again.
worker_calendariCal feedsHTTPS, every 2 minBrings in events from the calendar feeds you add.
worker_eventsTelegram · worker_push30s pollSends a reminder when its remind_at time passes, to Telegram or to the phone. The same tick runs scheduled backups.
worker_docs · worker_maintenance · worker_runsPostgres · server/apifolder watch · pg-boss cron · pg-boss queuesworker_docs indexes the bundled docs for the collections you turn on. worker_maintenance runs a nightly cleanup sweep. worker_runs takes queued runs and hands their agent turns to the runner, and stays idle until runs are turned on.
All workersPostgresDrizzle poolEvery row they write, through a shared pool of database connections. The one-shot migrate container creates the schema, the pg-boss schema, the DBOS system database and the file bucket first, so no worker races to create them.
The helpers8 wires

None of these sidecars is published on the network. Each has its own memory cap, so a crash or a leak in one stays inside that container.

FromToTransportWhat it carries
server/api · server/webtikaHTTP :9998, internalReads the file formats the built-in parsers miss, mostly for the extractor. Its heap is capped, because a 24 MB deck unzips to many times its size as XML.
server/webbrowser (Chromium)WebSocket, puppeteer-corePDF export, and drawings rendered to images. The app has Chromium print the app’s own page with a scoped render cookie, so the export reuses the live CSS byte for byte.
server/web · server/apimediaHTTP :8095 + bearer, internalVideo and audio (through yt-dlp and ffmpeg) and CAD drawings: DWG through LibreDWG, DXF through ezdxf, and DWF plot sets, each with a rendered image. Opt-in. No database, no secrets, no file store.
server/web · server/apisandboxdHTTP :8090 + bearer, internalCreates, runs, stops and lists code sandboxes. The sandboxes sit on their own network with no route to Postgres, RustFS or web. Each sandbox gets open internet, an allowlist proxy, or no network.
server/web · server/api · workersollamaHTTP :11434, OpenAI-compatibleLocal embeddings at 768 dimensions. Opt-in. When it is in use, the text being embedded never leaves the machine.
server/web · model callstailscaledLocalAPI over a shared unix socket · HTTP proxy :1055Reaches a GPU box behind NAT by its MagicDNS name. It always runs, and stays idle until an admin activates it in the settings.
server/web · server/api · workersrustfsS3 SDK, internal networkThe bytes of files and attachments. Private bucket, no published port, no anonymous access.
server/api and the ten workerstheir own healthchecka liveness file, touched on a timerA process saying it is alive. This is also called a heartbeat, confusingly, and has nothing to do with the routines above. autoheal reads it to restart a process that has quietly stopped working while still running. web, Postgres and the sidecars have their own probes, and autoheal never restarts Postgres, the object store, caddy or web.
What leaves the machine8 wires

Every kind of traffic that leaves the machine. Most of it starts only when you connect an account or turn a feature on.

FromToTransportWhat it carries
server/api · server/web · workersModel providersHTTPSChat, embeddings, vision, speech, images and web search, sent direct or through OpenRouter. A route can have a backup set up. Embeddings are made online by default. With the local embedder in use, the text being embedded stays on the box.
Workers · server/api · server/webYour own accountsIMAP · SMTP · Graph · Bot API · iCalMail, files, messages and calendars from services you already use, on your own credentials. Telegram replies and mail the agent sends leave from the process that runs the turn. Nothing runs until you connect an account.
worker_push · server/webPush relayHTTPSNotifications for a phone where the app is not open. Each one is sealed for its device before it leaves. Nothing is sent until a phone connects.
server/web · server/apiPeer brainsHTTPS + bearerQuestions and answers between brains (federation), and only with peers you added.
Agent tools · media · sandboxesThe webHTTPSWeb fetch (which cannot reach private or metadata addresses), a crawl service once you add its key, the MCP connectors and HTTP tools you add, video downloads on the media sidecar, and sandbox traffic at the network tier you set.
server/web · updaterGitHub releases · image registriesHTTPSA check for a new release, and the image downloads for an update you start.
tailscaleTailscaleHTTPS · WireGuardCoordination and relay traffic, only after an admin activates the tailnet (your private Tailscale network).
caddyLet's EncryptACME (HTTP-01 / TLS-ALPN-01)Issuing and renewing certificates.

Run it on your own server.