Open-source marketing automation does not have to mean giving up your data to a SaaS vendor. Mautic puts email campaigns, contact tracking, and lead nurturing under your own roof. Running it on Ubuntu 24.04 takes more effort than signing into HubSpot, but the reward is full control over your stack, your costs, and your customer data. You decide when to update, how to scale, and where your information lives.

Before you start, point a domain at your server and make sure your Ubuntu 24.04 instance has at least 2 GB of RAM. Mautic is not lightweight; PHP will consume memory when it rebuilds large segments or processes campaign logic. If you plan to send to thousands of contacts, 4 GB makes the experience far smoother.

Build the LEMP Foundation

Mautic expects a LEMP stack: Nginx, MySQL, and PHP. On Ubuntu 24.04, the default PHP version is 8.3, which works well with current Mautic releases. Start by updating your package list, then install Nginx and MySQL Server. After that, pull in PHP-FPM and the exact extensions Mautic needs:

  • php-fpm
  • php-mysql
  • php-imap
  • php-curl
  • php-gd
  • php-xml
  • php-mbstring
  • php-zip
  • php-intl
  • php-bcmath

Each extension serves a real purpose. The IMAP extension reads bounce messages and unsubscribe replies. GD handles image processing for thumbnails. Mbstring and Intl manage character sets and translations across languages. BCMath gives you precise math for lead scoring and currency calculations. Do not skip any of them, or the installer will complain halfway through.

If Apache is already installed, remove it. Both web servers want port 80 and 443. Running them side by side causes silent failures that are frustrating to debug. A clean apt remove apache2 followed by apt autoremove prevents that headache entirely.

Tune PHP and the Database

Mautic’s installer and background jobs are memory-hungry. Open your PHP-FPM configuration file, located at /etc/php/8.3/fpm/php.ini, and raise the memory limit to 512 MB. Set the upload size to 50 MB so you can import contact lists and asset bundles without hitting arbitrary walls. After saving, restart PHP-FPM to apply the changes. While you are at it, bump post_max_size to match your upload limit; otherwise PHP rejects large multipart form submissions even when upload_max_filesize looks correct.

Next, create a dedicated MySQL database and user. Call the database whatever you like, but keep the username and password in a password manager. Mautic stores every contact action, campaign decision, and email open event in these tables, so granting broad privileges to a single-purpose account limits exposure if something else on the server is compromised.

Install Mautic and Its Tooling

Download the latest stable Mautic release and extract it into /var/www/html/mautic. Set the directory owner to www-data so the web server can write cache files, logs, and local configuration updates. On Ubuntu, that means running chown -R www-data:www-data /var/www/html/mautic.

You also need Composer and npm installed on the server. Composer resolves PHP dependencies, and even if you deploy from the pre-built release archive, you will need Composer later when adding marketplace plugins or running manual updates. Npm matters if you ever customize themes or build frontend assets from source. Having both tools ready now saves you from scrambling when the project evolves.

Configure Nginx and Lock It Down

Your Nginx virtual host should point its root directory to /var/www/html/mautic and treat index.php as the default index. Route PHP requests to the Unix socket that PHP-FPM opens, typically at /run/php/php8.3-fpm.sock. A solid server block includes a try_files directive that falls back to the front controller, plus a location block that denies access to hidden files starting with a dot. Mautic ships with .htaccess files meant for Apache, but Nginx ignores them, so explicit deny rules in your virtual host keep your logs and temp directories private.

Before you run the web-based installer, get a TLS certificate. Use Certbot with the Nginx plugin to pull a free Let’s Encrypt certificate and automatically rewrite your HTTP traffic to HTTPS. Mautic handles login credentials and contact data; there is no excuse for serving it over plain text.

Cron Jobs Are the Engine

Langkah ini tidak bisa ditawar. Tanpa tugas terjadwal (scheduled tasks), Mautic hanyalah sebuah dasbor yang tidak melakukan apa-apa. Aplikasi ini mengantrekan tindakan kampanye, pengiriman email, dan kalkulasi ulang segmen di dalam database, lalu mengandalkan command line untuk memprosesnya.

Atur cron job untuk pengguna Mautic guna menangani tugas-tugas latar belakang berikut:

  • Memperbarui segmen
  • Menjalankan kampanye
  • Mengirim email
  • Mengambil data bounce

Dalam praktiknya, hal ini berarti memanggil perintah konsol Mautic pada interval yang berbeda. Pembangunan ulang segmen dapat dijalankan setiap jam. Pemicu kampanye dan pemrosesan antrean email biasanya membutuhkan jendela waktu yang lebih ketat, setiap lima hingga lima belas menit tergantung pada volume. Pengambilan data bounce via IMAP harus berjalan cukup rutin agar reputasi pengirim Anda tidak terganggu oleh keluhan spam yang tidak terperiksa. Pantau syslog atau output cron Anda untuk memastikan semuanya selesai tanpa kesalahan memori.

Menggunakan Platform

Setelah penginstalan selesai dan cron berjalan lancar, masuklah ke dasbor. Antarmukanya berpusat pada tiga blok bangunan utama: kontak, segmen, dan kampanye.

Gunakan pembuat kampanye drag-and-drop untuk merancang alur kerja email. Seorang pelanggan baru masuk ke dalam alur, menunggu satu hari, menerima pesan selamat datang, dan bercabang berdasarkan apakah mereka mengklik sebuah tautan. Sementara itu, sistem Points secara diam-diam memberi skor pada lead saat mereka mengunjungi halaman harga atau membuka pengumuman produk. Anda yang menentukan ambang batas yang menandakan lead potensial (hot lead) yang layak untuk ditindaklanjuti dengan panggilan penjualan.

Segmen mengelompokkan kontak secara otomatis berdasarkan aturan yang Anda tentukan. Anda mungkin membuat segmen untuk semua orang yang membuka kampanye dalam tiga puluh hari terakhir, atau mengisolasi kontak di negara tertentu. Formulir yang ada di halaman landas (landing pages) Anda akan langsung masuk ke segmen-segmen ini. Hubungkan bagian-bagian tersebut dan Anda akan memiliki urutan pemeliharaan (nurture sequence) otomatis yang bereaksi terhadap perilaku, alih-alih mengirimkan pesan yang sama ke seluruh daftar Anda.

Pekerjaan Sesungguhnya Setelah Deploy

Menjalankan Mautic di Ubuntu 24.04 hanyalah permulaan. Cadangkan database dan direktori /var/www/html/mautic Anda sebelum setiap pembaruan. Pantau log kesalahan PHP saat Anda menginstal plugin baru. Uji output cron setelah Anda meningkatkan skala daftar kontak, karena tugas yang selesai dalam hitungan detik pada seribu kontak mungkin mengalami timeout pada lima puluh ribu kontak.

Self-hosting menukar kenyamanan SaaS terkelola dengan kedaulatan atas data pemasaran Anda. Tidak ada vendor lock-in, tidak ada kejutan harga per kontak, dan tidak ada pihak ketiga yang menyandera analitik Anda. Anda memiliki server, database, dan hubungan dengan audiens Anda. Bagi tim yang bersedia memelihara mesin Linux dan beberapa ekspresi cron, pertukaran tersebut biasanya sangat sepadan.