Skip to content

PointSav Documentation

The engineering library for the PointSav platform — operating systems and services for regulated businesses that own their data, their AI, and their record-keeping outright. Where the monorepo holds the code, this wiki holds the reasoning: architecture, services, security, and the governance commitments that bind future development.

Enroll a PPN node

← All revisions

f99f9774 · PointSav Digital Systems ·

feat(machine-authorization): rewrite Machine authorization guide group against real source, split into own category

View the full record as of this revision →

@@ -0,0 +1,91 @@
---
schema: foundry-doc-v1
title: "Enroll a PPN node"
slug: enroll-ppn-node
short_description: "Enrolls a machine into a PPN compute fleet by setting service-vm-host's three required environment variables, running it under systemd, and confirming the node in the controller listing."
category: machine-authorization
index_group: fleet-enrollment
content_type: how-to
type: how-to
quality: complete
status: active
audience: "Engineers (hands on keyboard); fleet operators"
last_edited: 2026-08-06
editor: pointsav-engineering
paired_with: enroll-ppn-node.es.md
research_trail:
  sources: [pointsav-monorepo service-vm-host (environment-variable configuration, heartbeat loop), service-vm-fleet (route table, node record struct, staleness sweep, in-memory state), infrastructure systemd unit for service-vm-host]
  verification_method: "independently source-verified against pointsav-monorepo on 2026-08-06 by reading the Rust source directly, with file:line citations recorded per claim; the three required and three optional environment variables, their exact defaults, the hardcoded controller port, the full route list, the replace-not-merge heartbeat semantics, the 30-second staleness drop, and the absence of both a /healthz route and any ledger write were each confirmed at their definition site — correcting an earlier, unverified correction note that had claimed a 30-second default heartbeat interval (the real default is 10 seconds) and a WORM ledger entry per heartbeat (no such write exists anywhere in this code)"
---

## Prerequisites

- The `service-vm-host` binary deployed on the machine you are enrolling
- Network reachability from that machine to the fleet controller on port 9203 — the controller's port is hardcoded and not configurable
- A node identifier unique within the fleet
- The node's WireGuard IP address
- systemd, or another supervisor that restarts a failed process

## Purpose

Register a machine with `service-vm-fleet` by starting the per-node heartbeat agent on it — about five minutes, after which the node appears in the controller's listing within one heartbeat interval.

## Procedure

1. Set the three required environment variables for `service-vm-host`. The agent has no CLI flags and reads no config file; it refuses to start unless all three are present:

   ```bash
   VM_FLEET_ENDPOINT=http://<fleet-controller-host>:9203
   VM_NODE_ID=<unique-node-identifier>
   VM_WG_IP=<node-wireguard-ip>
   ```

2. Optional: override any of the three defaults, each of which is usable as shipped:

   | Variable | Default | Effect |
   |---|---|---|
   | `VM_HEARTBEAT_INTERVAL_S` | `10` | Seconds between heartbeats to the controller |
   | `VM_SPAWN_PORT` | `9204` | Port the agent's own local API listens on |
   | `VM_RESERVED` | `false` | Marks the node last-resort-only for placement |

3. Start `service-vm-host` under systemd, configured to restart automatically on failure. The agent begins heartbeating to `POST /v1/nodes/heartbeat` immediately and needs no separate registration call first.

4. Confirm the node reached the controller:

   ```bash
   curl -s http://<fleet-controller-host>:9203/v1/nodes/<VM_NODE_ID>
   ```

## Expected outcome

The node appears in `GET /v1/nodes` and `GET /v1/fleet` within one heartbeat interval — ten seconds with the default. Its record carries `node_id`, `hostname`, `wg_ip`, `ram_available_mb`, `vm_count`, `kvm_available`, `reserved`, and `last_heartbeat` as an RFC3339 timestamp.

## Verification

```bash
curl -s http://<fleet-controller-host>:9203/v1/nodes    # full node list
curl -s http://<fleet-controller-host>:9203/v1/fleet    # whole-fleet status
```

