WireGuard startup in setup and new-boot acceptance

Enable without restarting the tunnel, a separate reboot and independent private-channel acceptance after a new boot.

A textile server with startup and acceptance cards, joined to a separate node by a braided channel.

After private-channel acceptance I joined two further stages to host setup: server startup enablement and separate acceptance after a new boot. Reboot itself remains a separate operation with its own plan. The fixture uses isolated Debian server and Ubuntu client nodes; the client stayed on during server reboot.

Enable begins with accepted runtime

The profile below uses fictional paths and SHA placeholders. It references the original runtime-start plan for the accepted private channel. The original request retains key/firewall bindings, while a separate current request proves actual machine/boot identity through console evidence. Enable accepts no future reboot plan and grants no server reboot authority.

{
  "schema_version": 1,
  "entry_mode": "clean",
  "environment_file": "/private/example-administrator.env",
  "wireguard_lifecycle": {
    "stage": "enable",
    "request_file": "/private/example-original-request.json",
    "node_file": "/private/example-server-node.json",
    "current_request_file": "/private/example-current-console-request.json",
    "runtime_plan_file": "/private/example-original-runtime.plan.json",
    "runtime_plan_sha256": "<ORIGINAL_RUNTIME_PLAN_SHA256>"
  }
}

Enable without restarting the tunnel

After plan review, apply invoked original startup-enable without restarting the service. Enabled state changed while InvocationID and the current service start instant stayed intact. Configuration remains in /etc/wireguard/${WG_IF}.conf with root ownership and mode 0600; the private key was not exported. JSON selects actual response fields. reboot_required separates enablement from post-reboot verification.

deploy-cli host setup plan \
  --profile-file "$ENABLE_PROFILE" --plan-file "$ENABLE_SETUP_PLAN"
deploy-cli host setup apply \
  --plan-file "$ENABLE_SETUP_PLAN" --plan-sha256 "$ENABLE_SETUP_SHA256" \
  --approve-local-write --approve-privileges
deploy-cli host setup verify \
  --plan-file "$ENABLE_SETUP_PLAN" --plan-sha256 "$ENABLE_SETUP_SHA256" \
  --completion-sha256 "$ENABLE_COMPLETION_SHA256"
{
  "status": "passed",
  "scope": "server-wireguard-enable",
  "wireguard_startup_enabled": true,
  "reboot_required": true,
  "host_write_performed": true,
  "host_write_state": "changed",
  "runtime_ready": false,
  "whole_host_ready": false
}

Why the old completion is not renewed

Original runtime was accepted with startup disabled. Startup-role inspection reads enabled state while retaining original runtime files. After reboot, old runtime and enable completions also rejected the new boot without writes. Selected actual old-enable refusal fields follow. I did not edit old files or append new SHA values to them.

{
  "status": "failed",
  "error": "setup current wireGuard preparation verification refused",
  "host_write_attempted": false,
  "local_write_attempted": false
}

A separate reboot plan

The clean fixture had a fallback kernel and consistent normal UEFI order prepared in advance. I separately reviewed, applied and verified the boot-menu plan, then created and dispatched reboot-request once. Dispatch acknowledgement proves no new boot: after the node returned I ran reboot verify and logged in through serial console again. Before that, upper postboot planning refused without server writes.

deploy-cli host boot-menu plan \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST" \
  --plan-file "$MENU_PLAN"
deploy-cli host boot-menu apply \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST" \
  --plan-file "$MENU_PLAN" --plan-sha256 "$MENU_PLAN_SHA256" --approve-privileges
deploy-cli host boot-menu verify \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST"
deploy-cli host reboot plan \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST" \
  --plan-file "$REBOOT_PLAN"
deploy-cli host reboot request \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST" \
  --plan-file "$REBOOT_PLAN" --plan-sha256 "$REBOOT_PLAN_SHA256" --approve-privileges
# After the node returns:
deploy-cli host reboot verify \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST"

A new boot needs a new request

The postboot profile points current request at new console evidence. Administrator, SSH key and sudo input remain original. The immutable runtime plan is joined by original enable and specific reboot plans with their own SHA values. That reboot must match the server checkpoint. The following is a separate illustrative stage profile, not an edit to the earlier enable profile.

{
  "schema_version": 1,
  "entry_mode": "clean",
  "environment_file": "/private/example-administrator.env",
  "wireguard_lifecycle": {
    "stage": "postboot",
    "request_file": "/private/example-original-request.json",
    "node_file": "/private/example-server-node.json",
    "current_request_file": "/private/example-new-boot-console-request.json",
    "runtime_plan_file": "/private/example-original-runtime.plan.json",
    "runtime_plan_sha256": "<ORIGINAL_RUNTIME_PLAN_SHA256>",
    "startup_plan_file": "/private/example-original-enable.plan.json",
    "startup_plan_sha256": "<ORIGINAL_ENABLE_PLAN_SHA256>",
    "reboot_plan_file": "/private/example-original-reboot.plan.json",
    "reboot_plan_sha256": "<ORIGINAL_REBOOT_PLAN_SHA256>"
  }
}

