# Installing Audoryx on traditional cPanel hosting

The hosting archive is self-contained. Composer and Node.js are not required on
the hosting account.

## Required final layout

Extract the archive in the cPanel account home directory, not inside the public
web directory. Move the two packaged directories into this sibling layout:

```text
/home/CPANEL_USERNAME/
├── audoryx/       Private Laravel application
└── public_html/   Public web root
    ├── .htaccess
    ├── index.php
    ├── assets/
    └── build/
```

If the domain uses a different document root, rename or move the packaged
`public_html` directory to that document root, then update `$audoryxPath` in its
`index.php` only when the private application directory is no longer its
`../audoryx` sibling.

Never place `.env`, `vendor`, `storage`, `app`, or the other private Laravel
directories directly in a publicly accessible directory.

## Server requirements

- PHP 8.2 or newer
- MySQL 8.0+ or MariaDB 10.3+
- PHP extensions: `ctype`, `curl`, `dom`, `fileinfo`, `filter`, `hash`, `json`,
  `libxml`, `mbstring`, `openssl`, `pdo`, `pdo_mysql`, `session`, and `tokenizer`
- Apache `mod_rewrite`, which is normally enabled on cPanel

Set normal permissions such as `755` for directories and `644` for files. The
web-server user must be able to write to:

```text
audoryx/storage/
audoryx/bootstrap/cache/
```

Use group-writable permissions such as `775` only when the hosting ownership
model requires them. Never use `777`.

## Browser installer

1. Create an empty MySQL 8.0+ or MariaDB 10.3+ database and a dedicated user in cPanel.
   Assign that user to the database with all privileges.
2. Open `https://YOUR-DOMAIN/install/access`.
3. Read the one-time token from
   `audoryx/storage/app/private/audoryx-install-token.txt` using File Manager.
4. Complete the requirement, license, database, and administrator steps.
   Use `localhost` and port `3306` unless the host provides a different
   database endpoint. Enter the full cPanel-prefixed database and user names.
5. Delete any uploaded ZIP after installation.

The installer writes `.env`, creates the application key, migrates the database,
creates the administrator, publishes public storage, and permanently locks
itself.

## Cron

Create this cPanel cron job and replace both the PHP path and account path with
the values shown by the hosting provider:

```cron
* * * * * /usr/local/bin/php /home/CPANEL_USERNAME/audoryx/artisan schedule:run >> /dev/null 2>&1
```

Audoryx includes shared-hosting queue draining in its scheduler. A persistent
queue worker remains preferable when the hosting plan supports Supervisor.
