HUB — PHP 8.5, 64 bit

1. Extract apps/, packages/, and contracts/ outside public_html. Point the domain document root at apps/hub/public. If the host cannot change the document root, use a minimal public front controller that requires the private apps/hub/public/index.php and copy only public/assets and public/.htaccess into public_html. Never expose the project root.
2. Run the host's PHP 8.5 CLI: php apps/hub/bin/init-private-config.php. This creates private keys without printing them. Edit apps/hub/.env privately for SQL, two separate Redis services, HTTPS origin/allowed hosts, SMTP, and payment gateway. No Composer or Node build is required for the packaged release.
3. Run php apps/hub/artisan migrate --force, then php apps/hub/artisan hub:admin-create your-email@example.com. Enroll a passkey before using administration.
4. Run php apps/hub/artisan hub:state-recover, then start the maintenance service. Known exits remain fenced for at least 62 seconds after recovery. Maintenance and exit checks must run frequently enough to preserve the 45-second exit lease; a once-per-minute cron alone is insufficient. Use an external maintained coordination/worker host where shared hosting cannot provide this cadence or callback concurrency.
5. Add a once-per-minute Cron Job using the same PHP 8.5 CLI: php /private/iphub/apps/hub/artisan schedule:run. This drives bounded daily gateway reconciliation; it supplements the faster maintenance/health workers.
6. Configure the provider agreement, verified field registry, agents/relays, routes, merchant, published plans and gateway webhooks. Keep hosted payment prices consistent with the contracted plan.
7. Run php apps/hub/artisan hub:preflight --production. Deployment load, TLS/proxy/ingress checks, independent security review, actual public exits and backup restoration are activation requirements. A shared hosting account is eligible only if its tested resources and features satisfy these requirements.

MINIMAL PHP RELAY

1. Extract relay/ outside public_html and expose relay/public only through an HTTPS domain.
2. Create private spool and node-configuration directories outside the document root. Create a private bootstrap.json containing hub_url, enrollment_token, name, configuration_path, and spool_path. Redeem a one-use token from the hub's Agents page.
3. Run PHP 8.5: php relay/bin/enroll.php --bootstrap=/private/bootstrap.json. cPanel Cron Jobs can run this once if SSH is unavailable. The bootstrap file is removed after successful enrollment. No key values are printed.
4. Set HUB_NODE_CONFIG to the private node.json path in the domain's PHP environment. Approve the node's HTTPS origin in the hub, then test and activate a route.
5. Configure a reliable cron or external scheduler: HUB_NODE_CONFIG=/private/node.json php /private/relay/bin/drain-spool.php. This delivers encrypted pending responses and processes key-rotation commands. Run relay/bin/preflight.php using the same environment. Check that CLI and web PHP both use 8.5.
6. VPS and shared cPanel relays can coexist with Linux bound-IP, WireGuard, OpenVPN and trusted proxy routes. Sites sharing the same observed outbound IP share one provider allowance. Domain addresses do not prove separate exits.

Never place keys, VPN profiles, spool files, backups or .env under a document root. Configure web access logs to omit query strings and redact recovery/invitation token paths. TLS SOCKS5 uses the Go worker; PHP/cURL supports approved TLS CONNECT and enrolled private SOCKS5 transports.
