---
title: Deploy Mautic with AI on Blossom
url: "/deploy/mautic/"
canonical_url: https://blossom88.com/deploy/mautic/
markdown_url: https://blossom88.com/deploy/mautic.md
summary: Build a contact segment and test a marketing campaign on your own Mautic
  deployment.
categories:
- deployment
- marketing
stack:
- PHP
- Symfony
- MySQL
- SMTP
---

# Deploy Mautic with AI on Blossom

[Mautic](https://www.mautic.org/) groups contacts, builds email campaigns and
tracks what happened after each campaign action.

## Ask Your Agent

> **Ask your AI agent:** Deploy Mautic on Blossom and help me send a test campaign to a private inbox.
>
> Follow this guide: https://blossom88.com/deploy/mautic/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Have Ready

Nothing is required beyond your Blossom account.

- **An SMTP provider** (Later): Use a test inbox first. Connect your sender when you are ready to send to real contacts.

## How It Runs

| Part | Role | Where |
|---|---|---|
| Mautic | Manage contacts and campaigns | Persistent Service behind Blossom Account access |
| MySQL | Store contacts, segments and campaign history | Blossom Managed Data |
| Mailpit | Capture test messages | Private Service on App Capacity |

## Deploy Mautic

Use the supported official Apache image and link managed MySQL. Keep Mautic
behind Blossom Account access and configure its SMTP transport to point to a
private Mailpit Service for the trial.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom database_instance:create --data mysql.yml --follow
    blossom environment_link:create --data mysql-link.yml
    blossom service:create --data mailpit.yml
    blossom service:create --data mautic.yml
    blossom environment:deploy --id environment-100 --follow

</details>

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Mount a [Persistent Service Volume](/docs/apps/persistent-services/) at
`/var/www/html/config` and run setup on an empty configuration directory.
Use the Service's HTTPS URL as the site URL. For the trial, point Mautic's
SMTP transport at Mailpit's private address on port 1025 and check the
test inbox on port 8025.

Configure Mautic's [trusted proxies](https://docs.mautic.org/en/7.2/configuration/settings.html#miscellaneous-settings)
with the Blossom ingress addresses shown in the web access logs. Mautic
uses their forwarded HTTPS information to generate login and API URLs.

</details>

## Create a Test Segment

Create a sample contact and add it to your welcome segment.

> **Ask your AI agent:** Create a sample contact and add it to a welcome segment.

> Follow this guide: https://blossom88.com/deploy/mautic/



## Run the Campaign

Use the welcome segment as the campaign source. Add a welcome email action.
Run the segment update, campaign update and campaign trigger in order, then
open Mailpit to check the message.

> **Ask your AI agent:** Send one welcome email to the test segment and show me the captured message.

> Follow this guide: https://blossom88.com/deploy/mautic/



<details class="optional-reading" markdown="1">
<summary>Campaign commands</summary>

    blossom shell --service service-100 -- runuser -u www-data -- php /var/www/html/bin/console mautic:segments:update
    blossom shell --service service-100 -- runuser -u www-data -- php /var/www/html/bin/console mautic:campaigns:update
    blossom shell --service service-100 -- runuser -u www-data -- php /var/www/html/bin/console mautic:campaigns:trigger

</details>

![Open the checkout email campaign.](/deploy/assets/images/mautic/check-campaign-delivery.webp)

## Keep Campaign Settings Across Updates

Keep the configuration Volume and linked MySQL database when you update Mautic.
Reopen the same campaign after the update to confirm its history is still there.

> **Ask your AI agent:** Replace the Mautic Container and reopen my test campaign and contact.

> Follow this guide: https://blossom88.com/deploy/mautic/



![Find the same contact after Container replacement.](/deploy/assets/images/mautic/reopen-campaign-contact.webp)

## What You Get

One sample contact, one welcome campaign, and one message in the private test
inbox. You can reopen the same campaign and contact after replacing the Mautic
Container.

## What You Get

- Contacts grouped into a segment
- A campaign that sends a welcome email
- A private inbox for testing before connecting an email provider

Tested on Blossom: The test inbox received one campaign email, and the campaign and contact stayed available after replacing the Mautic Container.
