21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

Install Mautic on a VPS

Quick answer

To install Mautic on a VPS, set up Ubuntu with Nginx, PHP 8.3, MySQL and Composer, run composer create-project mautic/recommended-project, point Nginx at the docroot folder and finish with bin/console mautic:install. Then add cron jobs for segments, campaigns and the email queue. It works when a test email arrives and segments update.

For marketers and developers self-hosting Mautic marketing automation on their own Ubuntu server.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
4 min
Sections
9
Updated
14 Nov 2026
Written by
WebJi® team

What does Mautic need on a VPS?

Mautic needs a Linux VPS with a web server, PHP-FPM, MySQL or MariaDB, Composer and reliable cron; plan on 2 vCPU and 4 GB RAM for a small contact list. Exact PHP and database versions change with each Mautic major release, so check the requirements page for the version you install.

Mautic server requirements and sizing
ItemRecommendationWhy
OSUbuntu 24.04 LTSShips PHP 8.3 and current MySQL packages
CPU / RAM2 vCPU / 4 GB; 8 GB for large listsPHP-FPM, MySQL and cron workers run together
PHP settingsmemory_limit 512M, max_execution_time 240+The installer and imports time out below these
Disk20 GB+ NVMeContact, tracking and email-stat tables grow
Mail sendingAn SMTP or API email serviceProtects deliverability and the server IP

WebJi® VPS hosting starts from ₹499 a month before 18% GST, with the 2 vCPU / 4 GB VPS-Start sample quoted in INR. Shared hosting is not suitable because Mautic needs minute-by-minute cron and a CLI installer.

How do you prepare the Ubuntu server for Mautic?

Install Nginx, MySQL, PHP 8.3 with the extensions Mautic uses, and Composer, then create a database and user for Mautic. Run these as a sudo user on a fresh server.

sudo apt update
sudo apt install -y nginx mysql-server unzip \
  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 php8.3-imap
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

sudo mysql -e "CREATE DATABASE mautic CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'mautic'@'localhost' IDENTIFIED BY 'STRONG_PASSWORD';
GRANT ALL ON mautic.* TO 'mautic'@'localhost'; FLUSH PRIVILEGES;"

Set memory_limit = 512M and max_execution_time = 240 in /etc/php/8.3/fpm/php.ini (and the CLI php.ini), then sudo systemctl restart php8.3-fpm.

How do you install Mautic with Composer?

Create the project with composer create-project mautic/recommended-project, point Nginx at its docroot folder, then finish with the command-line installer. The Composer route makes later upgrades a single command.

sudo mkdir -p /var/www && sudo chown $USER /var/www
composer create-project mautic/recommended-project /var/www/mautic --no-interaction
sudo chown -R www-data:www-data /var/www/mautic

cd /var/www/mautic
sudo -u www-data php bin/console mautic:install https://m.example.in \
  --db_host=localhost --db_name=mautic --db_user=mautic --db_password='STRONG_PASSWORD' \
  --admin_email=you@example.in --admin_password='ANOTHER_STRONG_PASSWORD'
# /etc/nginx/sites-available/mautic (core lines)
server {
    listen 80;
    server_name m.example.in;
    root /var/www/mautic/docroot;
    index index.php;
    client_max_body_size 20m;
    location / { try_files $uri /index.php$is_args$args; }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
}

Point Nginx at docroot, never the project root, or configuration files become reachable. Add HTTPS with Certbot as in the Certbot and Nginx guide, then log in at /s/login.

Which cron jobs does Mautic need?

Mautic depends on cron to update segments, rebuild and trigger campaigns, and send queued email; without these jobs you can log in, but nothing is ever sent. Run them as the web user and stagger them so they do not all start at once.

# /etc/cron.d/mautic  (user column = www-data)
0,15,30,45 * * * *  www-data php /var/www/mautic/bin/console mautic:segments:update > /dev/null 2>&1
5,20,35,50 * * * *  www-data php /var/www/mautic/bin/console mautic:campaigns:rebuild > /dev/null 2>&1
10,25,40,55 * * * * www-data php /var/www/mautic/bin/console mautic:campaigns:trigger > /dev/null 2>&1
* * * * *           www-data php /var/www/mautic/bin/console messenger:consume email --time-limit=50 > /dev/null 2>&1

The time limit stops the email consumer overlapping itself. Imports, broadcasts and webhooks have their own commands listed in Mautic's cron documentation; add them as you start using those features. Cron syntax is explained in crontab examples.

How do you confirm Mautic is working?

Mautic is working when you can log in, a test email reaches a real inbox, and a segment updates its contact count after the cron job runs.

  1. Configure the mail transport (SMTP or API) under Configuration → Email Settings and send a test email.
  2. Create one contact and one segment, then run sudo -u www-data php bin/console mautic:segments:update -v.
  3. Build a small test campaign and confirm the contact moves through it.
  4. Check var/logs/ for errors; cron problems appear there, not in the browser.

Set SPF, DKIM and DMARC for the sending domain before any real campaign; the email authentication checker confirms the records.

How do you fix common Mautic installation problems?

Most Mautic failures are low PHP limits, missing cron jobs, wrong file ownership or an unreachable database. Read the log before reinstalling.

Mautic symptoms, causes and fixes
SymptomCauseFix
Installer stops part-waymax_execution_time or memory too lowRaise both, restart PHP-FPM, rerun
Campaigns never fireCron jobs missing or failingAdd the cron file; check var/logs
Emails stay queuedNo messenger:consume jobAdd the consumer cron line
500 error after installvar/cache not writable by www-datachown -R www-data:www-data var, clear cache
Cannot connect to databaseMySQL stopped or wrong hostsystemctl status mysql; use localhost

Should Mautic run on its own server?

Yes, once the list grows: Mautic's cron jobs and tracking tables compete for MySQL with any website on the same VPS, so separating them keeps both responsive. Sending through a dedicated email service also keeps bulk mail off the web server's IP.

WebJi® email marketing hosting covers the sending side, and sizing guidance is in how much RAM a VPS needs. For server issues, email support@webji.services with your Ubuntu release, php -v output and the latest log line; WebJi® supports the server and PHP stack, while the Mautic project handles application bugs.

FAQ

Frequently asked questions

Can Mautic send email directly from the VPS?

Technically yes, but new server IPs have no sending reputation and are often blocked or spam-foldered. Use an SMTP relay or email API for marketing mail, and keep the VPS for the application.

How do I upgrade a Composer-based Mautic install?

Back up the database and files, then run composer update in the project folder, followed by php bin/console doctrine:migrations:migrate and a cache clear. Read the release notes first, since major versions can change PHP requirements.

Is Mautic free?

Yes. Mautic is open-source under the GPL, so self-hosting has no licence fee. You pay for the server, the email sending service and your time, or a managed provider, instead of per-contact subscription pricing.

Does Mautic need GDPR or DPDP consent handling?

Your business does. Mautic provides tools such as preference centres, do-not-contact flags and consent fields, but you must collect valid consent, honour unsubscribes and handle deletion requests under the DPDP Act, 2023.

Commands checked against Mautic's installation and cron documentation · Reviewed by the WebJi® team, Jaipur.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.