# WhatsApp inbox deployment

The admin inbox accepts image uploads up to 5 MB and document/batch uploads up to 100 MB. Production request limits must be at least as large as the application limits.

Recommended PHP settings:

```ini
upload_max_filesize = 100M
post_max_size = 110M
max_file_uploads = 20
```

Recommended Nginx setting inside the server block:

```nginx
client_max_body_size 110M;
```

For Apache, set an equivalent `LimitRequestBody` greater than 100 MB if request-size limits are enabled. Restart PHP-FPM and reload the proxy after changing these settings.

Run a queue worker for the dedicated WhatsApp queue so attachments and campaign recipients are delivered asynchronously and in order:

```bash
php artisan queue:work --queue=whatsapp,default --tries=1 --timeout=180
```

Set the inbox media limits in production through the `WHATSAPP_IMAGE_MAX_BYTES`, `WHATSAPP_DOCUMENT_MAX_BYTES`, `WHATSAPP_BATCH_MAX_BYTES`, and `WHATSAPP_MAX_ATTACHMENTS` environment variables. Keep `WHATSAPP_MEDIA_MAX_BYTES` at or above each type-specific limit because it remains the backward-compatible absolute ceiling.
