WireGuard in server setup: start and independent acceptance

Server runtime through host setup, an explicit acceptance pause and actual private and public access checks.

A paused channel between a server and laptop, with an independent acceptance card in front.

Separate WireGuard commands already create keys, start the tunnel and accept its private channel. I have now connected server runtime to the broader host setup. Starting an interface and confirming independent access remain separate actions.

One server runtime profile

The following profile uses fictional paths. It needs the unchanged original request, server node, separate current-console request and exact plan for an accepted firewall transition. Its SHA pins that original transition apply plan rather than a merely similar policy file. This profile grants no client creation, startup or reboot authority.

{
  "schema_version": 1,
  "entry_mode": "clean",
  "environment_file": "/private/example-administrator.env",
  "wireguard_runtime": {
    "request_file": "/private/example-original-request.json",
    "node_file": "/private/example-server-node.json",
    "current_request_file": "/private/example-current-console-request.json",
    "firewall_plan_file": "/private/example-firewall-original-apply.plan.json",
    "firewall_plan_sha256": "<ORIGINAL_FIREWALL_APPLY_PLAN_SHA256>"
  }
}

Why retain two requests

The original request is bound to the existing keys and firewall. Replacing it to supply new console evidence would break that relationship. Current machine/boot authority therefore comes from a separate file; hostname, administrator, SSH key and sudo input must match the originals. A deliberately different administrator was refused before network execution or local publication. Selected actual refusal fields follow.

{
  "status": "failed",
  "scope": "same-boot-server-wireguard-runtime",
  "error": "setup WireGuard current console cannot migrate original credentials",
  "local_write_attempted": false,
  "host_write_attempted": false
}

Starting stops at awaiting acceptance

I reviewed the setup plan and ran apply once. It delegated startup to the original WireGuard command, retained its plan and created a separate commit candidate. awaiting-acceptance means the server interface is active while channel checks remain to be performed. runtime_ready refers to a different application-runtime scope; whole-server readiness is also not asserted. The following JSON selects actual response fields.

deploy-cli host setup plan \
  --profile-file "$RUNTIME_PROFILE" --plan-file "$SETUP_PLAN"
deploy-cli host setup apply \
  --plan-file "$SETUP_PLAN" --plan-sha256 "$SETUP_PLAN_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "awaiting-acceptance",
  "scope": "same-boot-server-wireguard-runtime",
  "host_write_attempted": true,
  "host_write_performed": true,
  "host_write_state": "changed",
  "wireguard_runtime_started": true,
  "acceptance_required": true,
  "runtime_ready": false,
  "whole_host_ready": false
}

The client has its own operation

On a separate Ubuntu node I used prepared keys, configuration and an unsaved NetworkManager profile. Its runtime starts locally on that client with its own plan and sudo. Server setup does not silently alter laptop networking. The run used two isolated VMs; local QEMU forwarding does not replace a public Internet test.

# On the independently prepared Ubuntu client:
deploy-cli local wireguard runtime-plan \
  --node-file "$CLIENT_NODE" --plan-file "$CLIENT_RUNTIME_PLAN"
deploy-cli local wireguard runtime-start \
  --node-file "$CLIENT_NODE" --plan-file "$CLIENT_RUNTIME_PLAN" \
  --plan-sha256 "$CLIENT_RUNTIME_PLAN_SHA256" --approve-privileges

Checks before true

A fresh private-address SSH session checked the host key and reached sudo. Passwordless sudo refused; password sudo returned 0 from id -u. The fixture supplied the password through stdin without printing it; the shown command illustrates manual interactive use. The separate 0 block is actual stdout. I checked handshake and bidirectional transfer, fresh public SSH/password sudo and independent serial console. Control HTTP worked locally but was blocked through WireGuard with an increased drop counter.

ssh -t -F /dev/null -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes \
  -o UserKnownHostsFile="$WG_KNOWN_HOSTS" -i "$WG_SSH_KEY" \
  "${ADMIN_USER}@${WG_SERVER_PRIVATE_IPV4}" 'sudo -k -- /usr/bin/id -u'

