Mautic on Ubuntu 24.04 on Azure User Guide
Overview
Mautic is the leading open source marketing automation platform, used by marketing teams to capture and nurture leads, score contacts, build visual multi step campaigns, send email journeys and newsletters, and publish landing pages and forms. The cloudimg image delivers Mautic 7.1.2 fully installed and configured on Ubuntu 24.04 LTS — a Symfony application on PHP 8.3 with OPcache, served by nginx with php-fpm, backed by a local MariaDB database. The schema is migrated at build time and the marketing cron jobs run as systemd timers, so a complete marketing automation service is running within minutes of launch with no setup wizard to complete. Backed by 24/7 cloudimg support.
What is included:
- Mautic 7.1.2 (GPL-3.0 licensed), served from
/var/www/mautic - nginx + PHP 8.3 (php8.3-fpm with OPcache) + 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 independently resizable, separate from the OS disk and re-provisioned with every VM - 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 no job fires before first-boot credential rotation completes
nginx.service,php8.3-fpm.serviceandmariadb.serviceas systemd units, enabled and active- 24/7 cloudimg support

Prerequisites
An active Azure subscription, an SSH key pair, and a VNet + subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting point for evaluation; scale up for larger contact lists and heavier sending volume. NSG inbound: allow 22/tcp from your management network and 80/tcp (HTTP) from your users, plus 443/tcp if you enable HTTPS with your own domain.
Step 1 — Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Mautic by cloudimg, and 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). Review the two dedicated data disks on the Disks tab, then Review + create → Create.
Step 2 — Deploy from the Azure CLI
az vm create \
--resource-group <your-rg> \
--name mautic \
--image <marketplace-image-urn> \
--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 1010
Step 3 — Connect to your VM
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 answers 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}'
Expected: 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: a fresh application secret, a fresh MariaDB password, and a fresh administrator password. It 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.txt
The 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 — this reads the per-VM credentials, fetches a CSRF token and posts 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 signing in you land on the dashboard, which summarises engagement, page hits and recent activity across your marketing.

Step 7 — Manage contacts and campaigns
From the top navigation you reach Contacts, where captured leads are scored, segmented and managed. Each contact carries a lifecycle stage, points score and 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
grep -o '"version": "[0-9.]*"' /var/www/mautic/app/release_metadata.json | head -1
df -h /var/lib/mysql /var/www/mautic
Expected: "version": "7.1.2", then the two dedicated data disks. The database tier (/var/lib/mysql) and the application tier (/var/www/mautic — code, config, runtime cache and media uploads) each live on their own dedicated Azure data disk, so you can 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, so the per-VM credentials and rotated secrets are in place before Mautic serves its first authenticated request. It rewrites config/local.php with a fresh application secret and database password in lock-step with the MariaDB user, rotates the administrator password, writes the credentials file at mode 0600 (root only), and drops a sentinel so it runs exactly once:
systemctl status mautic-firstboot.service --no-pager | head -6
sudo stat -c '%a %U:%G %n' /root/mautic-credentials.txt

Administration from the CLI
Mautic ships a Symfony console at /var/www/mautic/bin/console, 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-pager
Common 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, open 443/tcp in the NSG, then obtain a trusted certificate with Let's Encrypt (replace the domain):
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com
After 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 and the application tree + uploaded media 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.sql
Keep 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
This image is backed by 24/7 cloudimg support. Contact us by email and 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.