# Trustwill cPanel installation

## Before uploading

1. In **MultiPHP Manager**, select PHP 8.3 or PHP 8.4 for the target main domain or subdomain.
2. Enable AutoSSL and confirm the domain opens with HTTPS.
3. In **MySQL Databases**, create a new empty database and a dedicated database user. Grant that user all privileges on the new database.
4. Keep `INSTALLATION-KEY.txt` private. It is required by the wizard and is reusable with this private ZIP.

## Upload and install

1. Open the target domain's document root in cPanel File Manager. It must be empty.
2. Upload `trustwill-installer.zip`, extract it, and move the contents of the extracted `trustwill` folder directly into the document root.
3. Delete the uploaded ZIP and the empty extracted folder.
4. Visit `https://your-domain.example/install/`.
5. Enter the key from `INSTALLATION-KEY.txt` and complete every wizard step.
6. Use a logo in PNG, JPEG, or WebP format and a square PNG/WebP app icon of at least 512 × 512 pixels.
7. SMTP, CoinGecko Demo/Pro, and Smartsupp are tested before the final installation starts.

## Final cPanel cron job

The completion page shows one command containing the exact PHP version and application path. Add it in **cPanel → Cron Jobs** with an interval of once per minute. A typical PHP 8.3 command is:

```text
* * * * * /usr/local/bin/ea-php83 /home/CPANEL_USER/PATH_TO_APP/artisan schedule:run >> /dev/null 2>&1
```

For PHP 8.4, the installer uses `ea-php84`. This single cron entry runs all background work:

- Queued email delivery every minute.
- Crypto price updates every 30 minutes.
- Matured stake releases every 5 minutes.
- Scheduler health heartbeat every minute.

The admin dashboard warning disappears after the scheduler heartbeat runs. Do not add separate queue or price cron entries.

## Security and repeat installations

- The installer creates one administrator and no demo/customer users.
- Every global coin/network wallet is initially set to `Please add wallet from admin` and is not deposit-ready until changed in Admin → Wallet Addresses.
- No per-user wallet overrides are created. Future customer accounts use the global wallet unless an administrator explicitly adds an override.
- SMTP, CoinGecko, Smartsupp, branding, and administrator settings are completed in the wizard; wallet addresses are the only application data requiring post-install setup.
- The installer locks permanently after completion.
- For another domain, reuse the original ZIP with another empty document root and another empty database.
- Never extract the ZIP over an existing site and never reuse an existing database.
