Railway

Deploy Mautic + MySQL - Open-Source HubSpot Alternative

Deploy and Host with Railway

Deploy Mautic + MySQL - Open-Source HubSpot Alternative

Just deployed

Just deployed

Just deployed

/var/lib/mysql

Just deployed

/var/www/html/config

Deploy and Host Mautic + MySQL + Worker/Cron on Railway

Self-host Mautic, an open-source HubSpot alternative, with MySQL, a public web service, and dedicated worker/cron services.

About Hosting Mautic + MySQL + Worker/Cron on Railway

  • mautic-web: public Mautic UI service
  • mautic-worker: queue worker service for background jobs
  • mautic-cron: scheduler service for recurring Mautic tasks
  • mysql: private MySQL database with persistent storage
  • Generated database passwords and Mautic secrets
  • Private networking between Mautic services and MySQL

Why Deploy Mautic + MySQL + Worker/Cron on Railway

The published template deploy test created mautic-web, mautic-worker, mautic-cron, and mysql; all services reached SUCCESS; /health returned HTTP 200; the installer completed; admin login reached /s/dashboard; worker logs showed email/hit/failed consumers running; and cron detected the installed database.

This avoids the common one-container trap where Mautic's UI starts but campaigns, segments, and queued jobs do not run correctly.

Common Use Cases

  • Self-hosted marketing automation
  • Contact and segment management
  • Campaign and landing-page experiments
  • Internal newsletter workflows
  • Mautic evaluation environments

Dependencies for Mautic + MySQL + Worker/Cron Hosting

Mautic depends on MySQL for application data. The official Docker roles split web, worker, and cron behavior so background jobs and scheduled tasks run outside the public web service.

Deployment Dependencies

  • MYSQL_ROOT_PASSWORD: generated MySQL root password
  • MYSQL_PASSWORD: generated Mautic database password
  • MAUTIC_DB_*: private MySQL connection settings
  • MAUTIC_MESSENGER_DSN_EMAIL: queue transport for email jobs
  • MAUTIC_MESSENGER_DSN_HIT: queue transport for hit jobs

After Deploy

  1. Open the Mautic public URL.
  2. Complete the installer and first-admin setup.
  3. Add SMTP before sending real campaigns.
  4. Keep worker and cron services running; do not treat them as optional for production usage.

Support Checklist

If a deploy fails, include all four service deployment IDs, /health output, whether the installer finished, and worker/cron logs mentioning messenger consumers or database install detection.


Template Content

More templates in this category

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

jakemerson
View Template
Evolution API with n8n
[Jun'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL

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

Railway Templates