How To Install Mautic on Fedora 43

Managing marketing campaigns across multiple channels without automation is a full-time job on its own. Manually tracking leads, sending emails, and segmenting contacts eats hours that your team should spend on strategy. Mautic solves that problem — it is a battle-tested, open-source marketing automation platform that gives you full control over email campaigns, contact management, lead scoring, and campaign workflows, all from your own server. This guide walks you through a complete Mautic on Fedora 43 setup, covering every command you need to run a production-ready instance from scratch.
Fedora 43 is the right choice for this deployment. It ships with a modern kernel, the DNF5 package manager, first-class SELinux enforcement, and strong support for PHP 8.2 through the Remi repository. The combination of Apache, MariaDB, and PHP 8.2 on Fedora 43 gives you a rock-solid LAMP stack that Mautic runs well on.
Prerequisites and System Requirements
Before you touch the terminal, confirm your environment meets the following requirements. Skipping this step is the fastest way to hit confusing errors mid-install.
Hardware minimums:
- RAM: 2 GB minimum, 4 GB recommended for production
- Storage: 10 GB free disk space minimum (20 GB+ for contact-heavy databases)
- CPU: 2 vCPUs or more
Software requirements:
- Fedora 43 with a fresh or fully updated install
- Apache 2.4+
- MariaDB 10.6+ or MySQL 8.0+
- PHP 8.2 with extensions:
php-mysqlnd,php-curl,php-mbstring,php-xml,php-intl,php-zip,php-json,php-gd,php-opcache,php-bcmath - Composer (PHP dependency manager)
- Node.js and NPM (required from Mautic 5.0 onwards)
- Git
Access requirements:
- Root or sudo-enabled user
- A domain name pointed to your server’s public IP
- Ports 80 and 443 open in your firewall
Step 1: Update Fedora 43 and Install the LAMP Stack
The foundation for your Mautic on Fedora 43 setup is a current LAMP stack. Always update the system before installing new packages — this prevents library version conflicts that are genuinely painful to debug after the fact.
Update Your Fedora 43 System
Run a full system update first:
sudo dnf update -y
This pulls down all current package updates and refreshes your repository metadata. It takes two to five minutes depending on your connection.
Install Apache Web Server
Apache is the web server that will serve Mautic to browsers and handle all incoming HTTP requests:
sudo dnf install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd
The enable command tells systemd to start Apache automatically every time the server boots. Verify it is running:
sudo systemctl status httpd
You should see active (running) in the output. You can also open a browser and visit http://your-server-ip — the default Apache test page confirms the service is live.
Install MariaDB Server
MariaDB stores everything Mautic needs: contacts, campaigns, email logs, and configuration data:
sudo dnf install mariadb-server -y
sudo systemctl start mariadb
sudo systemctl enable mariadb
Now run the security hardening script. This is not optional for any production server:
sudo mysql_secure_installation
Walk through each prompt carefully:
- Set a strong root password
- Remove anonymous users: Yes
- Disallow remote root login: Yes
- Remove the test database: Yes
- Reload privilege tables: Yes
Install PHP 8.2 via the Remi Repository
Fedora 43’s default repositories may not carry the exact PHP version Mautic 5.x requires. Add the Remi repository to get PHP 8.2:
sudo dnf install -y https://rpms.remirepo.net/fedora/remi-release-43.rpm
sudo dnf module reset php
sudo dnf module enable php:remi-8.2 -y
Now install PHP along with every extension Mautic needs at a minimum:
sudo dnf install -y php php-mysqlnd php-curl php-mbstring php-xml \
php-intl php-zip php-json php-gd php-opcache php-bcmath php-pear git
Verify the installation succeeded:
php -v
Expected output: PHP 8.2.x (cli) — anything in the 8.2.x range is good. Restart Apache so it picks up the new PHP module:
sudo systemctl restart httpd
Step 2: Create and Configure the MariaDB Database
Mautic needs its own dedicated database and a dedicated database user. Never connect Mautic to MariaDB using the root account — that is a serious security exposure on any Linux server tutorial worth following.
Create the Mautic Database
Log in to MariaDB:
sudo mysql -u root -p
Create a clean database for Mautic:
CREATE DATABASE mautic;
Create a Dedicated Database User
Create a user and grant it full access to the Mautic database only:
CREATE USER 'mauticuser'@'localhost' IDENTIFIED BY 'StrongPassword!';
GRANT ALL PRIVILEGES ON mautic.* TO 'mauticuser'@'localhost';
FLUSH PRIVILEGES;
Replace StrongPassword! with a unique, complex password. Write it down somewhere secure — you will need it during the web wizard in Step 8.
Optimize MariaDB for Mautic
Mautic’s queries are incompatible with MariaDB’s default ONLY_FULL_GROUP_BY SQL mode. Remove it now to prevent cryptic SQL errors later:
SET GLOBAL innodb_default_row_format=DYNAMIC;
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
EXIT;
The innodb_default_row_format=DYNAMIC setting improves how MariaDB handles Mautic’s variable-length data fields, which matters once your contact list grows into the thousands.
Step 3: Install Composer and Node.js
Mautic 5.x relies on both PHP and JavaScript tooling to manage its dependencies and compile frontend assets. Both tools need to be in place before you download the Mautic source code.
Install Composer
Download the Composer installer and move the binary to a system-wide location:
wget https://getcomposer.org/installer -O composer-installer.php
php composer-installer.php --filename=composer --install-dir=/usr/local/bin
Verify the install:
composer --version
Composer reads the composer.json file inside Mautic and pulls down ecvery PHP library the platform depends on. Without it, the install stops cold.
Install Node.js and NPM
Mautic uses Node.js to compile CSS and JavaScript assets during installation:
sudo dnf install -y nodejs npm
Verify both tools:
node -v
npm -v
Any current Node.js LTS version works. You are not running a Node.js application here — npm is used once during the Composer build phase.
Step 4: Download Mautic and Install Dependencies
With the stack in place, it is time to pull down the Mautic source code and build all of its dependencies.
Clone the Mautic Repository
Navigate to Apache’s web root and clone the official Mautic repository from GitHub:
cd /var/www/html
sudo git clone https://github.com/mautic/mautic.git
This creates a /var/www/html/mautic/ directory with the full Mautic source tree.
Install PHP Dependencies with Composer
Move into the Mautic directory and run Composer:
cd /var/www/html/mautic
sudo composer install --ignore-platform-req=ext-imap --ignore-platform-req=ext-zip
The two --ignore-platform-req flags tell Composer to continue even if the imap and zip extensions are not loaded at the PHP CLI level. This is a known quirk with Fedora’s PHP packaging and does not affect Mautic’s core functionality.
This step downloads dozens of PHP packages and can take three to eight minutes. That is completely normal — let it run.
Set File Ownership and Permissions
Apache needs read and write access to the entire Mautic directory tree. Wrong permissions are the single most common cause of a broken Mautic install:
sudo chown -R apache:apache /var/www/html/mautic
sudo chmod -R 775 /var/www/html/mautic
The apache user on Fedora is the account that the HTTPD service runs as. Setting ownership to apache:apache gives the web server the access it needs without opening up the files to every system user.
Step 5: Configure Apache Virtual Host for Mautic
Apache needs a virtual host configuration file that tells it where Mautic lives, what domain to serve it on, and how to handle URL rewriting. Without this, Mautic’s routing will not work.
Create the Virtual Host Configuration File
Create a new Apache config file for Mautic:
sudo nano /etc/httpd/conf.d/mautic.conf
Paste the following configuration block. Replace mautic.yourdomain.com with your actual domain name:
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/mautic/
ServerName mautic.yourdomain.com
<Directory /var/www/html/mautic/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/mautic_error_log
CustomLog /var/log/httpd/mautic_access_log combined
</VirtualHost>
The AllowOverride All directive is critical. It tells Apache to respect the .htaccess rules that Mautic uses for clean URL routing. Without it, every URL after the homepage returns a 404 error.
Restart Apache to Load the Configuration
sudo systemctl restart httpd
Apache reads all .conf files in /etc/httpd/conf.d/ on startup, so the restart loads your new virtual host immediately.
Step 6: Configure SELinux and Firewalld
This is the step that most generic Mautic tutorials skip, and it is the step that breaks the most Fedora installs. Fedora 43 runs SELinux in enforcing mode by default. Without correct SELinux file contexts, Apache physically cannot write to the Mautic directory, no matter what file permissions you set.
Fix SELinux File Contexts for Mautic
Set the correct SELinux type on the Mautic directory so Apache can read and write files:
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/mautic(/.*)?"
sudo restorecon -Rv /var/www/html/mautic
Allow Apache to make outbound network connections, which Mautic needs for sending emails and calling external APIs:
sudo setsebool -P httpd_can_network_connect 1
The -P flag makes this setting permanent across reboots. Without it, Mautic’s email sending will silently fail every time the server restarts.
Open HTTP and HTTPS in Firewalld
Open the ports that Mautic needs to receive web traffic:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
The --permanent flag writes the rule to disk so it survives reboots. The --reload applies the new rules to the running firewall immediately.
Step 7: Secure Mautic with a Let’s Encrypt SSL Certificate
HTTPS is not a nice-to-have for Mautic. The platform collects contact information, processes form submissions, and sends tracking pixels. All of that traffic must travel over an encrypted connection for GDPR compliance and basic data security. Let’s Encrypt gives you a free, auto-renewing certificate.
Install Certbot
sudo dnf install -y certbot python3-certbot-apache
Obtain and Install the SSL Certificate
sudo certbot --apache -d mautic.yourdomain.com
Certbot connects to the Let’s Encrypt API, verifies domain ownership, and automatically edits your Apache virtual host to redirect all HTTP traffic to HTTPS. Follow the on-screen prompts — the defaults are fine for most setups.
Test automatic certificate renewal to make sure it will not expire without warning:
sudo certbot renew --dry-run
A dry run that completes without errors means your renewal process is healthy. Let’s Encrypt certificates expire after 90 days, but Certbot installs a systemd timer that handles renewal automatically.
Step 8: Complete the Mautic Web Installation Wizard
Open your browser and navigate to https://mautic.yourdomain.com. You will land on the Mautic installation wizard.
Screen 1 — Environment Check:
Mautic scans your PHP version, required extensions, file permissions, and memory limits. Resolve any items flagged in red before proceeding. Warnings in yellow are acceptable for most setups.
Screen 2 — Database Configuration:
Fill in the database details from Step 2:
- Database Host:
localhost - Database Name:
mautic - Database User:
mauticuser - Database Password: the password you set for
mauticuser
Click Next Step. Mautic will create all of its database tables. This takes around 30 seconds.
Screen 3 — Admin Account Setup:
Create the administrator account that you will use to log in and manage Mautic. Use a strong, unique password and provide a valid email address — Mautic uses it for system notifications.
Screen 4 — Login:
Log in with the admin credentials you just created. A successful login confirms that your configure Mautic on Fedora 43 process is complete and the installation is working correctly.
Step 9: Configure Cron Jobs for Mautic Automation
A Mautic installation without cron jobs is a car without an engine. The platform uses a job queue to process campaigns, update segments, and send emails. None of that happens automatically — you have to schedule it.
Open the crontab for the Apache user:
sudo crontab -u apache -e
Add the following cron jobs:
*/5 * * * * php /var/www/html/mautic/bin/console mautic:segments:update
*/5 * * * * php /var/www/html/mautic/bin/console mautic:campaigns:rebuild
*/5 * * * * php /var/www/html/mautic/bin/console mautic:campaigns:trigger
*/10 * * * * php /var/www/html/mautic/bin/console mautic:emails:send
0 * * * * php /var/www/html/mautic/bin/console mautic:import
Here is what each job does:
mautic:segments:update— Rebuilds contact lists based on your defined segment filtersmautic:campaigns:rebuild— Adds new contacts to active campaigns as they qualifymautic:campaigns:trigger— Fires campaign actions like sending emails or updating contact fieldsmautic:emails:send— Dispatches emails that are queued for deliverymautic:import— Processes any pending contact import jobs
Run these under the apache user, not root. Mautic’s files are owned by apache, so running console commands as a different user creates permission conflicts.
Post-Installation Best Practices
Your Mautic instance is live. These steps keep it running reliably over time:
- Automate database backups: Schedule nightly
mysqldumpexports of themauticdatabase and sync them to remote storage or an S3-compatible bucket - Enable PHP OPcache: Confirm
opcache.enable=1is set in yourphp.ini— it dramatically reduces dashboard load time by caching compiled PHP bytecode - Set up transactional email: Configure a dedicated SMTP provider (Postmark, Mailgun, or Amazon SES) in Mautic’s Email Settings for reliable campaign delivery
- Monitor your logs: Apache errors land in
/var/log/httpd/mautic_error_log; Mautic application logs live in/var/www/html/mautic/var/logs/ - Keep Mautic updated: Pull updates from the GitHub repository and run
composer updateafter reviewing the official changelog for breaking changes
Troubleshooting Common Mautic Installation Issues on Fedora 43
Even with careful preparation, you may hit a few snags. Here are the errors that come up most often on Fedora systems and exactly how to fix them.
- 403 Forbidden or broken JS after install:
This is almost always a SELinux context problem. Re-run the semanage fcontext and restorecon commands from Step 6, then confirm AllowOverride All is set in your virtual host. Also check that mod_rewrite is loaded by running:
httpd -M | grep rewrite
- Composer exits with a memory limit error:
PHP’s memory limit blocks Composer from running the full dependency resolution. Override it at the command line:
COMPOSER_MEMORY_LIMIT=-1 composer install --ignore-platform-req=ext-imap
This tells Composer to use as much RAM as it needs without hitting PHP’s configured cap.
- Database connection refused during the wizard:
Check three things in order: confirm MariaDB is running with sudo systemctl status mariadb, verify the credentials match exactly what you set in Step 2, and check whether you are using localhost vs 127.0.0.1. On some Fedora configurations, 127.0.0.1 works when localhost does not because of socket vs TCP connection handling.
- Blank white screen after completing the wizard:
Check the Mautic application logs at /var/www/html/mautic/var/logs/. A blank screen on Fedora almost always means a PHP fatal error caused by a missing extension or a file ownership mismatch. Re-run the chown command from Step 4 and compare your loaded extensions against the full requirements list from Step 1.
- Cron jobs not firing:
Confirm two things: the crontab belongs to the apache user by checking with sudo crontab -u apache -l, and the PHP binary path is correct for your Fedora install. Locate the PHP binary with which php and use that full path in the crontab if the jobs still do not run.
Congratulations! You have successfully installed Mautic. Thanks for using this tutorial for installing Mautic digital marketing tool on Fedora 43 system. For additional help or useful information, we recommend you check the official Mautic website.