Interactive server setup through the CLI
A wizard combines administrator, firewall, WireGuard, PHP, Redis and private Symfony setup. Independent acceptance and two confirmed reboots remain separate steps.
Individual server setup commands can now be joined into a sequential interactive run. The wizard takes a prepared resource specification, collects access through the terminal and calls existing operations in order. This version selects two PHP pools, Redis, one WireGuard client and a private site using the official Symfony skeleton.
A new run has its own private directory
Before running, set SETUP_RUN to a new directory outside Git and SETUP_SPEC to a prepared private JSON file. The directory must be empty and accessible only to its owner. Restarting over an incomplete attempt is refused: determine the actual outcome of the previous operation first.
chmod 0600 "$SETUP_SPEC"
install -d -m 0700 "$SETUP_RUN"
deploy-cli host setup wizard \
--directory "$SETUP_RUN" \
--spec-file "$SETUP_SPEC" \
--approve-local-write --approve-privileges
The first flag permits local control records; the second permits selected privileged actions on the server. These do not replace independent access checks. Each of the two reboots requires a separate REBOOT confirmation in the terminal.
Prepare the resource specification before entering passwords
The example below shows the input structure. Replace paths, private network addresses, the port and placeholders with independently verified values. Each referenced JSON file must contain its corresponding complete profile. Keep local profile, trust and TLS material files at mode 0600, separate from the run directory. PHP and Nginx must describe the same two applications, and the application profile must select that same runtime. Prepare the certificate, private key, CA and BasicAuth separately.
{
"schema_version": 1,
"foundation": {
"schema_version": 1,
"transport": "management-ssh",
"firewall_policy_file": "/private/firewall.json",
"fpm_file": "/private/php.json",
"key_file": "/private/verified-archive-keyring.gpg",
"key_sha256": "<VERIFIED_SHA256>",
"nginx_file": "/private/nginx.json",
"data": [
{
"role": "redis80",
"profile_file": "/private/redis.json"
}
]
},
"wireguard": {
"schema_version": 1,
"interface": "wg-admin",
"udp_port": 51820,
"server_ipv4": "10.203.0.1",
"peer_ipv4": "10.203.0.2"
},
"application_file": "/private/official-skeleton.json",
"source_repository": "/private/skeleton-checkout",
"commit": "<EXACT_40_HEX_COMMIT>",
"tls_file": "/private/tls.json"
}
Do not put root or administrator parameters in this JSON. The wizard uses the protected terminal collector: it asks for the target, independently verified known_hosts, root authentication method, administrator key and sudo password. Secrets are entered twice without echo. A new SSH fingerprint is never accepted automatically.
Where automation waits for independent checks
First the server foundation is created and the firewall is applied provisionally. Before final acceptance, open a fresh SSH connection, check password-sudo and the independent console, and confirm that an unapproved connection is denied while its listener remains healthy. Supply the original acknowledgement file separately; the CLI’s own SSH queries do not provide this confirmation.
After the first reboot, supply fresh console evidence: the same machine and a different boot. PHP, Redis, Nginx and timer startup are then configured. WireGuard creates a separate key on each node. Exchange public keys only; start the client on another node and check private SSH and password-sudo.
After establishing the private channel, APT installs Composer, Git, unzip and their dependencies without replacing existing runtime packages. The committed Git state of the official skeleton is then delivered, its dependencies are installed through composer install and private password-protected HTTPS is enabled. This educational run does not require proprietary application code.
Two reboots and the return of the private site
On the isolated fixture, a single interactive CLI process completed the path from first root login to a private site. An automated test drove the dialogue through a real TTY. It used separate server and client VMs and did not change laptop networking. Before the CLI run, the fixture image was separately prepared for controlled reboots, including a fallback kernel and stable UEFI order.
After the second reboot, the independent console confirmed the same machine and a new boot. Private SSH with password-sudo, both fresh PHP workers and eight local TLS/HTTP checks were verified again. Redis answered authenticated PING, denied an incorrect password and kept the default user disabled. Original journals, boot identities and PIDs were not rewritten.
The actual public wizard response below is shortened to its result fields. Private identifiers and the completion digest are omitted.
{
"status": "passed",
"completed_operations": 57,
"private_site_new_boot_ready": true,
"data_postboot_verified": true,
"whole_host_ready": false
}
Private HTTPS used a local fixture CA, and web ports remained closed to public traffic. This fixture’s success does not automatically apply to any VPS image: another server requires verification of its own starting conditions.
What to do after an interrupted run
Once a write may have started, a missing successful response does not mean the server remained unchanged. The wizard retains local intents and known results, then stops. Do not delete the directory to start again: inspect the journal and the relevant operation through independent access first.
One test run stopped during an APT index refresh with a fetch error. The package journal remained pending, and the sequence stopped. The operation was not retried, and its state was not reset to continue. Retained data was kept for analysis, and the next test began on another clean VM.
This run targets the selected clean fixture. The existing educational E01 already has its own configuration and history and needs separate existing-state verification. Provider settings, Cloudflare, DNS, panel backups and client autoconnect remain separate steps.

