
Mautic is a robust open-source marketing automation platform designed to help businesses manage customer engagement through email campaigns, contact tracking, lead nurturing, and detailed analytics. As a self-hosted alternative to commercial platforms like HubSpot or Marketo, Mautic provides full control over your data and marketing workflows.
This article explains how to install and deploy Mautic on an Ubuntu 24.04 server using the LEMP stack (Linux, Nginx, MySQL, PHP). You’ll configure each component for production use and prepare the environment to serve Mautic over the web.
Before you begin, you need to:
mautic.example.com.The LEMP stack consists of Linux, Nginx, MySQL, and PHP is a lightweight and efficient platform for hosting dynamic PHP applications. It provides strong performance, scalability, and reliability, making it well-suited for running tools like Mautic. Follow the steps below to install and configure the LEMP stack.
Refer to the LEMP Stack Installation article to install Nginx, MySQL, and PHP before proceeding with the steps below.
View the installed Nginx version.
Your output should be similar to the one below:
View the installed MySQL version.
Your output should be similar to the one below:
View the installed PHP version.
Your output should be similar to the one below:
Install all the required PHP extensions for Mautic.
When PHP is installed as a dependency, it may also install Apache. Remove it to prevent conflicts with Nginx.
Edit the PHP-FPM configuration file to optimize performance. Replace 8.3 with your installed PHP version.
Update the following values:
Restart the PHP-FPM service.
Mautic requires a database to ensures that it stores and organizes contact data, email logs, campaign activities, and configuration settings efficiently and securely. In this section, you’ll create a database and a user with the necessary privileges to interact with it.
Access the MySQL console as root user.
Create a new Mautic database named mauticdb.
Create a new MySQL user with a secure password to use with the Mautic database. Replace securepassword with a strong password.
Grant the new user full privileges to the Mautic database
Refresh the MySQL privileges table to apply changes.
Exit the MySQL database console.
To install Mautic, download the latest stable release from the Mautic GitHub Releases page. The release is available as a ZIP archive that contains all necessary files to run Mautic. Follow the steps below to download the archive, extract it to your web root directory, and configure the application on your server.
Download the latest stable release of Mautic from the official release page.
Extract the Mautic archive.
Move the extracted directory to the Nginx web root.
Grant ownership of the Mautic directory to the Nginx www-data user.
Grant ownership of the /var/www directory to the Nginx www-data user so it can create the .npm directory for storing logs.
Install Composer and NPM.
View the installed Composer version.
Your output should be similar to the one below:
View the installed NPM version.
Your output should be similar to the one below:
Navigate to the Mautic installation directory.
Install necessary dependencies using Composer.
Set the Mautic directory permissions for execution and file access.
To ensure Mautic functions as expected, you need to configure your Nginx web server and set up required cron jobs for background tasks. Follow the steps below to configure Nginx and Cron for Mautic.
Create a new Nginx virtual host configuration file for Mautic.
Add the following configuration to the file. Replace mautic.example.com with your actual domain name.
Test the Nginx configuration.
Reload Nginx to apply changes.
Allow HTTP traffic through the firewall.
Allow HTTPS traffic.
Reload the firewall to apply new rules.
Install Certbot for SSL certificate management.
Generate a free SSL certificate using Certbot. Replace mautic.example.com and hello@example.com with your actual domain and email address.
When successful, your output should look like the one below:
Verify that automatic certificate renewal is working.
Your output should be similar to the one below:
Output should confirm that simulated renewals succeeded.
Set up cron jobs to update mailing list segments, email marketing campaigns, campaign events and process email queues. Open the crontab editor for the web server user.
Add the following cron jobs to automate Mautic tasks.
After setting up the LEMP stack and configuring your domain, complete the Mautic installation using its graphical web installer.
Visit your domain in a browser such as Chrome. You will get the Ready to install message as below.
Click Next Step to continue the installation.
On the Database Setup page, fill in your MySQL connection details.
Enter the values for following fields:
Enter the admin user details to manage your Mautic instance:
Enter the following details:
Enter your admin user and password, then click the Login.
After logging in, the Mautic dashboard serves as your central interface for managing marketing automation workflows. From the dashboard, you can access contacts, emails, campaigns, forms, and other tools to monitor engagement and automate tasks. It includes several core components to help you organize and manage user behavior effectively. One of the key features is Stages, which allows you to segment contacts based on their journey or interactions.
Stages allows you to define and manage a contact's position within your marketing funnel. You can assign stages based on user behavior, campaigns, or external events.
From the left navigation menu click Stages and click New to create a new stage.
On the New Stage Action page, fill out the following details.
Enter the following details:
Click Save & Close to save the changes and return back to the main list of stage actions.
The Companies feature in Mautic allows you to associate individual contacts with a broader organization or business entity. This is useful for B2B marketing, where you want to group contacts under company profiles for segmentation, reporting, or ownership assignment.
Navigate to Companies section in the sidebar and click New to create a new company profile.
On the New Company page fill out the following details.
Enter the following details:
Click Save & Close to save the company information.
Contacts in Mautic represent individual leads or customers. You can capture, tag, and segment these contacts based on behavior, engagement, or company affiliation.
Click Contacts from the sidebar and click the Quick Add in the top right.
On the New Contact page enter the following details to create a contact.
Enter the following details:
Click Save to add the new contact to your Mautic database.
Segments are filtered groups of contacts used for targeting in campaigns. Segments are dynamic and auto-update when contacts meet the criteria.
Click Segments from the sidebar and click New to create a new segment.
On the New Segment page enter the general information for your contact segment.
Enter the following details:
Under Filters tab, specify the criteria for including contacts in this segment.
Click Save & Close to save the changes.
Assets in Mautic refer to digital documents such as white papers, PDFs, images, eBooks, or any content that you want to share with your contacts. These assets can be stored locally or linked from external sources.
In the sidebar, navigate to Components > Assets and click New to upload a new asset.
Choose the storage location.
Upload the file from your local computer.
Configure Additional Settings:
After all settings are configured, click Save & Close to save the asset and return to the asset list.
Forms in Mautic allow you to collect contact information, engage with users, and trigger automated actions such as email responses, tagging, or campaign enrollment. You can create two types of forms: Campaign Forms (used in campaigns) and Standalone Forms (used independently).
Navigate to Components > Forms in the sidebar and click New to begin form creation.
Choose the form type.
On the New Form page enter the required details.
Enter the following details:
Set up "successful submit action"
Configure Additional Settings:
Under the Fields tab, add input fields, checkboxes, radio buttons, and other elements that collect data from users.
Under the Actions tab, set up actions based on form submissions, like sending an email, adjusting contact points, or adding tags.
Click Save & Close to activate the form and return to the form list.
Landing pages are standalone web pages used for specific marketing purposes such as promoting webinars, offering white-papers, or collecting opt-ins through forms. Mautic allows you to create and customize landing pages using themes or a visual page builder.
Navigate to Components > Landing Pages in the sidebar.
Select a Theme template or use the Visual Page Builder to design the page from scratch.
Configure basic page details:
Configure advanced settings:
Design the landing page:
Click Builder to launch the visual editor.
Use drag-and-drop elements to build your layout.
Adjust elements and styles to fit your branding and campaign goals.
Click Save & Close to publish and return to the landing page list.
Campaigns enable you to automate interactions with contacts through drip workflows based on actions, decisions, and conditions. You can use campaigns to nurture leads, follow up on form submissions, or deliver personalized content over time.
Navigate to Campaigns and click New to begin creating a campaign.
Enter a name, and description for your campaign.
Configure Campaign Settings:
Build the campaign workflow.
Click Launch Campaign Builder to open the visual builder interface.
Use the drag-and-drop builder to create your workflow.
After designing the campaign, click Save & Close to apply changes and return to the campaign list.
Emails in Mautic are used to deliver newsletters, drip campaigns, transactional messages, and campaign-specific content to your contacts.
Navigate to Channels > Emails and click New.
Choose email type.
Choose a theme that suits your message style and click Builder to open the visual builder for designing the layout and content.
Configure email settings under the Advanced tab:
Fill out the below details in the right pane:
Click Save & Close to save your changes.
Point Actions allow you to assign or subtract points when contacts perform specific interactions, helping you score and rank leads based on engagement.
Navigate to Points > Manage Actions and click New.
Fill out the point action details:
Configure activation settings:
Click Save & Close to save your settings.
Point Triggers automate responses based on a contact’s point total, such as sending an alert, assigning to a segment, or updating contact details.
Navigate to Points > Manage Triggers and click New.
On the New Trigger page enter the following details.
Configure the trigger:
Define trigger behavior:
Click Save & Close to store your settings.
You have installed and configured Mautic on an Ubuntu 24.04 server using the LEMP stack, and explored core features like Contacts, Emails, Landing Pages, Campaigns, and Points. Mautic is a reliable, open-source marketing automation tool that give you full control over your campaigns and customer engagement workflows. With consistent updates and a strong user community, it’s an excellent choice for scalable, privacy conscious marketing.
0 Comments
Be the first to comment and share your perspective with the community.