Look for your `VM_NODE_ID` with a `last_heartbeat` no older than one heartbeat interval. There is no `status` field on a node record — recency of `last_heartbeat` is the only liveness signal the controller exposes, and a node that stops heartbeating for more than 30 seconds is dropped from the listing entirely rather than shown as stale or offline. A node absent from `/v1/nodes` is therefore either never-enrolled or more than 30 seconds silent; the API does not distinguish the two.

> **Note:** `service-vm-fleet` has no `/healthz` route. To confirm the controller itself is answering, call `GET /v1/fleet`.

> **Note:** each heartbeat replaces the controller's record of that node wholesale — VMs and resource stats are overwritten, not merged into the previous state.

> **Note:** to inspect a VM, list VMs with `GET /v1/vms` (optionally filtered with `?tenant_id=`) and filter client-side. `DELETE /v1/vms/:vm_id` exists, but there is no GET for a single VM by id.

> **Warning:** fleet state is held in memory on the controller only. If the controller process restarts, every node and VM record is lost until nodes heartbeat again. No ledger entry is written on enrollment or on heartbeat, so a restart leaves no record of what the fleet contained beforehand.

## Rollback

Stop the `service-vm-host` process. After roughly 30 seconds without a heartbeat the controller drops the node from its listing on its own. No unenroll call is needed, and none exists.

Re-enrolling is the same procedure: start the agent again with the same `VM_NODE_ID` and the node reappears at the next heartbeat.

## Next steps

- [[add-a-fleet-node]] — the fleet-side companion procedure
- [[service-vm-fleet]] — the controller's state model and route surface
- [[ppn-small-business-compute]] — the fleet architecture this node joins
- [[os-infrastructure-ppn-node]] — the node image built around this agent
Important Information

Corporate structure. PointSav Digital Systems ("PointSav") is currently a trade name of Woodfine Capital Projects Inc. ("Woodfine"), planned to become a wholly-owned Woodfine subsidiary upon incorporation. PointSav does not itself offer, sell, or solicit any security. Any securities offering associated with Woodfine's real-property direct-hold solutions is made exclusively by Woodfine, and only by means of the applicable Private Placement Memorandum.

No investment advice. This wiki's content is provided for engineering, operational, research, and development purposes. Nothing on this wiki constitutes investment advice or a solicitation to invest in any Woodfine partnership or direct-hold solution.

Intellectual property. The PointSav name, trade name, wordmark, and marks, together with all current and future PointSav- and Totebox-branded products, services, and offerings — and the software, source code, documentation, design system, and all related materials — are proprietary to Woodfine and its affiliates, except for components identified as open source. No rights are granted except as expressly set out in a written license or agreement. The full trademark notice appears in the footer of every page on this site.

Open source components. Portions of the platform are made available under permissive open-source licenses identified in the accompanying repository. Use of those components is governed by their respective license terms.

No warranty; informational use. Content on this wiki is provided for general informational purposes only and does not constitute a representation, warranty, or commitment with respect to product functionality, availability, pricing, or roadmap. Some articles describe planned or intended features, capabilities, and milestones — language such as "planned," "intended," "targeted," "may," and "expected" marks this forward-looking content, which is subject to change and does not constitute a commitment regarding future performance.

Confidentiality. Where an article describes an operational or deployment detail that is not intended for public disclosure, that article is not published on this wiki. Content here is general-purpose engineering documentation, not customer-specific configuration.

Jurisdiction. Woodfine Capital Projects Inc. is organized in British Columbia, Canada. References to the Sovereign Data Foundation on this wiki describe a planned or intended initiative only, not a current equity holder or active governance body.

Changes to this notice. PointSav may update this notice from time to time; the version posted on this page governs.

Not a filing system. This wiki is not a securities filing system, an electronic disclosure repository, or a substitute for SEDAR+ or any other regulatory filing system. Formal securities filings are made through the applicable regulatory filing system, not through this wiki.

Full disclaimer. This notice supplements, and does not replace, the full Disclaimers article. In the event of any conflict, the full Disclaimers article governs.

Read the full disclaimer →