RPC & API reference

PearDock speaks protomux-rpc over HyperDHT. Methods and push channels are defined in shared/protocol.js. This page summarizes groups for operators and integrators.

i
There is no public HTTP API. The only control surface is the P2P RPC session after Noise handshake. Typed helpers live in client/api.js.

Handshake

On connect, the client calls handshake. The server returns:

Roles

RoleTypical access
viewerList/read, stats, logs (read), tunnel list
operatorStart/stop, deploy, tunnels, most mutations
adminPeers, vault, unrestricted CLI (if enabled), ACL

Exact method→role map is in server ACL (server/core/acl.js / MethodRoles).

Method groups (client → server)

Session & system

Containers

Images, volumes, networks

Stacks & GitOps

Swarm (feature-gated)

Peers, vault, access

Holesail tunnels

Schedules

Pushes (server → client)

ChannelPayload (conceptually)
push:containersContainer list deltas / refresh
push:allStatsLive CPU/mem/net stats
push:logsLog lines for open streams
push:pullProgressImage pull layers
push:buildProgressBuild / compose build output
push:dockerEventEngine events
push:terminalOutputPTY bytes for exec sessions

Integrating programmatically

Use the same stack as the desktop client:

  1. Open a HyperDHT connection to the server public key.
  2. Attach protomux + protomux-rpc.
  3. Call handshake, then domain methods.
  4. Subscribe to push channels as needed.

Reference implementations: client/connection.js, client/api.js, client/manager.js.