Manoj Saharan
Manoj Saharan

Replace GHL in 30 Minutes — The DIY Sovereign Stack Guide

Manoj Saharan
Manoj Saharan
March 17, 2026
12 min read
Diagram comparing GoHighLevel to a sovereign stack using Mailgun, DuckDB, and Claude Code
AA

Want the actual scripts — not just the architecture?

AI Avengers Lab members get the full working setup: pre-built code, campaign scripts, and weekly live builds. $89/mo.

See what's inside the Lab

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's base plan ($297/mo) is just the entry fee. Every email send, SMS, WhatsApp message, and AI interaction is billed separately from a pre-funded wallet. Active agency accounts typically run $400-600+/month once usage is factored in.
GoHighLevel wallet charges breakdown — what you actually pay per action on top of the base plan
What GHL actually charges per action

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:

GoHighLevel infrastructure reveal — LC Email runs on Mailgun, LC Phone runs on Twilio, Conversation AI runs on OpenAI
GHL features mapped to their actual underlying providers
ℹ️LC Email = Mailgun. LC Phone = Twilio. Conversation AI = OpenAI or Claude. All of these have direct APIs with public pricing. GHL charges you a platform premium to use them through their interface.

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)
  • Side-by-side cost comparison: GoHighLevel $400-600/mo vs Sovereign Stack $35-90/mo
    The same capabilities. A very different bill.
    Typical savings: $3,600-6,000/year. The difference pays for a year of Claude Code API usage many times over — and you own all your data.

    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.

    test-send.sh
    # 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.'
    💡Use the html field (not body) when sending HTML emails via the Mailgun API. This is a common gotcha — the body parameter is ignored for HTML content.

    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.

    create-crm.sql
    # 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.

    query-example.sql
    # 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;
    💡Claude Code can read, query, and update your DuckDB CRM through MCP (Model Context Protocol) tools. Set it up once and your AI agents can access every contact, tag, and note without any extra configuration.

    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.

    setup.sh
    # 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 want
    ℹ️Claude Code uses a CLAUDE.md file in your project directory to understand your stack, your contacts, and your goals. You write it once in plain English. From then on, one-line instructions like 'follow up with hot leads from last week' trigger the full workflow.

    Unlike 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.

    install-chatwoot.sh
    # 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:latest
    💡Chatwoot has a full REST API. Claude Code can read your inbox, classify conversations, draft replies, and send them — all from a single instruction. This is what GHL's Conversation AI charges $97/sub-account for.

    Step 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.

    Two options for always-on CRM access: MotherDuck (free cloud DuckDB) vs Hetzner VPS ($6/mo full sovereign)
    Pick the option that fits your philosophy

    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:

    upload-to-motherduck.sql
    -- 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;
    ℹ️MotherDuck has an MCP server — meaning Claude Code can query your cloud CRM directly from any device, without you opening a terminal. Agents running on cloud VMs can access your contacts the same way.

    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.

    vps-setup.sh
    # 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
  • Typical total: $35-90/month depending on which optional tools you use. Compared to GHL's $400-600+/month, you're saving $3,600-6,000/year — while owning all your data and having more flexibility than GHL ever allowed.

    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.

    💡Already have Claude Code? Your first step is the DuckDB setup in Step 2 above. It takes 5 minutes and you'll have a working CRM before your next GHL billing cycle hits.

    AI Avengers Lab

    This guide gives you the architecture.The Lab gives you the working code.

    Stop reading about the sovereign stack. Start building it. Lab members get every script, every config file, and weekly live sessions where we ship new integrations together.

    • Full working code: DuckDB CRM schema, Mailgun wrapper, Claude Code config
    • Weekly live builds — we add new integrations together
    • Private community of operators building sovereign AI stacks
    • Direct access to Manoj — ask questions, get real answers
    Join the Lab — $89/mo

    Cancel anytime. No contracts.

    1-on-1 with Manoj

    Want me to look at your specific setup?

    Book a 1-hour session. Bring your stack, your tools, your blockers. I tell you exactly what to build first. $197.

    Book a session
    Share:LinkedInPost

    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 COPY command 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 .duckdb file 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.

    Ready to build — not just read?

    AI Avengers Lab: working code, live builds, community. $89/mo.

    Join the Lab

    Related posts

    Manoj Saharan
    Manoj Saharan
    Co Founder, AI Avengers

    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.