Deploy Mautic

Mautic 7 marketing automation with MySQL, cron and queue workers built in

Deploy Mautic

Just deployed

/data

Just deployed

/var/lib/mysql

Deploy and Host Mautic on Railway

Mautic is an open-source marketing automation platform. It tracks contacts and their activity on your website, groups them into segments, and runs email campaigns, forms, landing pages and lead scoring. You own the data and the install, as a self-hosted alternative to tools like HubSpot or Mailchimp.

About Hosting Mautic

Upstream runs Mautic as three containers from one image (web, cron and queue workers) that share config and media folders. Railway volumes can't be shared between services, so this template runs all three roles in one service. The official image starts through a short script that keeps config, media and logs on one volume at /data. On first boot it installs Mautic with your Railway domain as the site URL and creates the admin account. It then runs migrations, upstream's cron schedule and the queue workers next to Apache. The data lives in MySQL. Email sending needs an SMTP or API transport that you add.

Common Use Cases

  • Email newsletters and drip campaigns to your own contact lists
  • Lead capture with forms and landing pages, with scoring and segments
  • Website visitor tracking tied to contact records and campaign triggers

Dependencies for Mautic Hosting

  • Mautic 7.2.2 (official mautic/mautic:7.2.2-apache image, pinned by digest)
  • MySQL 8.4 (mysql:8.4.13, pinned by digest) with a volume

Deployment Dependencies

Implementation Details

  • Sign in: open your Railway domain and sign in as admin with the password in the Mautic service's MAUTIC_ADMIN_PASSWORD variable. MAUTIC_ADMIN_EMAIL is the admin's email. Both are read only on the first install, so change the password in Mautic afterwards.
  • Email: Mautic can't send email until you add a transport. Set MAILER_DSN (for example smtp://user:pass@smtp.example.com:587) plus MAILER_FROM_EMAIL and MAILER_FROM_NAME, or leave them empty and set it up under Settings > Configuration > Email Settings. When MAILER_DSN is set, it overrides the UI setting.
  • Cron and queues: segments update every 15 minutes, with campaign updates and triggers 5 and 10 minutes later. Email and tracking-hit queues run in MySQL, with two workers each. To change the schedule, edit /data/cron/mautic.
  • Custom domain: after adding one, change the Site URL under Settings > Configuration.
  • Upgrades: change the image tag. Migrations run on every start.

Why Deploy Mautic on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Mautic on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
110
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
868