KernDocs
KernGitHub ↗

Internal architecture

Inside a Kern host

The fixed Unix identities, services, sockets, database roles, and privilege boundaries inside one host.

One host, narrow services

Kern separates the operator UI, agent runtimes, internet policy, bundled tools, workspaces, embeddings, tunnel connector, and database into distinct Unix identities. A compromised component reaches only its own files, sockets, network destinations, and database tables.

OperatorSSH / HTTPS
One Kern host · fixed Unix identities
kern-adminAdmin API
kern-workspaceChat · Apps · Memory · Schedules
kern-agentAgent runtimes + agent-home
kern-proxyInternet policy
kern-toolsBundled actions + secrets
PostgresPeer-authenticated roles
Unix sockets + peer credentialsnftables + scoped DB rolesRoot-owned bounded helpers

Fixed UIDs and GID

Service ids are pinned so ownership on durable volumes remains meaningful when Kern replaces the disposable root volume and its /etc/passwd file.

IdentityIDOwns or runs
kern-adminUID/GID 47741Admin API and full admin-state database role
kern-proxyUID/GID 47742Policy proxy, proxy CA material, and Git quarantine
kern-agentUID/GID 47743Codex, Claude Code, Grok, Hermes, schedules, and agent-home
cloudflaredUID/GID 47744Optional Cloudflare Tunnel connector
postgresUID/GID 47745Local kern_admin Postgres cluster
kern-toolsUID/GID 47746Bundled tool service and credentials
kern-agent-networkUID/GID 47748Read-only policy and network-event service
kern-workspace-apiGID 47749Peer-authenticated admin socket shared group
kern-workspaceUID/GID 47750Chat, Apps, Memory, Schedules, and Workspace agent API
kern-embeddingUID/GID 47751Local socket-activated ONNX text encoder

What each principal cannot do

PrincipalImportant boundary
kern-operatorThe deliberate exception: human SSH access has full passwordless sudo.
kern-adminNo internet egress; only a fixed set of root-owned helper commands may cross boundaries.
kern-agentNo sudo, database role, direct off-host network, secrets store, or access to other services' state.
kern-toolsNo sudo; only tool tables, shared secret-key read, DNS, and outbound HTTPS for tool APIs.
kern-proxyNo sudo; narrow policy/event database grants and only DNS plus TCP 80/443 egress.
kern-workspaceNo secrets or egress; DML only on its named Workspace tables.
kern-agent-networkRead-only policy/event database grants and no egress.
kern-embeddingNo home directory, secrets, database, or network namespace.

Deliberate boundary crossings

The identities above never speak over the network. Each pair that must cooperate gets exactly one Unix socket, and the kernel tells the listening service which user is on the other end, so a caller cannot claim to be someone else.

CallerReachesOver this socketAnd may only
kern-agentkern-tools/run/kern-tools/tools.sockCall bundled tools that the operator enabled. Credentials stay on the kern-tools side.
kern-adminkern-tools/run/kern-tools/tools.sockManage and test tool configuration. No other user is admitted on this socket.
kern-agentkern-workspace/run/kern-workspace/agent.sockUse the bounded /agent/ routes for chat, memory, Apps, and schedules.
kern-agentkern-agent-network/run/kern-agent-network/agent-network.sockRead its own policy and denials. Read-only, and kern-tools gets no policy access this way.
kern-workspacekern-admin/run/kern-admin-api/workspace.sockCall allowlisted host thread routes, such as sending or stopping a turn, authorized by the fixed kern-workspace-api group.
kern-admin, kern-workspacekern-embedding/run/kern-embedding.sockAsk for an embedding. The encoder reads only the root-owned local model.