Why is Mautic so difficult to install?

Did you copy/paste the command for installing PHP directly? php8.1-xml is part of that command, but on the second line. I wonder if only the first line of the command was run.

Can you try this again?

apt-get install -y php8.1 php8.1-cli php8.1-curl php8.1-mbstring php8.1-mysql php8.1-xml php8.1-zip php8.1-intl php8.1-gd php8.1-imap php8.1-bcmath libapache2-mod-php8.1 unzip
1 Like

I did it all copy / paste. Will try it again when I get some space this week; thanks.

Meanwhile, Mautic 6 has come out…

New error while running sudo -u www-data composer create-project mautic/recommended-project:^5 /var/www/mautic --no-interaction

In CreateProjectCommand.php line 321:
  chdir(): Permission denied (errno 13)

It seems like www-data has permission?

ubuntu@ip-###-##-##-###:/var/www$ ls -l /var/www
total 8
drwxr-xr-x 2 www-data www-data 4096 Apr  2 00:37 html
drwxr-xr-x 9 www-data www-data 4096 Apr  2 01:08 mautic

I’ve been copy-pasting commands faithfully from the article. What am I missing?

Thanks in advance!

Try sudo rm -r mautic and run the create project command again.

1 Like

Okay, that worked, I think… however I can’t get to the site with the domain name (only the IP address, which takes me to the /installer screen, and that’s farther along than I’ve been able to get to date, so thanks!).

I’ve had an A record for the the IP address in place for over a week and it shows as propagated. I had it behind a Cloudflare tunnel and thought that might be an issue, so that’s been turned off.

When I run host domain name in the terminal, it returns the correct IP address.

I’m furiously Googling possible issues at the same time I gratefully await any ideas you might have, gem. Thanks again.

Ran out of time to edit, but: all I had to do was open the HTTPS port on my Lightsail instance.

Now I can move on to setting up cron jobs and such. Or… I wonder if I should upgrade to Mautic 6 before I go too deep on 5?

Thanks again, very much!

I haven’t messed with 6 yet, so I can’t give any recommendations.

Glad you got it worked out!

1 Like

Much obliged!

if anyone is looking to try out Mautic 6.0 you can PM me - we have thrown up an image for people to check it out and play around with.

I’ve moved these how-to articles to the Mautic Knowledgebase for anyone who might stumble upon this thread in the future.

3 Likes

Just a quick update on DigitalOcean. DO has started blocking mail ports as of March 2025 - link here

It was long overdue.

I don’t mean to revive this post in this way but the title and initial post says it all. I’m back attempting to revive the mautic dream I once had. Been using a very old version successfully on shared hosting for years now.

Now I’ve spent a couple weeks on and off trying to get my head around deploying a fresh docker image to my linux VPS on Contabo. We even bought a script for a YouTube supporter of mautic but all to no avail.

Does anyone have clear step by step instructions on how to deploy an instance of v5 with Docker?

I have nuked and tried multiple variants of docker compose and each seem to have an issue. I acknowledge that I am the factor and am willing to take guidance or even pay for a walkthrough if someone is willing to spare the time.

Honestly this should just not be this hard!

The number of errors and challenges ranging from php displaying on the home page to 404’s and docker containers not starting as well as many others.

I just need some clear guidance show me once and I should be good to go.

Traefik seems to function well. No errors there now

Thanks in advance for any comments.

I gave up on Docker for my installs. Are you committed to Docker, or would you be open to installing directly to a VPS or VM?

Thanks for the response @gem.

I have a number of other apps in my dependency layer that utilise docker and it just seemed like this would make sense. Getting it to work consistently across various serves has been the real challenge.

Kind Regards