# Hosting notes

## PHP-only cPanel

Normal cPanel PHP hosting **cannot** run Playwright or Chromium. Do not install this worker on PHP-only shared hosting and expect browser automation to work.

You may:

- Host a reverse proxy or static front on cPanel
- Point a cron job at `https://your-domain/api/cron/prepare?secret=...`

The control panel itself is Next.js, so it still needs Node.js 20+ (Passenger, a VPS, or similar).

## Recommended VPS

1. Ubuntu 22.04+ with Node.js 20
2. PostgreSQL 15+
3. `npm install && npx drizzle-kit push && npm run build`
4. Process manager for `npm run start`
5. Process manager for `node automation/runner.mjs --mode=loop`
6. `npx playwright install --with-deps chromium`

systemd example for the worker:

```
[Service]
WorkingDirectory=/var/www/serial-panel
ExecStart=/usr/bin/node automation/runner.mjs --mode=loop
Restart=always
EnvironmentFile=/var/www/serial-panel/.env
```
