Client WireGuard in setup: NetworkManager, start and acceptance

A temporary profile, separate network approval and independent private-channel acceptance on two VMs.

A laptop and server joined by a channel, with profile, activation and acceptance cards below.
A laptop and server joined by a channel, with profile, activation and acceptance cards below.

After key and configuration preparation, I added NetworkManager staging and separate WireGuard client activation to local setup. The run used isolated Ubuntu client and Debian server VMs. The work laptop network was unchanged. A successful start remains separate from independent channel acceptance.

Stage references an exact configuration

The schematic profile below supplies the original config plan and exact SHA. The reader authenticates that candidate journal rather than similar settings. No server environment or SSH request belongs in this local profile. Replace example paths and hashes with your own.

{
  "schema_version": 1,
  "entry_mode": "clean",
  "wireguard_client": {
    "stage": "stage",
    "node_file": "/private/example-client-node.json",
    "config_plan_file": "/private/example-original-config.plan.json",
    "config_plan_sha256": "<ORIGINAL_CONFIG_PLAN_SHA256>"
  }
}

Network changes need separate approval

The --approve-client-network flag is required in addition to local-record and privilege approvals. Without it apply refused before execution intent. Stage created a temporary inactive NetworkManager profile. Selected actual fields from the saved original stage-inspect report follow. Autoconnect is false and the profile is not persisted.

deploy-cli local setup plan \
  --profile-file "$CLIENT_STAGE_PROFILE" --plan-file "$CLIENT_STAGE_SETUP_PLAN"
deploy-cli local setup apply \
  --plan-file "$CLIENT_STAGE_SETUP_PLAN" --plan-sha256 "$CLIENT_STAGE_SETUP_SHA256" \
  --approve-local-write --approve-privileges --approve-client-network
{
  "phase": "staged",
  "runtime_started": false,
  "autoconnect": false,
  "persisted": false,
  "runtime_keyfile": true
}

Runtime has a different profile and plan

The next profile references the original stage plan and SHA. Before activation, a reader checks the exact root-owned journal before and after original inspection. Original privileged programs stay unchanged. An active or changed stage is not silently renewed.

{
  "schema_version": 1,
  "entry_mode": "clean",
  "wireguard_client": {
    "stage": "runtime",
    "node_file": "/private/example-client-node.json",
    "stage_plan_file": "/private/example-original-stage.plan.json",
    "stage_plan_sha256": "<ORIGINAL_STAGE_PLAN_SHA256>"
  }
}

Apply starts without accepting the channel

Runtime apply invoked original local runtime-start once. Awaiting-acceptance leaves time for independent checks. Client effects are separate from host writes, and application and whole-host readiness remain false. Selected actual response fields follow.

deploy-cli local setup plan \
  --profile-file "$CLIENT_RUNTIME_PROFILE" --plan-file "$CLIENT_RUNTIME_SETUP_PLAN"
deploy-cli local setup apply \
  --plan-file "$CLIENT_RUNTIME_SETUP_PLAN" --plan-sha256 "$CLIENT_RUNTIME_SETUP_SHA256" \
  --approve-local-write --approve-privileges --approve-client-network
{
  "status": "awaiting-acceptance",
  "scope": "local-wireguard-client-runtime",
  "wireguard_client_runtime_started": true,
  "acceptance_required": true,
  "client_write_attempted": true,
  "client_write_performed": true,
  "client_write_state": "changed",
  "host_write_attempted": false,
  "host_write_performed": false,
  "runtime_ready": false,
  "whole_host_ready": false
}

Checks are performed independently

I checked handshake, bidirectional traffic, a new private SSH session, passwordless sudo refusal and root UID through password sudo. Public SSH/sudo and the separate server serial console were checked too. Test HTTP responded locally but was blocked over the tunnel with a rising drop counter. The schematic approval below has six labels and the original lower commit-plan SHA, not the upper setup SHA. True values must not be filled in ahead of the checks.

{
  "schema_version": 1,
  "plan_sha256": "<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>"
}

Acceptance is a separate command

A wrong approval SHA was refused before copy or commit intent. After actual checks, accept consumed independent proof and called original runtime-commit once. Wireguard_client_runtime_ready covers this channel. The profile remains temporary; this local command does not set server runtime readiness.

deploy-cli local setup accept \
  --plan-file "$CLIENT_RUNTIME_SETUP_PLAN" --plan-sha256 "$CLIENT_RUNTIME_SETUP_SHA256" \
  --applied-sha256 "$CLIENT_RUNTIME_APPLIED_SHA256" \
  --acceptance-file "$INDEPENDENT_APPROVAL" --acceptance-sha256 "$APPROVAL_SHA256" \
  --approve-local-write --approve-privileges --approve-client-network
{
  "status": "passed",
  "scope": "local-wireguard-client-runtime",
  "wireguard_client_runtime_ready": true,
  "client_profile_temporary": true,
  "client_write_state": "changed",
  "host_write_attempted": false,
  "host_write_performed": false,
  "runtime_ready": false,
  "whole_host_ready": false
}

Verify and pinned replay do not start again

Verify and apply with a completion SHA performed no new writer or operator-control changes. Twenty-one selected client files stayed exact. Replay without a completion SHA was refused. Selected actual verify fields follow without adding absent optional fields.

deploy-cli local setup verify \
  --plan-file "$CLIENT_RUNTIME_SETUP_PLAN" --plan-sha256 "$CLIENT_RUNTIME_SETUP_SHA256" \
  --completion-sha256 "$CLIENT_RUNTIME_COMPLETION_SHA256"
deploy-cli local setup apply \
  --plan-file "$CLIENT_RUNTIME_SETUP_PLAN" --plan-sha256 "$CLIENT_RUNTIME_SETUP_SHA256" \
  --completion-sha256 "$CLIENT_RUNTIME_COMPLETION_SHA256" \
  --approve-local-write --approve-privileges --approve-client-network
{
  "status": "passed",
  "wireguard_client_runtime_ready": true,
  "client_profile_temporary": true,
  "local_write_attempted": false,
  "client_write_state": "none",
  "host_write_attempted": false,
  "host_write_performed": false
}

The old stage completion is not renewed

The temporary profile is active after runtime. Old stage verify refused that state without rewriting history. Selected actual refusal fields follow. Key, config, stage and accepted runtime retain separate completions; an unknown writer outcome never triggers automatic retry.

{
  "status": "failed",
  "error": "setup local client authority or current state refused; inspect private controls",
  "client_write_state": "none",
  "host_write_attempted": false,
  "local_write_attempted": false
}

Server reboot is verified separately

On the same pair I rechecked upper server firewall/runtime, startup enablement without restarting the tunnel and one controlled server reboot. Once the node returned, private-channel checks and new-boot acceptance ran again. The client stayed on throughout.

What disabled autoconnect means

This run does not prove client reboot survival: the profile is temporary, autoconnect is false and only the server rebooted. The frame below summarizes saved actual results; commands were not rerun during capture. Both VMs were shut down normally. Data services and base packages are the next setup integration.

Saved NetworkManager staging and independent WireGuard client acceptance results on two VMs
A genuine VTE frame summarizing saved results: explicit network approval, temporary staging, startup, independent acceptance and readonly verification. The server rebooted separately; the client stayed on with autoconnect false. Commands were not rerun during capture.
  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 Client WireGuard in local setup: key and configuration

A project by the author · Weather Solution200

After reading, a look outside.

Temperature, rain and wind in your city. Check the forecast and plan the hours ahead.

Check the forecast
Next article