Blog · WebJi® India

Install Mautic on a VPS

Quick answer: Mautic installs on Ubuntu from the production package or Composer, then finishes with bin/console mautic:install. Give it PHP 8.1 or newer, MySQL 8, 2 vCPU and 4 GB RAM, and add the cron jobs for segments, campaigns, email and the queue. It worked when you can log in and a test email arrives.
✓ In business since 2005✓ INR + GST billing✓ 24/7 Email Support — avg reply < 60 min
Indian business partners shaking hands across a desk with a dashboard open on a laptop — install mautic on vps

What Mautic needs on a VPS

Mautic 5 needs PHP 8.1 or newer, MySQL 8, Composer 2 and a writable docroot. Give it 2 vCPU and 4 GB RAM; PHP-FPM, MySQL and the cron workers all run at once, and 2 GB is where installs start timing out.

  • Ubuntu 24.04 with nginx and PHP-FPM 8.3 covers the current Mautic line.
  • max_execution_time must be at least 240 seconds, or the installer aborts partway.
  • memory_limit of 512M avoids the installer warning and the failures that follow it.
  • Disk: 20 GB for the application and a small list, more when contacts and tracking grow.

Check the exact PHP and MySQL pair on the Mautic requirements page for the release you download, because the supported versions move with each major branch.

Build the Ubuntu stack first

Install the web server, PHP and the database before Mautic. Run these as a sudo user on a fresh Ubuntu 24.04 server.

  1. sudo apt update && sudo apt install -y nginx mysql-server php8.3-fpm php8.3-cli php8.3-mysql php8.3-xml php8.3-mbstring php8.3-curl php8.3-zip php8.3-gd php8.3-intl php8.3-bcmath unzip
  2. curl -sS https://getcomposer.org/installer | php && sudo mv composer.phar /usr/local/bin/composer
  3. sudo mysql, then CREATE DATABASE mautic; CREATE USER 'mautic'@'localhost' IDENTIFIED BY 'STRONGPASS'; GRANT ALL ON mautic.* TO 'mautic'@'localhost'; FLUSH PRIVILEGES;
  4. Point the nginx server block at /var/www/mautic/docroot, pass .php to the php8.3-fpm socket, and set client_max_body_size 20m for contact imports.

Install Mautic with Composer or the package

Two routes, same result. The production zip is quicker for one server; Composer makes later upgrades one command and is what the project recommends for anything you intend to keep.

  1. Composer: composer create-project mautic/recommended-project:^5 /var/www/mautic --no-interaction
  2. Package: download the current zip from mautic.org, unzip it into /var/www/mautic.
  3. sudo chown -R www-data:www-data /var/www/mautic so the web server can write var/cache and media.

With the Composer project the web root is docroot inside the folder. Point nginx there, not at the project root, or the configuration files become reachable.

Finish the install from the command line

The command-line installer is faster than the wizard and leaves a record of what it did. Run it as the web user so the files it writes belong to the right account.

  1. cd /var/www/mautic
  2. sudo -u www-data php bin/console mautic:install https://m.example.com --db_host=localhost --db_name=mautic --db_user=mautic --db_password=STRONGPASS --admin_email=you@example.com --admin_password=STRONGPASS
  3. Read the output to the end. It flags missing optional settings, then prints Install complete.
  4. Open https://m.example.com/s/login and sign in with the admin account.

Add the five cron jobs

This is the step that decides whether Mautic works. Segments, campaigns and email all run from cron, so a server without it logs in fine and never sends anything.

  1. * * * * * php /var/www/mautic/bin/console mautic:segments:update
  2. * * * * * php /var/www/mautic/bin/console mautic:campaigns:rebuild
  3. * * * * * php /var/www/mautic/bin/console mautic:campaigns:trigger
  4. * * * * * php /var/www/mautic/bin/console mautic:emails:send
  5. * * * * * php /var/www/mautic/bin/console messenger:consume email --time-limit=55

Add them with crontab -e for the web user, or in /etc/cron.d/mautic with the user column set to www-data. The time limit on the consumer stops it overlapping itself.

Verify login, cron and a test email

You know it worked when the dashboard shows cron has run, a test email arrives in a real inbox, and a segment rebuilds with a contact count.

  1. Open the dashboard and check the cron notice. It turns amber and red when the last run is late.
  2. Send a test email from Configuration, then Email Settings.
  3. Create one contact and one segment, then run php bin/console mautic:segments:update -v and watch the count.
  4. Check var/logs/ for the day. Cron errors land there, not in the browser.

Fix the failures that stop Mautic

SymptomCauseFix
Installer stops without an errormax_execution_time below 240Raise it in the PHP-FPM pool, restart PHP, rerun the install
Campaigns never firecron not runningAdd the five lines, confirm with the dashboard notice
Emails stay queuedmessenger:consume email missingAdd the consumer, or switch spooling to send immediately
500 on login after installvar/cache not writablechown -R www-data:www-data var and clear the cache
Installer cannot reach MySQLservice stopped or wrong hostsystemctl status mysql, use localhost, not the public IP

Keep Mautic on its own server

Mautic holds a queue, a cron schedule and a database that grows with tracking. Stacking it on a small VPS beside a busy WordPress site is how both get slow: the site waits on MySQL while the campaign rebuild runs.

If the box already runs something heavy, move Mautic to its own VPS before tuning anything else. One Mautic instance per server also keeps the cron user and file permissions simple, and the sending side belongs on email marketing hosting with its own IP reputation rather than on the web server itself.

When to email WebJi about a Mautic server

Email support@webji.services with the Ubuntu release, the PHP version from php -v, and the newest line from var/logs/. Support covers the server, the PHP build and the mail port; the Mautic project handles application bugs. Support is 24/7 by email in Hindi and English, with an average first reply under 60 minutes, and the office phone is not a support line.

Frequently Asked Questions

How much RAM does Mautic need on a VPS?

4 GB is the comfortable floor for a small list, because MySQL, PHP-FPM and the cron workers run together. 8 GB is safer past a few hundred thousand contacts or with heavy tracking.

Why are my Mautic campaigns not sending?

Cron is almost always the cause. Without mautic:campaigns:trigger and mautic:campaigns:rebuild running every minute, contacts never move through the campaign and no email is queued.

Where is the Mautic web root?

In the docroot folder of the installation, not the project root. Pointing nginx one level higher exposes configuration files and breaks asset paths.

Can I install Mautic on shared hosting?

Usually not. Mautic needs cron every minute, a CLI installer and raised PHP limits, which shared cPanel accounts rarely allow. A small VPS is the practical starting point.

Does WebJi support Mautic itself?

No. WebJi provides the server and the network. Application bugs and upgrade questions go to the Mautic community, and WebJi is not affiliated with the project.

Need help with this?

WebJi® support does it for you — free. Talk to our Jaipur team →