Post-reboot apply only prepares the acceptance pause

Postboot apply checks new boot, original plans and journal, then saves a pending checkpoint on the operator machine. It has no server writer. awaiting-acceptance leaves another explicit pause for independent checks. JSON below selects actual response fields.

deploy-cli host setup plan \
  --profile-file "$POSTBOOT_PROFILE" --plan-file "$POSTBOOT_SETUP_PLAN"
deploy-cli host setup apply \
  --plan-file "$POSTBOOT_SETUP_PLAN" --plan-sha256 "$POSTBOOT_SETUP_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "awaiting-acceptance",
  "scope": "server-wireguard-postboot",
  "wireguard_startup_enabled": true,
  "acceptance_required": true,
  "local_write_attempted": true,
  "host_write_attempted": false,
  "host_write_performed": false,
  "host_write_state": "none",
  "runtime_ready": false,
  "whole_host_ready": false
}

Repeat access checks

I opened another private SSH session: passwordless sudo refused and password sudo returned root UID. I checked handshake, bidirectional transfer, fresh public SSH/password sudo and independent console access. Control HTTP worked locally but was blocked through WireGuard with an increased drop counter. WireGuard InvocationID changed after reboot and the original firewall started first. The client did not reboot; this run does not test client autoconnect.

Seven confirmations rather than the old six

The following approval is schematic. It adds generic_reboot_verified to six channel and negative-control confirmations. Its SHA pins the original postboot plan, not upper setup. A separately retained commit candidate preserves identical bytes and nonce rather than generating another plan. Old runtime approval refused before copying or intent. True values represent completed checks and must not be filled in beforehand.

{
  "schema_version": 1,
  "plan_sha256": "<ORIGINAL_POSTBOOT_PLAN_SHA256>",
  "acceptance": {
    "new_wireguard_ssh": true,
    "wireguard_password_sudo": true,
    "new_public_ssh": true,
    "public_password_sudo": true,
    "console": true,
    "negative_controls": true,
    "generic_reboot_verified": true
  },
  "proof_file": "/private/example-new-boot-independent-proof.json",
  "proof_sha256": "<NEW_BOOT_PROOF_SHA256>"
}

Explicit new-boot acceptance

After the checks, accept invoked original postboot-accept once and verified the exact accepted plan. wireguard_postboot_ready covers this private channel after a new boot; application runtime and the entire server are not declared ready. Selected actual accept fields follow.

deploy-cli host setup accept \
  --plan-file "$POSTBOOT_SETUP_PLAN" --plan-sha256 "$POSTBOOT_SETUP_SHA256" \
  --applied-sha256 "$POSTBOOT_APPLIED_SHA256" \
  --acceptance-file "$NEW_BOOT_APPROVAL" \
  --acceptance-sha256 "$NEW_BOOT_APPROVAL_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "passed",
  "scope": "server-wireguard-postboot",
  "wireguard_startup_enabled": true,
  "wireguard_postboot_ready": true,
  "host_write_state": "changed",
  "runtime_ready": false,
  "whole_host_ready": false
}

Why check the accepted plan nonce

Before acceptance I created a second original postboot candidate. Its current observation matched, but nonce and SHA differed. After accepting the first, a separate fixture read-only control rejected the second by exact journal SHA without writes. Original programs remain unchanged; an additional reader checks the journal before and after their verification. Actual JSON from that control reading follows.

{"different_nonce_refused":true,"write_performed":false}

Verify without repeating accept

Separate verify and pinned apply replay passed without changing managed server or operator state. Unpinned replay refused. The frame below summarizes saved actual results; commands were not rerun during capture. Client stages, data services, initial packages and interactive credential collection remain to be joined into the broader workflow.

deploy-cli host setup verify \
  --plan-file "$POSTBOOT_SETUP_PLAN" --plan-sha256 "$POSTBOOT_SETUP_SHA256" \
  --completion-sha256 "$POSTBOOT_COMPLETION_SHA256"
# A pinned apply replay also verifies without another accept:
deploy-cli host setup apply \
  --plan-file "$POSTBOOT_SETUP_PLAN" --plan-sha256 "$POSTBOOT_SETUP_SHA256" \
  --completion-sha256 "$POSTBOOT_COMPLETION_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "passed",
  "wireguard_postboot_ready": true,
  "local_write_attempted": false,
  "host_write_attempted": false,
  "host_write_performed": false,
  "host_write_state": "none"
}
A genuine VTE frame summarizing saved two-VM results: enable without restarting the service, a separate reboot and repeated private and public access checks. Commands were not rerun during capture. The client stayed on; its autoconnect was not tested here.
  1. Operations & Security WireGuard on Debian: private SSH access and a post-reboot check
  2. Operations & Security Startup and reboot: firewall, ready FPM, then Nginx
  3. Operations & Security WireGuard firewall through CLI: separate acceptance and explicit rollback
  4. Operations & Security WireGuard through CLI: key and config without starting the tunnel
  5. Operations & Security WireGuard in server setup: start and independent acceptance