← Back to all posts

Setting Up Mautic Self-Hosted Email Marketing (And Getting Banned by Claude)

Today's build log: Fighting through Claude account suspensions while setting up Mautic, an open-source marketing automation platform. Documenting the frustrations and wins of self-hosting email marketing.

Today was supposed to be simple: set up an email marketing platform for my projects. It turned into a 6-hour journey through Claude account suspensions, cryptic error messages, and a lot of copy-pasting commands I barely understood. But hey, at least it works now.

The Claude Suspension Nightmare

Before I even got to Mautic, I need to rant about what happened with my Claude accounts today.

I've been using Claude CLI in my terminal and VS Code for months without any issues. I'm on the Max plan ($200/month) - not some free tier. Zero problems for months.

Then Claude launched their web-based Claude Code with free credits, and I thought "cool, let me try this out."

Suspended within hours. No warning. No explanation. Just suspended.

I got a refund for the unused amount, but that's it. No email explaining why. I wasn't doing anything illegal or sketchy. Just building websites. Maybe it was when I was building loan-calculator.us.com and running multiple chat sessions at the same time to build multiple pages simultaneously? I'm guessing it's either:

  • Too many parallel chat sessions triggered some flag?
  • Some automatic ban system for accounts using free web credits?
  • Just bad luck?

Here's where it gets frustrating: I registered a new account with a completely new email and a new credit card. Accessed Claude Code web for maybe 10 minutes. Suspended again. Got another refund, still no explanation.

So I registered yet another account. This time I'm ignoring the free web credits completely and sticking to the CLI like I always did. Been using it normally for the past few hours, no issues yet. We'll see if this one survives.

The irony? The CLI version has been rock solid for months. It's only the web version with free credits that triggers these suspensions. If anyone has insights into what's going on, I'd love to know.

Back to Building: Why Self-Host Email Marketing?

Anyway, back to what I actually wanted to build today.

I needed an email marketing solution for my projects. I looked at the usual suspects - MailChimp, ActiveCampaign, Aweber, Drip - and the pricing is insane once you scale. $50/month minimum, going up to hundreds as your list grows.

Then I found Mautic: https://mautic.org/

It's completely open source https://github.com/mautic/mautic, 100% free, and has ALL the features the paid platforms charge for. We're talking:

  • Email campaigns
  • Marketing automation
  • Segmentation
  • Lead scoring
  • Landing pages
  • Forms
  • A/B testing
  • Everything.

No feature paywalls. No per-contact pricing. Just free.

The catch? You have to host it yourself. Which means dealing with servers, databases, and all that fun stuff.

The Setup Process (AKA Today's Fails)

Full disclosure: my background is HTML, CSS, and SEO. I'm learning to code with AI. So when things break, I mostly just ask Claude "why is this broken?" and copy-paste whatever it tells me to do.

Fail #1: PHP Version

Downloaded Mautic 6.0.6, extracted it to my server, loaded the site and... error. "Mautic does not support PHP version 8.4.14."

Cool. I had just installed the newest PHP version thinking newer = better. Nope. Mautic only works with PHP 8.1-8.3. Had to ask Claude how to install PHP 8.3, then how to switch to it, then how to reconfigure everything to use it.

Do I know what PHP-FPM is? Not really. Did it work after following Claude's instructions? Yes.

Fail #2: Memory Limit

Got past the PHP version issue, hit the installer, and it said "your memory limit is too low, we need 512MB."

I found the file Claude told me to edit (php.ini), changed 128M to 512M, restarted some service, and it worked. Moving on.

Fail #3: 403 Forbidden

After setting up Nginx with security rules (blocking access to .env files, composer.json, etc. - whatever those are), I kept getting 403 Forbidden errors when trying to load the site.

Honestly? I don't fully understand why. Something about how Nginx was blocking the PHP files before they could run. Had to ask Claude (RIP account #1) to restructure the entire config with explicit rules for which files are allowed to execute.

Not gonna pretend I know what I'm doing here. I just followed what Claude said, tested it, and it worked. That's the beauty of learning to code with AI - you don't need to understand every detail to make progress.

Fail #4: SSL Certificate

Setting up HTTPS? I just asked Claude "set up SSL for my domain" and it ran all the commands for me. Something with certbot and certificates.

A few seconds later - HTTPS working. Green padlock in the browser. Auto-renewal configured.

This was the one thing that actually just... worked. No errors, no debugging.

What Actually Worked

Once I fought through all those errors:

  1. Nginx + PHP 8.3 - Whatever these do, they're apparently fast
  2. Let's Encrypt SSL (via Certbot) - Free HTTPS certificates that renew automatically
  3. MySQL database - Stores all the email marketing data
  4. SendGrid SMTP - Sends the actual emails ($19.95/month)

The Mautic installer walked me through the rest. Created database tables (I think?), connected to SendGrid, and boom - working email marketing platform.

First Impressions

I've been playing around with it for the past hour and honestly? I'm impressed.

The interface feels like ActiveCampaign and Drip. Everything the expensive platforms charge for is here:

  • Visual campaign builder (drag and drop, actually easy to use)
  • Contact segmentation
  • Dynamic content
  • Custom fields
  • API access
  • Webhook integrations

Tomorrow I'm adding a newsletter signup form to this blog. Finally going to start building an actual email list instead of just tweeting into the void.

The Win

Despite the frustrations, I now have a self-hosted marketing automation platform that would cost $100-500/month from SaaS providers.

Total cost: $5/month on Hetzner's cheapest VPS plan + $19.95/month for SendGrid SMTP = ~$25/month.

Still way cheaper than ActiveCampaign or Drip, and no per-contact pricing gouging as I scale. When I hit 10,000 subscribers, I'm still paying $25/month. ActiveCampaign would charge me $150+/month.

The math makes sense. The setup was painful. But it's done.

Now to see if Claude bans my third account tomorrow. 🤞


Today's Stack: Nginx, PHP 8.3, MySQL, Mautic 6.0

Hosting: Hetzner VPS (~$5/month)

Repository: https://github.com/mautic/mautic

Time wasted on suspensions: Too much

Things learned: How to follow AI instructions really well

Thanks for reading! Follow my journey as I build in public.

Follow @narongritsy on X

Other Posts