Mautic
Overview
Mautic is the leading open source marketing automation platform. Marketing teams use it to capture and nurture leads, score contacts, build visual multi-step campaigns, send email journeys and newsletters, and publish landing pages and forms.
The SecureAnyCloud image delivers Mautic 7.1.2 fully installed and configured on Ubuntu 24.04 LTS. It is a Symfony application on PHP 8.3 with OPcache, served by nginx with php-fpm and backed by a local MariaDB database.
The schema is migrated at build time, and the marketing cron jobs run as systemd timers. A complete marketing automation service is therefore running within minutes of launch, with no setup wizard to complete.
What you get:
- Mautic 7.1.2 (GPL-3.0 licensed), served from
/var/www/mautic - nginx, PHP 8.3 (php8.3-fpm with OPcache) and MariaDB 10.11, all from Ubuntu 24.04 main/universe
- A dedicated Azure data disk at
/var/lib/mysql(database tier) and a second at/var/www/mautic(application code, config, runtime cache and media uploads). Each is independently resizable, separate from the OS disk and re-provisioned with every VM - A per-VM administrator password, MariaDB password and application secret, all generated at first boot and written to a root-only file. No shared or default login ships in the image
- Mautic's background jobs (segment updates, campaign rebuild and trigger, email send, broadcasts) wired as systemd timers, gated so that no job fires before first-boot credential rotation completes
nginx.service,php8.3-fpm.serviceandmariadb.serviceas systemd units, enabled and active- 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image, you need:
- An active Azure subscription
- An SSH key pair
- A VNet and subnet in the target region
- An NSG that allows inbound
22/tcpfrom your management network and80/tcp(HTTP) from your users, plus443/tcpif you enable HTTPS with your own domain
Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point for evaluation. Scale up for larger contact lists and heavier sending volume.
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, and search the Marketplace for Mautic by SecureAnyCloud. Select Create.
- On Basics, pick your subscription, resource group, region and size.
- Under Administrator account, choose SSH public key and paste your key.
- Under Inbound port rules, allow SSH (22) and HTTP (80).
- On the Disks tab, review the two dedicated data disks.
Then choose Review + create, followed by Create.
Step 2 - Deploy from the Azure CLI
Accept the Marketplace terms once per subscription. You must do this before your first CLI deploy. Then create the VM and open port 80:
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:mautic-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name mautic \
--image sac1647283583153:mautic-ubuntu-24-04:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name mautic --port 80 --priority 1010Step 3 - Connect to your VM
Connect over SSH as the administrator user you created:
ssh azureuser@<vm-public-ip>Step 4 - Confirm the services are running
The three services that back Mautic should all report active, and the sign-in page should answer HTTP 200:
systemctl is-active nginx php8.3-fpm mariadb curl -s -o /dev/null -w 'Mautic login page -> HTTP %{http_code}\n' http://127.0.0.1/s/login
sudo ss -tlnp | grep -E ':80 |:3306 ' | awk '{print $1, $4}'The output shows three lines of active, then Mautic login page -> HTTP 200, then nginx listening on :80 and MariaDB on 127.0.0.1:3306.
Step 5 - Retrieve your administrator credentials
On the first boot of every VM, a one-shot service (mautic-firstboot.service) generates credentials that are unique to that VM. These are a fresh application secret, a fresh MariaDB password and a fresh administrator password. The service also points Mautic's site URL at the VM's own address. No shared or default credentials ship in the image.
sudo cat /root/mautic-credentials.txtThe file (mode 0600, root only) contains the administrator username (mautic.admin.user, which is admin), the administrator password (mautic.admin.pass) and the site URL (mautic.url).
You can prove the login round-trip from the VM's own shell. The following commands read the per-VM credentials, fetch a CSRF token and post a real sign-in against Mautic's login endpoint. A successful sign-in answers HTTP 200 on the authenticated dashboard.
ADMIN_USER=$(sudo grep '^mautic.admin.user=' /root/mautic-credentials.txt | cut -d= -f2-)
ADMIN_PASS=$(sudo grep '^mautic.admin.pass=' /root/mautic-credentials.txt | cut -d= -f2-)
CJ=$(mktemp)
TOKEN=$(curl -s -c "$CJ" http://127.0.0.1/s/login | grep -m1 -oE 'name="_csrf_token"[^>]*value="[^"]+"' | sed -E 's/.*value="([^"]+)".*/\1/')
curl -s -o /dev/null -w 'admin login -> HTTP %{http_code}\n' -b "$CJ" -c "$CJ" -L \
--data-urlencode "_csrf_token=$TOKEN" --data-urlencode "_username=$ADMIN_USER" --data-urlencode "_password=$ADMIN_PASS" \
http://127.0.0.1/s/login_check rm -f "$CJ"Step 6 - Sign in to Mautic
Browse to http://<vm-public-ip>/ and sign in with the administrator username and password from the credentials file.
After you sign in, you land on the dashboard. It summarises engagement, page hits and recent activity across your marketing.
Step 7 - Manage contacts and campaigns
From the top navigation, open Contacts, where you score, segment and manage captured leads. Each contact carries a lifecycle stage, a points score and a full engagement timeline.
Under Campaigns, you build visual multi-step journeys. The drag-and-drop campaign canvas chains decisions, actions and conditions, so contacts flow through nurture sequences, email journeys and re-engagement automatically.
To start sending email, open Settings > Configuration > Email Settings and connect your SMTP provider (Amazon SES, Mailgun, SendGrid or any SMTP host).
Step 8 - Confirm the version and the data tiers
Run the following commands to check the Mautic version and the two data disks:
grep -o '"version": "[0-9.]*"' /var/www/mautic/app/release_metadata.json | head -1 df -h /var/lib/mysql /var/www/mauticThe output shows "version": "7.1.2", then the two dedicated data disks. The database tier (/var/lib/mysql) and the application tier (/var/www/mautic, which holds code, config, runtime cache and media uploads) each live on their own dedicated Azure data disk. You can therefore grow storage for either tier without disturbing the OS disk.
First-boot service and security model
A one-shot mautic-firstboot.service runs After=mariadb.service. The per-VM credentials and rotated secrets are therefore in place before Mautic serves its first authenticated request.
The service rewrites config/local.php with a fresh application secret and database password, in lock-step with the MariaDB user. It rotates the administrator password and writes the credentials file at mode 0600 (root only). It then drops a sentinel so that it runs exactly once.
systemctl status mautic-firstboot.service --no-pager | head -6 sudo stat -c '%a %U:%G %n' /root/mautic-credentials.txtAdministration from the CLI
Mautic ships a Symfony console at /var/www/mautic/bin/console, which you run as the www-data web user. List the available commands, or check the scheduled marketing timers:
sudo -u www-data php /var/www/mautic/bin/console --version systemctl list-unit-files 'mautic-*.timer' --no-pagerCommon operations include mautic:segments:update, mautic:campaigns:trigger and mautic:emails:send. These already run automatically as systemd timers, so campaigns fire reliably from the first minute with no manual cron configuration.
Enabling HTTPS with your own domain
The image serves Mautic over HTTP on port 80. For production, point a real domain at the VM's public IP and open 443/tcp in the NSG. Then obtain a trusted certificate with Let's Encrypt, replacing the domain with your own:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.comAfter the certificate is issued, update Mautic's site URL under Settings > Configuration to https://your-domain.com. Then clear the cache with sudo -u www-data php /var/www/mautic/bin/console cache:clear --env=prod.
Backup and maintenance
The database lives on the data disk at /var/lib/mysql. The application tree and uploaded media live on the data disk at /var/www/mautic. Snapshot both disks in Azure for a point-in-time backup, or dump the database with:
sudo mariadb-dump mautic > mautic-backup.sqlKeep the OS patched with sudo apt update && sudo apt upgrade. Unattended security upgrades are enabled by default. The stack restarts cleanly with sudo systemctl restart mariadb php8.3-fpm nginx.
Support
SecureAnyCloud backs this image with 24/7 support. Contact us by email or chat for help with Mautic deployment, upgrades, campaign and segment design, email deliverability and SMTP configuration, landing pages and forms, performance tuning and database administration.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on Azure
Launch Mautic on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
This image runs Mautic, the leading open source marketing automation platform, behind nginx with PHP FPM 8.3 and OPcache enabled, with every PHP extension Mautic requires. MariaDB provides the database on the same instance, bound to the loopback interface only.
The Mautic background jobs (segment updates, campaign rebuild, campaign trigger, email send and broadcast send) run through systemd timers. The platform therefore processes its queues from the moment it boots.
The image ships with Mautic's database schema already migrated and the installer already run. The first request lands directly on the sign-in page, with no setup wizard to work through.
The first boot of every deployed instance generates a fresh administrator password, a fresh MariaDB password and a fresh application secret, and points the site URL at the instance's public address. Two instances launched from the same Amazon Machine Image never share secrets. The administrator credentials are written to /root/mautic-credentials.txt with mode 0600, so only the root user can read them.
The Mautic application tree (code, configuration, runtime cache, logs and media uploads) lives under /var/www/mautic on a dedicated EBS volume, separate from the operating system disk. The MariaDB data directory sits on its own EBS volume at /var/lib/mysql. You can resize each tier independently of the others.
Prerequisites
Before you deploy this image, you need:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network and inbound ports 80 and 443 from the networks your marketing team will reach Mautic on
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
Launch the instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for Mautic. Select the SecureAnyCloud listing and choose Select, then Continue on the subscription summary.
Pick an instance type of m5.large or larger. Mautic is a Symfony application with PHP and MariaDB on the same instance, and segment rebuilds and campaign processing benefit from memory. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that allows inbound port 22 from your management network and inbound ports 80 and 443 from the networks your users use. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialisation takes a few seconds after the instance state becomes Running and the status checks pass.
Launch the instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud Mautic Marketplace AMI into an existing subnet and security group. Replace the values in angle brackets as follows:
- Replace <ami-id> with the AMI ID shown on the Marketplace listing.
- Replace <key-name> with your EC2 key pair name.
- Replace <subnet-id> with your subnet ID.
- Replace <security-group-id> with a security group that opens ports 22, 80 and 443 as described above.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--block-device-mappings '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":30,"VolumeType":"gp3"}}]' \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=mautic-01}]'On success, the command prints a JSON document. Note the instance ID. Once the instance is running, retrieve its public address with aws ec2 describe-instances --instance-ids <instance-id> --query "Reservations[].Instances[].PublicIpAddress" --output text.
Connect and retrieve the initial credentials
Connect over SSH with the key pair you selected and the public IP address from step 2. The SSH login user depends on the operating system of the AMI variant you launched. For Mautic 7.1.2 on Ubuntu 24.04, the login user is ubuntu.
Connect with ssh -i <path-to-key.pem> ubuntu@<instance-public-ip>, substituting your key path and the instance's public IP address.
First boot writes the per-instance administrator credentials to a root-only file. Read them with:
sudo cat /root/mautic-credentials.txtThe file lists the Mautic URL, the administrator username (admin) and the generated administrator password. Store the password in your password manager and treat this file as sensitive.
Verify that the stack is running
Three systemd units serve Mautic. Confirm that they are active:
systemctl is-active nginx php8.3-fpm mariadbEach line returns active. Confirm that nginx is listening on port 80 with ss -tlnp | grep ':80'. Confirm the PHP version with php -v. This image ships PHP 8.3.
Sign in for the first time
Browse to http://<instance-public-ip>/. Mautic redirects to its sign-in page at /s/login. Sign in with the username admin and the password from /root/mautic-credentials.txt.
After you sign in, you land on the Dashboard, which charts contacts created, page visits and form submissions over time. The left navigation gives you:
- Contacts and Companies
- Segments
- Components (assets, forms and landing pages)
- Campaigns
- Channels (emails, text messages and social monitoring)
- Points, Stages, Reports and Projects
Change the administrator password and set your details
The first-boot password is unique to your instance, but you should still set your own. Select the account icon in the top right and open Account settings. Set your name and a real email address. Change the password to one you control. Mautic stores user passwords as bcrypt hashes.
Configure outbound email (SMTP)
Mautic sends campaign email through the mailer you configure. Open the settings cog in the top right, choose Configuration, and open Email Settings.
Set the Data Source Name (DSN) for your SMTP provider, for example Amazon SES, Mailgun, Postmark or your own relay. The DSN covers the host, port, username and password. Also set the default from name and address.
Use the Send test email button to confirm delivery. Complete your provider's domain verification (SPF, DKIM) so your campaigns land in the inbox rather than spam.
Until you configure a mailer, queued email stays in the spool. The rest of the platform works normally.
Create contacts and segments
Contacts are the heart of Mautic. Open Contacts and use Quick Add to create a contact by hand, or New for the full editor. To load contacts from CSV, use the import option behind the menu. Every contact record carries fields, tags, points, stage, segment memberships and a full engagement timeline.
Segments (left navigation, then Segments) group contacts dynamically by filters such as country, score, page hits, email engagement and custom fields. Create a segment and define its filters. The segment-update background job already running on this instance keeps its membership current automatically.
Build a campaign
Open Campaigns and select New. Choose the contact segments that the campaign feeds from, then open the visual campaign builder. Add the following elements and wire them together with timed delays into a multi-step journey:
- Actions: send email, adjust points, change stage, push to integration
- Decisions: opens email, visits page, submits form
- Conditions: field values, segment membership
Publish the campaign when you are done.
The campaign-update and campaign-trigger background jobs on this instance rebuild campaign membership and fire due events every five minutes. The email-send job flushes the message queue every two minutes. No cron configuration is required.
Use forms and landing pages
Under Components, you will find Forms and Landing Pages.
- Forms capture leads. Build the fields and choose what happens on submit (create contact, adjust points, send email, start a campaign). Then embed the generated HTML or JavaScript on any site, or place the form on a Mautic landing page.
- Landing pages are built in Mautic's drag-and-drop builder from the bundled responsive themes. They track every visit against the contact record.
Pair a form with a landing page and a campaign, and you have a complete acquisition funnel. A visitor submits the form, becomes a contact and enters a segment. The campaign then takes over.
Review the background jobs
This image wires Mautic's documented cron jobs as systemd timers. They run as the web server user and are staggered to avoid contention:
- mautic-segments-update runs mautic:segments:update every 5 minutes
- mautic-campaigns-update runs mautic:campaigns:update every 5 minutes
- mautic-campaigns-trigger runs mautic:campaigns:trigger every 5 minutes
- mautic-emails-send runs mautic:emails:send every 2 minutes
- mautic-broadcasts-send runs mautic:broadcasts:send every 15 minutes
List the timers and their next run times:
systemctl list-timers 'mautic-*' --no-pagerTo inspect a job's last run, use systemctl status mautic-segments-update.service or journalctl -u mautic-emails-send.service.
Enable HTTPS with Let's Encrypt
For production use, serve Mautic over HTTPS. Point a DNS name at the instance's public address, then install Certbot and obtain a certificate.
The commands below use mautic.example.com as an example. Replace it with your domain and run the commands as root. They involve interactive prompts and a domain you own, so run them yourself rather than copying them blindly.
Install Certbot and the nginx plugin, then request a certificate. Certbot edits the nginx site in place and reloads nginx:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d mautic.example.com
After HTTPS is live, update Mautic's site URL to the secure address. Open Configuration > System Settings and set Site URL to https://mautic.example.com. Tracking links, email images and form embeds then use the secure origin.
Back up and maintain the instance
The Mautic database lives in MariaDB on the /var/lib/mysql volume. The application files, configuration and media uploads live under /var/www/mautic. Back up both. A simple database dump is:
sudo mysqldump --single-transaction mautic | gzip > mautic-db-$(date +%F).sql.gzTake EBS snapshots of the data volumes for point-in-time recovery. Snapshot before any Mautic version upgrade. Keep the operating system patched with sudo apt-get update && sudo apt-get -y upgrade.
Review the storage layout
The application and database tiers are on dedicated EBS volumes. You can resize each one independently.
df -h /var/lib/mysql /var/www/mauticThe directory /var/lib/mysql holds the MariaDB data directory. The directory /var/www/mautic holds the Mautic code, configuration, runtime cache and media uploads. To grow a tier, modify the EBS volume in the EC2 console. Then extend the filesystem with sudo resize2fs <device>.
Screenshots
The Mautic sign-in page, served on first boot with a per-instance administrator password:
The dashboard, charting contacts created, page visits and form submissions:
The contacts view, where captured leads are scored, segmented and managed:
The campaigns view, home of the visual multi-step campaign builder:
Support
SecureAnyCloud backs this image with 24/7 technical support. Support covers Mautic deployment, upgrades, campaign and segment design, email deliverability and SMTP configuration, performance tuning and database administration. Contact support through the channel listed on the AWS Marketplace listing.
Deploy on AWS
Launch Mautic on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com