2.6 KiB
2.6 KiB
Mesh Small Node Operations
Mesh should remain practical on modest machines and home nodes. These targets turn that value into an operational checklist.
Small Node Target
A small node is expected to run with:
- one Go server process;
- SQLite storage on local disk;
- a reverse proxy terminating TLS;
- no background job queue beyond Mesh's own sync workers;
- enough memory to run comfortably on a 1 GB VM or small home server.
Default Posture
- Keep
MESH_ADDRbound to loopback behind a reverse proxy. - Set a stable
MESH_TOKEN_SECRET_HEXbefore production use. - Set
MESH_NODE_IDENTITY_KEY_FILEexplicitly so node identity survives process restarts and deploys. - Leave direct purchases, LAN discovery, and node sync disabled until the node operator intentionally enables them.
Resource Targets
- Idle CPU should be near zero when there are no active syncs, WebSockets, or background reconciliation tasks.
- SQLite is the primary state store; avoid adding external services for core sync paths.
- Batch limits should favor bounded memory over maximum throughput.
- Old protocol clients should remain compatible through the published window instead of forcing immediate upgrades.
Inspectability Checklist
Operators should be able to answer:
- Which node identity key is this process using?
- Which protocol versions are accepted?
- Which app registry authority is trusted?
- Which apps and collection prefixes are active?
- Which peers are paired or configured?
- Which data surfaces are server-readable by design?
Current endpoints that help answer those questions:
GET /api/v1/nodeGET /api/v1/node/peersGET /api/v1/appsGET /api/v1/apps/{app_id}GET /api/v1/sync/diagnosticsGET /metrics
Rollout Checks
Before exposing a node publicly:
GET /healthzreturns 200;GET /readyzreturns 200;GET /api/v1/nodeshows the expected node name and protocol bounds;/metricsis protected byX-Mesh-Adminwhen an admin token is set;- backups include the SQLite database and node identity key;
- the
<database>.blobsand<database>.heldfolders sit beside the database on the same filesystem: a deleted account is moved to.heldfor 30 days, and backups of deleted data must not outlive that. To delete a held account at once, set itspurge_afterinserver_account_holdsto 0; the hourly retention job removes it; - blobs an account moves to its trash stop counting toward its storage and are
deleted after
MESH_TRASH_PURGE_DAYS(30 by default); a private node that archives the owner's photos sets it to 0 and keeps them; - restore has been tested on a separate machine or directory.