Replace GHL in 30 Minutes — The DIY Sovereign Stack Guide

GoHighLevel markets itself as the all-in-one platform for agencies. What it doesn't tell you: every feature it offers is a markup on a tool you can access directly. Email runs on Mailgun. SMS runs on Twilio. AI runs on OpenAI. You're paying a platform fee plus per-usage wallet charges to use APIs that have public pricing — and public signup pages.
This guide shows you how to replace the entire GHL stack in under 30 minutes, cut your monthly bill from $400-600+ down to $35-90, and own every piece of data permanently.

GHL is a middleman — and they admit it
GoHighLevel's own support documentation confirms the infrastructure behind each feature. This isn't speculation — it's public knowledge from their own help center:

The Sovereign Stack replaces every layer directly:
- Mailgun Foundation plan ($35/mo) — 50,000 emails, dedicated IP, full deliverability
- DuckDB — local database, zero monthly cost, stores 3,000+ contacts in a single file
- Claude Code — your AI orchestration layer, runs on usage (no fixed monthly fee)
- Chatwoot — open-source inbox for email, SMS, WhatsApp (self-hosted = $0)
- Unipile — LinkedIn + WhatsApp DM API if you need social outreach ($55/mo)

Step 1 — Email with Mailgun (10 minutes)
Mailgun is what GHL uses under the hood. Sign up directly at mailgun.com and get the Foundation plan ($35/mo). You get 50,000 emails per month, a dedicated sending IP, and full SMTP + API access.
# Install the Mailgun SDK
npm install mailgun.js form-data
# Test a send
curl -s --user 'api:YOUR_API_KEY' \
https://api.mailgun.net/v3/YOUR_DOMAIN/messages \
-F from='Manoj <hello@yourdomain.com>' \
-F to='contact@example.com' \
-F subject='Test from Sovereign Stack' \
-F text='This is your first direct Mailgun send.'Once your domain is verified and DNS records are set (SPF, DKIM, DMARC), your deliverability will match or exceed GHL's because you're on the same infrastructure — without the markup.
Step 2 — Your DuckDB CRM (5 minutes)
DuckDB is a local, in-process analytical database. No server to run, no monthly fee, no connection strings. Your entire CRM lives in a single .duckdb file on your laptop.
# Install DuckDB CLI
brew install duckdb
# Create your CRM database
duckdb ~/.crm/contacts.duckdb
# Create the contacts table
CREATE TABLE contacts (
id INTEGER PRIMARY KEY,
first_name VARCHAR,
last_name VARCHAR,
email VARCHAR UNIQUE,
phone VARCHAR,
source VARCHAR,
status VARCHAR DEFAULT 'lead',
tags VARCHAR[],
notes TEXT,
created_at TIMESTAMP DEFAULT now(),
updated_at TIMESTAMP DEFAULT now()
);You can query your CRM in plain English through Claude Code. No SQL knowledge required — just describe what you want and Claude writes the query.
# Example: Ask Claude to query your CRM
# "Show me all leads from LinkedIn who haven't replied in 7 days"
# Claude translates this to:
SELECT first_name, email, created_at
FROM contacts
WHERE 'linkedin' = ANY(tags)
AND status = 'lead'
AND updated_at < now() - INTERVAL '7 days'
ORDER BY created_at DESC;Step 3 — Claude Code as your orchestration layer
This is where the stack becomes genuinely powerful. Claude Code acts as the brain — it reads your CRM, decides who to contact, writes personalised emails, sends via Mailgun, and logs the result back to DuckDB. All triggered by a single instruction.
# Install Claude Code
npm install -g @anthropic/claude-code
# Add MCP tools to your project
# claude-code.json (or CLAUDE.md) gives Claude access to:
# - Your DuckDB CRM
# - Mailgun API
# - Chatwoot inbox
# - Any other tool you wantUnlike GHL's Workflow builder (which locks you into their node editor), Claude Code reads your intent and builds the logic dynamically. It's not drag-and-drop — it's more like having a developer on call who knows your entire business.
Step 4 — Unified inbox with Chatwoot
Chatwoot is the open-source equivalent of GHL's Conversations inbox. It handles email, SMS, WhatsApp, and social DMs in a single view. Self-hosted means $0/month — you run it on the same $6/month Hetzner VPS you'll set up in Step 5.
# Deploy Chatwoot on Hetzner VPS (one command)
curl -fsSL https://get.chatwoot.app/linux/install.sh | bash
# Or use Docker
docker run -d --name chatwoot \
-e SECRET_KEY_BASE=your_secret \
-e FRONTEND_URL=https://inbox.yourdomain.com \
-p 3000:3000 \
chatwoot/chatwoot:latestStep 5 — Access your CRM when your laptop is off
Your DuckDB file lives locally by default. Two options to give yourself 24/7 access — and let your AI agents run while you sleep.

