DEV Community

Sascha Eggenberger
Sascha Eggenberger

Posted on • Originally published at saschaeggi.Medium

Setup Mautic with lando & composer

Update: You can also easily checkout this repo and just lando start to spin it up: https://github.com/saschaeggi/mautic-lando-starterkit

Requirements

  • lando
  • composer

Install Mautic via composer

composer create-project mautic/core YOURPROJECTNAME ^3 --no-dev
Enter fullscreen mode Exit fullscreen mode

Replace YOURPROJECTNAME with the name of the projects folder.

Lando

Config

Create .lando.yml with the following content:

name: mautic
recipe: lamp
config:
  webroot: .
  php: '7.3'
  database: mysql:5.7

tooling:
  mt:
    service: appserver
    description: Run Mautic commands
    cmd: bin/console

proxy:
  mailhog:
    - mail.mautic.lndo.site

services:
  appserver:
    type: php
    build_as_root:
      - docker-php-ext-install sockets
    xdebug: true
    config:
      php: .lando/php/php.ini
  database:
    type: mysql:5.7
    portforward: true
    creds:
      user: mautic
      password: mautic
      database: mautic
  mailhog:
    type: mailhog
    portforward: true
Enter fullscreen mode Exit fullscreen mode

Build containers

lando start
Enter fullscreen mode Exit fullscreen mode

This will create the needed docker containers (can take a while).

Once the containers are up and running we can access
https://mautic.lndo.site/

Let's setup Mautic

Let's open https://mautic.lndo.site/
You should see now the following screen:

Alt Text

Step 1

Set Database settings to use the following:

Database: mautic,
Password: mautic,
Username: mautic
Host: database,
Port: 3306

Alt Text

Step 2

Setup your admin user:

Username: admin
Password: SETYOURPASSWORD
Name: Your name
Last name: Your last name

Alt Text

Step 3

We set to use the mailserver to be the mailhog docker container:

Server: mailhog,
Port: 1025

And we can access Mailhog via
http://mail.mautic.lndo.site/

Alt Text

Login

You can now login to your freshly installed Mautic setup with the credentials from the previous step.

Alt Text

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay