# Server Requirements

## Minimum Requirements

- PHP: 8.2 or higher
- MySQL: 5.7+ or MariaDB 10.3+
- Web Server: Apache 2.4+ or Nginx 1.18+

> Note: All PHP dependencies and frontend assets are pre-built and included in the download package. You do not need Composer, Node.js, or NPM to install and run MailTrixy.

## Required PHP Extensions

The following PHP extensions must be enabled on your server. Most shared hosting providers have these enabled by default.

- BCMath – Arbitrary precision mathematics (used by billing calculations)
- Ctype – Character type checking
- Fileinfo – File information and MIME type detection
- JSON – JSON encoding/decoding (API responses, webhook payloads)
- Mbstring – Multibyte string handling (email subject parsing, UTF-8 support)
- OpenSSL – Encryption, SSL/TLS, and secure token generation
- PDO – Database abstraction layer (with MySQL driver)
- Tokenizer – PHP token parsing
- XML – XML parsing (used by some payment gateways)
- cURL – HTTP client for API calls, payment gateways, AI providers, and channel integrations
- GD / Imagick – Image processing for email template thumbnails and avatar generation
- IMAP – Email fetching from Gmail, Outlook, and custom IMAP servers
- ZIP – ZIP archive handling for bulk data import/export

## Recommended Server Specifications

- PHP Memory Limit: 256 MB or higher (512 MB recommended for large workspaces)
- max_execution_time: 120 seconds or higher (email syncing and campaign sending may take longer)
- CPU: 2+ cores (4 cores recommended if running queue workers)
- RAM: 2 GB minimum, 4 GB recommended
- Storage: SSD recommended for database performance
- Disk Space: 500 MB base + space for email attachments and uploaded files

## PHP Configuration Settings

MailTrixy processes email attachments, imports contact CSVs, and runs background jobs. The following PHP settings should be configured for optimal performance.

Setting | Recommended Value | Purpose
--- | --- | ---
`memory_limit` | `256M` | Maximum memory per script (email parsing, CSV imports)
`max_execution_time` | `120` | Maximum script execution time in seconds
`upload_max_filesize` | `64M` | Maximum single file upload size (attachments, CSV imports)
`post_max_size` | `64M` | Maximum POST request size (must be ≥ upload_max_filesize)
`max_input_time` | `120` | Maximum time for parsing input data
`max_file_uploads` | `20` | Maximum number of files per upload request

## Optional Requirements

- Redis – Optional for faster queue processing and caching (the database driver works by default)
- Supervisor – Recommended for VPS/dedicated servers to manage persistent queue workers
- SSL Certificate – Required for OAuth integrations (Gmail, Outlook) and recommended for production
- Pusher / Laravel Reverb – Optional for real-time inbox updates and live chat