Option A: MotherDuck (easiest, free)
MotherDuck is cloud-hosted DuckDB. The free Lite tier gives you 10GB storage and 10 compute hours per month — more than enough for a 3,000+ contact CRM. Upload your existing database with two SQL commands:
-- Install MotherDuck extension
INSTALL motherduck;
LOAD motherduck;
-- Authenticate (opens browser)
CREATE SECRET (TYPE motherduck, TOKEN 'your_token');
-- Upload your local CRM to the cloud
ATTACH 'md:' AS cloud;
COPY FROM DATABASE local_db TO cloud;Option B: Hetzner VPS + FastAPI (full sovereign)
For complete control, a Hetzner CX11 costs ~$6/month. You own the server, the data never leaves your infrastructure, and there are no service account limits or vendor dependencies.
# On your Hetzner VPS
# Install DuckDB + Python
apt install python3 python3-pip
pip install duckdb fastapi uvicorn
# Create a simple CRM API
cat > crm_api.py << 'EOF'
from fastapi import FastAPI, Depends, HTTPException
from fastapi.security import HTTPBearer
import duckdb
app = FastAPI()
security = HTTPBearer()
DB_PATH = "/data/contacts.duckdb"
@app.get("/contacts")
def get_contacts(q: str = None, token = Depends(security)):
conn = duckdb.connect(DB_PATH)
if q:
return conn.execute(
"SELECT * FROM contacts WHERE first_name ILIKE ? OR email ILIKE ?",
[f'%{q}%', f'%{q}%']
).fetchall()
return conn.execute("SELECT * FROM contacts LIMIT 100").fetchall()
EOF
# Run the API
uvicorn crm_api:app --host 0.0.0.0 --port 8000 &Your total monthly cost
- Mailgun Foundation — $35/mo (50,000 emails, dedicated IP)
- DuckDB CRM — $0/mo (local file, zero overhead)
- Claude Code — pay per usage (typical: $5-20/mo for agency workflows)
- Chatwoot — $0 self-hosted on Hetzner VPS
- Hetzner VPS (optional) — $6/mo if you need always-on access
- Unipile (optional) — $55/mo for LinkedIn + WhatsApp DM API
Ready to build your Sovereign Stack?
This guide gives you the architecture. If you want the actual scripts — the DuckDB schema, the Mailgun wrapper, the Claude Code CLAUDE.md setup, and the Chatwoot integration — everything is inside AI Avengers Lab.
Lab members get the full working setup: pre-built CRM schema, email campaign scripts, Claude Code agent configuration, and weekly live builds where we add new integrations together. The founding rate is $89/month — less than what GHL charges for a single feature add-on.
Related reading from this series
This post is part of the Replace SaaS with Claude playbook. The full series covers every step with concrete workflows, pricing, and lessons from running my own business on Claude.
- Replace SaaS with Claude - the full playbook
- 5 AI Tools Running My Business Pay Per Usage | AI Avengers
- Cal.com vs Calendly for Business Owners | AI Avengers
- ConvertKit vs Resend vs GHL Email in 2026 | AI Avengers
- DuckDB vs Traditional CRM for Business Owners | AI Avengers
- GoHighLevel vs Custom AI Stack: 2026 Comparison | AI Avengers
- Migrate From GoHighLevel: Step-by-Step Guide | AI Avengers
- n8n Free Automation Setup for Business Owners | AI Avengers
- The $30/Month AI Tech Stack That Replaces $1,100/Month
- GoHighLevel Hidden Fees: What You Actually Pay | AI Avengers
- Replace GHL Automations With n8n (Free) | AI Avengers
- Replace Zapier With Free AI Automation Tools | AI Avengers
- How I Replaced GoHighLevel and Saved $12,840/Year
- Resend vs Mailchimp: Free Business Email | AI Avengers
- Save $400-1,000/Month by Canceling SaaS Subscriptions
- We paid GHL $13,200 in 2025. I just cancelled.
- What Is a Sovereign AI Stack and Should You Build One?
- Twilio vs GHL SMS: Businesses Are Switching | AI Avengers
- Why I Killed My Open-Source AI Projects | AI Avengers
For more playbooks, visit the AI Avengers home page or join the AI Avengers Skool community to put these into practice with weekly office hours.
Frequently Asked Questions
How much does this sovereign stack actually cost compared to GoHighLevel?
With GoHighLevel, you pay a base platform fee of $97–$497/mo, plus usage markups on email, SMS, WhatsApp, voice AI, and AI features. In practice this often lands in the $400–$600+/mo range for active accounts.
With the sovereign stack in this guide:
- Mailgun Foundation: $35/mo for up to 50,000 emails
- DuckDB: $0/mo (local file database)
- Claude Code: pay-per-usage, typically tens of dollars for most small businesses
So you are usually looking at $35–$90/mo all-in, while owning your data and avoiding per-message markups.
Do I need to be a developer to set this up?
You do not need to be a professional developer, but you should be comfortable copying commands into a terminal and editing simple text files.
This guide gives you:
- Exact commands to install DuckDB and create your CRM
- Copy-paste SQL for your contacts table
- A ready-made credentials file format for Mailgun and DuckDB
- Example prompts for Claude Code to run campaigns and sequences
If you can follow step-by-step instructions and use copy/paste, you can get this running in about 30 minutes (plus DNS wait time).
What happens to my data if I stop using GoHighLevel?
Your contacts live in your DuckDB file, which is just a single .duckdb file on your machine (or on a VPS / MotherDuck if you choose).
The migration path is:
- Export contacts from GHL as CSV
- Import that CSV into DuckDB using the
COPYcommand in this guide - Back up your DuckDB file to cloud storage (Google Drive, iCloud, Dropbox, etc.)
After that, your CRM is fully portable:
- You can move the file between machines
- You can upload it to MotherDuck for cloud access
- You can host it on a VPS for 24/7 availability
You are no longer locked into a SaaS platform to access your own list.
Can this stack handle automations and follow-up sequences like GHL?
Yes. Claude Code acts as the orchestration layer that replaces GHL's automation builder.
You describe your sequence in plain English, for example:
"Day 1 send email A to everyone tagged 'prospect'; Day 2 send email B only to those who didn't get A in the last 30 days; Day 3 send email C to everyone tagged 'prospect' and not tagged 'replied'."
What if I need access to my CRM when my laptop is offline?
You have two main options if you want 24/7 or remote access:
1. MotherDuck (free tier)
- Upload your
.duckdbfile to MotherDuck - Query it from any browser or DuckDB client
- Use their free Lite tier (10 GB storage, 10 compute hours) for most small CRMs
2. VPS-hosted DuckDB (e.g., Hetzner)
- Put your DuckDB file on a low-cost VPS
- Use a simple FastAPI app to expose a secure SQL endpoint
- Let Claude Code or other agents query it anytime
Both options keep you in control of your data while giving you always-on access for agents and automations.

Creator of AI Avengers Lab. Building sovereign AI stacks for business owners and professionals- no npm, no SaaS middleware, just Claude Code and direct API connections.