Server profiles without hand-written JSON: interactive CLI preparation
33 CLI answers produce seven consistent profiles in nine files. Prepare private Symfony, SSH and WireGuard without network changes; verify the full automatic workflow separately.
The server setup wizard already joins individual operations into a sequential workflow. Before execution, however, it needs matching PHP, Nginx, Redis, application and HTTPS profiles. Writing every JSON file by hand makes it easy to mismatch an application name, PHP user or file path. A separate interactive command now prepares these profiles.
Prepare resources locally first
SETUP_RESOURCES below is a new absolute path to a private directory outside Git. The directory must belong to the current operator, have mode 0700 and be empty. The CLI also requires a physical path without symbolic-link substitution.
install -d -m 0700 "$SETUP_RESOURCES"
deploy-cli host setup wizard prepare \
--directory "$SETUP_RESOURCES" \
--approve-local-write
This command receives permission to create local files only. It asks for no root password, installs no packages and opens no SSH connection. Answers come through the controlling terminal; ordinary piped input cannot replace it.
What the CLI asks
The current edition selects two PHP pools, private Nginx, Redis and minimal Symfony. The operator supplies a directory namespace, product and two applications, separate PHP users, a web user and a Composer builder account. The applications need distinct hostnames. The second hostname describes a loopback HTTP origin; it creates no DNS record or public website by itself.
Next come memory limits in MiB, the management firewall policy and one IPv4 WireGuard peer. The client mode is explicit: external, userspace or userspace-managed. Saving that selection does not start a VPN or grant permission to change the laptop network.
The same components used by the execution workflow validate structure and value limits. A duplicate PHP user, mismatched socket, excessive Redis maxmemory or identical node addresses do not become valid simply because the operator finishes the questions.
Prepare trust and secret material separately
The command asks for an already verified public PHP repository key file and its independently obtained SHA256, plus the exact origin and commit of a prepared Symfony checkout. HTTPS requires an existing certificate, private key, CA with an explicit SHA256 and a private BasicAuth file. The CLI validates this material locally and stores references. Keys and passwords are not copied into the generated profiles.
This keeps an explicit automation boundary: the generator does not download an unknown key and declare it trusted, issue a certificate or obtain Cloudflare access. Preparing trust, access and certificates has separate steps.
What appears in the directory
The successful workflow produced seven profiles and two control files:
firewall.json
php.json
nginx.json
redis.json
application.json
tls.json
resources.json
preparation.intent.json
preparation.json
Files are created with mode 0600. PHP and Nginx retain one matching topology, and the application profile uses the same data. Their existing rules determine paths, users, sockets and configuration fragments; the generator accepts no arbitrary directives in place of validated values.
These are selected fields from the actual command response, omitting paths and the completion identity:
{
"status": "passed",
"local_write_attempted": true,
"created_files": 9,
"host_connection_performed": false,
"host_write_performed": false
}
The actual terminal run consumed 33 answers. It used retained prepared TLS material and the committed official Symfony skeleton. Separate tracing found no network system calls during this local workflow. Input material retained its file identities, permissions, sizes and modification times.
An interrupted attempt does not become a ready profile
Interrupting the first question and running without a controlling terminal both failed without creating files. Running again against the occupied directory was also refused; all nine original files remained byte-for-byte unchanged.
If an error occurs after publication begins, the partial directory remains for inspection. A foreign file is neither overwritten nor deleted. The directory inventory and exact output bytes are checked before success. Even a visible preparation.json alongside a failed final check remains an incomplete attempt. Corrected inputs require a new directory.
Server execution is a separate invocation
The existing wizard consumes the prepared resources.json. SETUP_RUN is a different new empty private directory. The example selects userspace-managed, so it includes separate approval for the managed local client:
deploy-cli host setup wizard \
--directory "$SETUP_RUN" \
--spec-file "$SETUP_RESOURCES/resources.json" \
--approve-local-write --approve-privileges \
--approve-client-privileges
The executor validates current profiles and material again, then collects host access through its own protected dialogue. Independent access, current console and reboot confirmations retain their original boundaries. This server execution was not performed during the resource-generator check described here.
The next step is preparing a genuinely clean image and running the full workflow with generated resources. File generation already removes hand-written JSON for the selected stack; server readiness comes from the separate execution result.