From first root login to a private server foundation

A combined CLI workflow: administrator access, independent firewall acceptance, Nginx, PHP and Redis on a fresh VM.

A path from a terminal through key access and firewall acceptance to three private server services.

I joined the verified stages into one CLI workflow, from the first root login to a current private foundation with Nginx, PHP and Redis. I tested it on a separate fresh Debian VM. Initially it had only root; cloud-init did not pre-create an administrator or install packages.

Inputs before execution

The schematic profile below explicitly selects management-ssh. It requires separate initial root credentials, the future administrator key, a sudo password, independent console evidence for this machine and boot, and already verified known_hosts. The image must provide SSH, Python3 and sudo. Replace private paths and SHA values. PHP uses schema3 and must share the exact Nginx layout. This combined run selected Redis alone; it does not prove all three data services installed together.

{
  "schema_version": 1,
  "transport": "management-ssh",
  "environment_file": "/private/admin.env",
  "access": {
    "root_environment_file": "/private/root.env",
    "request_file": "/private/access.json"
  },
  "firewall_policy_file": "/private/firewall.json",
  "fpm_file": "/private/php-schema3.json",
  "key_file": "/private/php-public.gpg",
  "key_sha256": "<REVIEWED_PUBLIC_KEYRING_SHA256>",
  "nginx_file": "/private/nginx.json",
  "data": [
    {
      "role": "redis80",
      "profile_file": "/private/redis.json"
    }
  ]
}

This fixture had an explicit network assumption: after an unreachable Debian CDN address, I pinned a verified mirror IPv4 address in /etc/hosts on the new VM before plan. TLS and signature verification remained enabled. This was isolated fixture configuration; repository reachability needs a separate check on other networks.

The first apply stops at the firewall

Plan checks initial access and retains the administrator plan. Apply creates and verifies a key-only administrator with password sudo, hardens SSH, installs signed base utilities, then applies the firewall with its original rollback timer. Commands with schematic variables and selected actual response fields follow. awaiting-acceptance means execution stops before firewall acceptance.

deploy-cli host bootstrap plan \
  --profile-file "$BOOTSTRAP_PROFILE" --plan-file "$BOOTSTRAP_PLAN"
deploy-cli host bootstrap apply \
  --plan-file "$BOOTSTRAP_PLAN" --plan-sha256 "$BOOTSTRAP_SHA256" \
  --approve-local-write --approve-privileges
{
  "status": "awaiting-acceptance",
  "access_ready": true,
  "prerequisites_ready": true,
  "firewall_applied": true,
  "acceptance_required": true,
  "foundation_ready": false,
  "whole_host_ready": false
}

Acceptance is checked independently

Outside the installer I opened a fresh selected-key SSH session and password sudo, authenticated through the independent serial console, and verified the same machine and boot. A fixture HTTP listener returned 200 before the firewall. Afterwards the external request timed out while loopback still returned 200. Only after these actual checks did I prepare the original firewall acknowledgement. Accept consumes its exact bytes and SHA; the CLI does not invent positive answers.

deploy-cli host bootstrap accept \
  --plan-file "$BOOTSTRAP_PLAN" --plan-sha256 "$BOOTSTRAP_SHA256" \
  --applied-sha256 "$APPLIED_SHA256" \
  --acceptance-file "$INDEPENDENT_ACCEPTANCE" \
  --acceptance-sha256 "$ACCEPTANCE_SHA256" \
  --approve-local-write --approve-privileges

What continuation performed

After accept, the workflow committed the firewall, installed its persistence and started the exact original loader in the same boot. It then prepared Nginx and the shared startup policy, installed PHP and layout, completed the five Redis stages, and configured and started private Nginx/PHP. Selected actual completion fields follow. foundation_ready refers to this current foundation. Starting the loader is not presented as a post-reboot test.

{
  "status": "passed",
  "completed_stages": 27,
  "foundation_ready": true,
  "startup_ready": false,
  "new_boot_verified": false,
  "runtime_ready": false,
  "whole_host_ready": false
}

History starts with utilities

The fresh image initially lacked APT directories and lock files. A separate CLI role now plans and creates only missing fixed objects, including partial and auxfiles for _apt, and verifies them. The explicit new history schema preserves initial utility refresh and installation before Nginx, PHP and Redis; both use the same explicit named-policy mode. Previous schemas and executable Python modules remain unchanged. Missing genesis, reordered records or unapproved state changes are refused. Base utilities admit new additions only; a required package replacement stops before its write and needs a separate replacement operation.

Verify current readiness without reinstalling

Verify with an exact completion SHA invokes original checks for access, utilities, firewall loader, complete history, and live PHP/Nginx and Redis. The command and selected actual fields follow. Apply with the same completion also performed no new writes. I compared local control files and selected server files before and after these reads.

deploy-cli host bootstrap verify \
  --plan-file "$BOOTSTRAP_PLAN" --plan-sha256 "$BOOTSTRAP_SHA256" \
  --completion-sha256 "$COMPLETION_SHA256"
{
  "status": "passed",
  "foundation_ready": true,
  "local_write_attempted": false,
  "host_write_attempted": false,
  "whole_host_ready": false
}

Do not guess how to resume a partial run

Apply without a completion was refused before another server write. local_write_attempted is true because it attempted to create an already occupied local execution file. This does not mean a server write occurred. Unknown writer results or partial intents permit no automatic retry. The frame below displays saved results in a genuine terminal; installation commands did not rerun during capture.

{
  "status": "failed",
  "local_write_attempted": true,
  "host_write_attempted": false,
  "host_write_state": "none",
  "foundation_ready": false
}

Next: separate startup verification

I shut the VM down normally. This run changed no rented E01, production host, provider configuration or laptop network. Connecting sites, their credentials, TLS and DNS retain separate stages. Next come selected-stack startup enablement, a real new boot and independent acceptance of access afterwards. startup_ready, new_boot_verified and whole_host_ready remain false here.

Genuine VTE summarizing saved results: independent firewall acceptance, a current private foundation and repeated reads without writes. Setup did not rerun during capture; post-reboot verification remains separate.
  1. Operations & Security Firewall acceptance through CLI: provisional rules and independent approval
  2. Operations & Security Firewall boot loading through CLI: installation and post-reboot verification
  3. Operations & Security From root password to key-only administrator: initial access through CLI
  4. Data & Infrastructure MySQL, Redis and Elasticsearch in shared setup
  5. Platform Engineering Private credential input and base utilities in the CLI