deploy-cli host wireguard runtime-verify \
  --env-file "$ADMIN_ENV" --request-file "$ORIGINAL_REQUEST" \
  --node-file "$SERVER_NODE"
0

Acceptance has its own plan and evidence

The following approval is a schema for six completed checks. Its plan_sha256 pins the separate lower runtime-commit plan, not the upper setup plan. Evidence stays outside workflow control files, retaining its exact path and SHA. A wrong approval SHA refused before copying or commit intent. Do not copy true values before performing those checks.

{
  "schema_version": 1,
  "plan_sha256": "<ORIGINAL_RUNTIME_COMMIT_PLAN_SHA256>",
  "acceptance": {
    "new_wireguard_ssh": true,
    "wireguard_password_sudo": true,
    "new_public_ssh": true,
    "public_password_sudo": true,
    "console": true,
    "negative_controls": true
  },
  "proof_file": "/private/example-independent-channel-proof.json",
  "proof_sha256": "<INDEPENDENT_PROOF_SHA256>"
}

Explicit accept

After independent checks I supplied a separate approval and provisional checkpoint SHA to host setup accept. It rechecked original files, the original inspect view and new approval, then invoked original runtime-commit once. Private-channel readiness uses its own wireguard_runtime_ready field; this does not establish application-runtime or whole-server readiness. Selected actual accept fields follow.

deploy-cli host setup accept \
  --plan-file "$SETUP_PLAN" --plan-sha256 "$SETUP_PLAN_SHA256" \
  --applied-sha256 "$APPLIED_SHA256" \
  --acceptance-file "$INDEPENDENT_APPROVAL" \
  --acceptance-sha256 "$INDEPENDENT_APPROVAL_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "passed",
  "scope": "same-boot-server-wireguard-runtime",
  "wireguard_runtime_ready": true,
  "runtime_ready": false,
  "whole_host_ready": false,
  "completed_stages": 2,
  "host_write_state": "changed"
}

A pinned replay only reads

The retained completion SHA is required for verify and an approved apply replay. Both checked the accepted channel without local or server writes. Unpinned replay refused. A partial start or unknown commit outcome does not resume automatically; retained plans and intents require separate console reconciliation.

deploy-cli host setup verify \
  --plan-file "$SETUP_PLAN" --plan-sha256 "$SETUP_PLAN_SHA256" \
  --completion-sha256 "$COMPLETION_SHA256"

# A pinned apply replay performs verification only:
deploy-cli host setup apply \
  --plan-file "$SETUP_PLAN" --plan-sha256 "$SETUP_PLAN_SHA256" \
  --completion-sha256 "$COMPLETION_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "passed",
  "wireguard_runtime_ready": true,
  "local_write_attempted": false,
  "host_write_attempted": false,
  "host_write_performed": false,
  "host_write_state": "none"
}

An error after the server change

On the first VM pair the firewall transition applied, but closing retained SSH returned an error. CLI stopped with an unknown result; apply was not repeated. I separately reproduced a cleanup race where SSH removes its own control socket between inspection and removal, and fixed only that case. The original syscall errno was not retained. I shut down the first pair and ran the complete sequence on fresh nodes; other cleanup errors remain failures.

The next setup boundaries

Original server files, packages and SSH observations stayed intact, as did managed files during post-acceptance reads. Startup and new-boot acceptance already have separately proven commands; joining them to upper setup remains a separate stage. Data services and initial prerequisites also have separate integration steps. The terminal frame below shows saved actual results from this run.

A genuine VTE frame summarizing saved two-VM results: server setup paused pending acceptance, a separate client provided private SSH and sudo, and explicit acceptance and pinned verification completed separately. Commands were not rerun during capture. This is a current-boot channel, with no new startup or reboot in this step.
  1. Operations & Security WireGuard on Debian: private SSH access and a post-reboot check
  2. Platform Engineering PHP, Symfony and HTTPS in one run: the clean and existing coordinator
  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 client through CLI: private SSH and sudo