How To Install Mautic On A VPS Easily & Securely [2020 Guide]
Learn how to install and configure Mautic on your own VPS with this comprehensive step-by-step guide for better marketing automation control
Introduction [00:00]
In this comprehensive guide, we’ll walk you through the process of installing Mautic, a powerful open-source marketing automation platform, on your own Virtual Private Server (VPS). This DIY approach to email marketing automation offers greater control and cost-effectiveness compared to traditional hosted solutions. However, it’s important to note that this method requires some technical know-how and responsibility for server management.
The guide is based on the Mautic installation process demonstrated by Dave from Profitable Tools. We’ll cover everything from setting up your VPS to configuring Mautic and installing essential cron jobs. While the process may seem daunting at first, this step-by-step tutorial will make it accessible even for those without extensive development or system administration experience.
By the end of this guide, you’ll have a fully functional Mautic installation running on your own secure server, ready to power your email marketing campaigns and automations. Whether you’re looking to save costs, gain more control over your marketing tools, or simply explore the world of self-hosted solutions, this guide will provide you with the knowledge and confidence to get started with Mautic on a VPS.
Get VultrGetting Started [02:22]
Setting up Mautic on a VPS requires careful consideration of your hosting provider and server specifications. This section will guide you through the initial steps of selecting and configuring your VPS for optimal Mautic performance.
Choosing a VPS Provider
When it comes to selecting a VPS provider for your Mautic installation, it’s crucial to choose a reliable and high-performance platform. While the guide specifically recommends Vultr, there are several other reputable options to consider:
- Vultr: Known for its high-frequency VPS options and competitive pricing.
- Amazon Web Services (AWS): Offers a wide range of scalable cloud computing solutions.
- Google Cloud Platform: Provides robust infrastructure with a global network.
- DigitalOcean: Popular among developers for its simplicity and performance.
Regardless of the provider you choose, ensure that they offer sufficient resources to run Mautic effectively.
Server Specifications
For optimal Mautic performance, consider the following server specifications:
- Operating System: Ubuntu 18.04 LTS
- CPU: At least 1 vCPU (2 vCPUs recommended for better performance)
- RAM: Minimum 2GB (4GB or more recommended for larger installations)
- Storage: 20GB SSD storage (more if you plan to store many assets)
- Bandwidth: Depends on your expected traffic, but start with at least 1TB per month
Setting Up Your VPS
Follow these steps to set up your VPS:
- Choose your preferred data center location (e.g., Chicago for proximity)
- Select Ubuntu 18.04 as your operating system
- Choose a plan that fits your needs (e.g., the middle-tier plan with 2 vCPUs and 4GB RAM)
- Enable IPv6 if desired (not necessary for basic Mautic functionality)
- Consider enabling auto backups for an additional fee (recommended for data safety)
Creating SSH Keys
Secure Shell (SSH) keys are essential for secure server access. Here’s how to generate and add SSH keys:
- For Mac/Linux users: Use the Terminal application
- For Windows users: Download and use PuTTY
- Generate a unique SSH key for each server you manage
- Add the public key to your VPS provider’s control panel
- Ensure there are no extra line breaks or spaces when adding the key
DNS Configuration
Before proceeding with the Mautic installation, you need to set up DNS records:
- Access your DNS management panel (e.g., GoDaddy, Namecheap, or your web hosting control panel)
- Add an A record pointing to your VPS IP address
- Choose a subdomain for Mautic (e.g., go.yourdomain.com)
- Allow time for DNS propagation (can take up to 24 hours, but often much faster)
By carefully following these initial steps, you’ll have a solid foundation for your Mautic installation. The next sections will guide you through connecting to your server and installing Mautic securely.
Connecting to the server [07:17]
Once you have your VPS set up and SSH keys configured, it’s time to connect to your server and begin the Mautic installation process. This section will guide you through establishing a secure connection and preparing your server for Mautic.
Establishing an SSH Connection
Connecting to your server via SSH is the first step in the installation process. Follow these steps to establish a secure connection:
- Open your terminal (Mac/Linux) or PuTTY (Windows)
- Use the SSH command with your key file path, username, and server IP address
- Accept the server’s fingerprint on first connection
- Enter your root password when prompted
Configuring Server Firewall
Setting up a firewall is crucial for server security. We’ll configure both internal and external firewalls:
Internal Firewall (UFW)
- Enable UFW (Uncomplicated Firewall)
- Allow essential ports: 22 (SSH), 80 (HTTP), and 443 (HTTPS)
- Verify open ports using the UFW status command
External Firewall (VPS Provider)
- Create a firewall group in your VPS provider’s control panel
- Add rules to allow traffic on ports 22, 80, and 443 for both IPv4 and IPv6
- Apply the firewall group to your server
Updating Server Software
Before installing Mautic, ensure your server software is up to date:
- Run system updates using apt-get update and apt-get upgrade commands
- Install required software packages for Mautic (e.g., Apache, PHP, MariaDB)
- Activate necessary Apache modules
Downloading and Installing Mautic
Now that your server is prepared, it’s time to download and install Mautic:
- Navigate to the appropriate directory (/var/www/html)
- Download the Mautic installation files from GitHub
- Unzip the files and set appropriate permissions
- Configure Apache for Mautic using the provided configuration file
Setting Up the Database
Mautic requires a database to store its data. Here’s how to set it up:
- Create a new MariaDB database for Mautic
- Set up a database user with appropriate permissions
- Secure your MariaDB installation using the mysql_secure_installation command
Installing SSL Certificate
Securing your Mautic installation with SSL is essential for protecting user data:
- Install Certbot for easy SSL certificate management
- Use Certbot to obtain and install an SSL certificate for your domain
- Configure automatic SSL certificate renewal
By following these steps, you’ll have successfully connected to your server, secured it with firewalls, and prepared the environment for Mautic installation. The next section will guide you through the Mautic configuration process.
Mautic Configuration [18:00]
With the server prepared and Mautic files in place, it’s time to configure Mautic and get it up and running. This section will guide you through the initial setup process and essential configurations.
Accessing the Mautic Installation Wizard
To begin the Mautic configuration process, follow these steps:
- Open a web browser and navigate to your domain (e.g., https://go.yourdomain.com)
- You should see the Mautic installation wizard
- Follow the on-screen prompts to begin the configuration process
Database Configuration
Connect Mautic to the database you created earlier:
- Enter the database name (e.g., “mautic”)
- Provide the database username and password
- Leave other database settings at their default values unless you have specific requirements
Administrator Account Setup
Create your Mautic administrator account:
- Enter your first and last name
- Provide an email address for the admin account
- Choose a strong password for your admin login
Email Configuration
Set up your email sending settings:
- Configure the “from” email address and name for your Mautic instance
- Choose your mailer transport (PHP mail by default)
- Consider setting up Amazon SES for improved deliverability (covered in a separate guide)
Additional Settings
Configure other important settings:
- Set your timezone to ensure accurate scheduling of campaigns and reports
- Review and adjust any other settings as needed for your specific use case
Logging In and Exploring the Dashboard
Once the configuration is complete:
- Log in to your new Mautic installation using your admin credentials
- Familiarize yourself with the Mautic dashboard and menu structure
- Verify that all features are working correctly
Troubleshooting Common Issues
If you encounter any problems during the configuration process:
- Double-check your database credentials
- Ensure all required PHP extensions are installed
- Verify that your server meets Mautic’s minimum system requirements
- Consult the Mautic documentation or community forums for specific error messages
By carefully following these configuration steps, you’ll have a fully functional Mautic installation ready for use. However, there’s one more crucial step to ensure optimal performance: setting up cron jobs, which we’ll cover in the next section.
Installing Cron Jobs [19:40]
Cron jobs are essential for the proper functioning of Mautic. They automate various background tasks, ensuring that your contacts stay up-to-date, campaigns run smoothly, and emails are sent on schedule. This section will guide you through the process of setting up the required cron jobs for Mautic.
Understanding Mautic Cron Jobs
Before we dive into the installation process, it’s important to understand why cron jobs are crucial for Mautic:
- Contact updates: Cron jobs ensure that contacts move between segments based on their actions and behaviors.
- Campaign execution: They trigger campaign actions and decisions at the right time.
- Email scheduling: Cron jobs manage the sending of scheduled broadcast emails and campaign emails.
- System maintenance: They handle various maintenance tasks to keep your Mautic instance running smoothly.
Required Cron Jobs for Mautic
Mautic requires three essential cron jobs to function properly:
- Segment update cron job
- Campaign execution cron job
- Email send cron job
While there are additional optional cron jobs you can configure for advanced functionality, these three are the minimum required for basic Mautic operation.
Installing Cron Jobs the Easy Way
The guide recommends an easy method to install cron jobs using a pre-configured set from the Maw Team website:
- Download the cron job configuration file using the provided command
- Use the crontab command to load the downloaded configuration into your system’s crontab
This method simplifies the process of setting up cron jobs, ensuring that you have the essential jobs configured correctly without manually editing the crontab file.
Verifying Cron Job Installation
After installing the cron jobs, it’s important to verify that they’re set up correctly:
- Use the
crontab -l
command to list all configured cron jobs - Ensure that you see the three essential Mautic cron jobs in the list
- Check the timing of each cron job to make sure they’ll run at appropriate intervals
Troubleshooting Cron Job Issues
If you encounter problems with your cron jobs:
- Verify that the paths in the cron job commands match your Mautic installation directory
- Ensure that the user running the cron jobs has appropriate permissions
- Check your server’s cron log for any error messages
- Consider running the commands manually to identify any issues
Optional Cron Jobs for Advanced Users
For users looking to optimize their Mautic installation further:
- Research additional optional cron jobs that can enhance Mautic’s functionality
- Consider setting up cron jobs for tasks like social monitoring, webhook processing, or custom integrations
- Always test new cron jobs in a staging environment before applying them to your production Mautic instance
By properly setting up and managing cron jobs, you ensure that your Mautic installation operates efficiently and effectively, automating crucial tasks and keeping your marketing campaigns running smoothly.
Get VultrKey Takeaways
Installing Mautic on a VPS offers a powerful and cost-effective solution for businesses looking to take control of their marketing automation. This guide has walked you through the entire process, from selecting a VPS provider to configuring Mautic and setting up essential cron jobs. Here are the key takeaways from this comprehensive tutorial:
VPS Selection and Preparation:
- Choose a reliable VPS provider like Vultr, AWS, Google Cloud, or DigitalOcean.
- Opt for Ubuntu 18.04 LTS with at least 2GB RAM and 20GB SSD storage.
- Generate and use SSH keys for secure server access.
- Configure both internal (UFW) and external firewalls to protect your server.
Mautic Installation:
- Update your server and install required software packages.
- Download Mautic from GitHub and set appropriate file permissions.
- Create a MariaDB database for Mautic and secure your database installation.
- Install an SSL certificate using Certbot for enhanced security.
Mautic Configuration:
- Use the web-based installation wizard to set up Mautic.
- Configure your database connection, admin account, and email settings.
- Explore the Mautic dashboard and verify all features are working correctly.
Cron Job Setup:
- Understand the importance of cron jobs for Mautic’s functionality.
- Install the three essential cron jobs using the provided easy method.
- Verify cron job installation and troubleshoot any issues.
Best Practices and Considerations:
- Regularly update your server software and Mautic installation.
- Monitor server resources and scale as needed for optimal performance.
- Consider advanced configurations like Amazon SES for improved email deliverability.
- Explore additional optional cron jobs for enhanced functionality.
By following this guide, you’ve successfully set up a self-hosted Mautic instance that gives you full control over your marketing automation platform. This approach offers several advantages:
- Cost-effectiveness: Avoid high monthly fees associated with hosted solutions.
- Customization: Tailor your Mautic instance to your specific needs.
- Data ownership: Maintain complete control over your marketing data.
- Scalability: Easily scale your resources as your needs grow.
However, it’s important to remember that self-hosting comes with responsibilities:
- Server management: You’re responsible for server maintenance and security.
- Technical knowledge: Some technical skills are required for troubleshooting and updates.
- Time investment: Initial setup and ongoing management require time and effort.
As you begin using your new Mautic installation, consider exploring advanced features and integrations to maximize its potential. Regularly refer to the official Mautic documentation and community resources for best practices, troubleshooting tips, and new feature updates.
Remember, the world of marketing automation is constantly evolving. Stay informed about Mautic updates and new marketing strategies to ensure you’re getting the most out of your self-hosted solution. With dedication and proper management, your Mautic installation on a VPS can become a powerful asset in your marketing toolkit, driving engagement and growth for your business.
For more resources and support, don’t forget to check out the Profitable Tools community:
🌐 Web: https://clientamp.com
📘 Facebook: http://facebook.com/groups/daveswift
🐦 Twitter: https://twitter.com/davidswift
By leveraging the power of Mautic on your own VPS, you’re taking a significant step towards more effective, customizable, and cost-efficient marketing automation. Embrace the learning process, and don’t hesitate to seek help from the vibrant Mautic community as you embark on this exciting journey in digital marketing.