This guide covers essential configuration for self-hosted Mautic installations.
Mautic supports MySQL, MariaDB, and PostgreSQL. Configure in app/config/local.php or via environment variables:
'db_driver' => 'pdo_mysql',
'db_host' => '127.0.0.1',
'db_port' => 3306,
'db_name' => 'mautic',
'db_user' => 'mautic',
'db_password' => 'your-secure-password',
Configure outbound email in Configuration > Email Settings:
Mail Transport: SMTP
SMTP Host: smtp.yourprovider.com
SMTP Port: 587 (TLS) or 465 (SSL)
SMTP Encryption: TLS/SSL
SMTP Username: your-smtp-user
SMTP Password: your-smtp-password
Recommended SMTP Providers:
Mautic requires cron jobs for automation, email sending, and maintenance:
# Edit crontab
crontab -e
# Add Mautic cron jobs (adjust path as needed)
* * * * * php /var/www/html/bin/console mautic:segments:update
* * * * * php /var/www/html/bin/console mautic:campaigns:rebuild
* * * * * php /var/www/html/bin/console mautic:campaigns:trigger
* * * * * php /var/www/html/bin/console mautic:emails:send
* * * * * php /var/www/html/bin/console mautic:broadcasts:send
*/5 * * * * php /var/www/html/bin/console mautic:webhook:enqueue
Recommended php.ini settings:
memory_limit = 512M
max_execution_time = 300
upload_max_filesize = 64M
post_max_size = 64M
date.timezone = UTC
Configure tracking in Configuration > Tracking Settings:
Set up webhooks for integrations:
app/logs/mautic_YYYY-MM-DD.txtwhich phpgrep CRON /var/log/syslogMAUTIC_ENV=prodphp bin/console doctrine:schema:update --force