Self-Hosted Marketing Automation Setup Guide 2026: Stack, Tools, and Step-by-Step Config
Setting up self-hosted marketing automation in 2026 is a meaningful decision that can save thousands of dollars per year and give your team complete control over contact data, workflow logic, and sending infrastructure. But it requires making the right choices at each layer of the stack — platform, sending service, workflow automation, and DNS configuration.
This guide walks through the full setup process: from choosing your platform and provisioning a server, to configuring SMTP, building your first automation workflow, and connecting multi-channel campaigns. We use CampaignOS as the primary example, with notes on Mautic where the setup differs significantly.
Should You Self-Host? The 2026 Decision Framework
Self-hosting is the right choice when:
- Your contact list is large enough that SaaS pricing is meaningful (typically 10,000+ contacts).
- You have data residency requirements (GDPR, HIPAA, or contractual data location obligations).
- You want to extend or customize the marketing automation platform code.
- You need multi-channel automation (email + SMS + push) without per-channel billing.
- Your team includes at least one technically capable person for server management.
Self-hosting is likely not the right choice when:
- Your team has no one who can manage a Linux server.
- Your contact list is below 5,000 and SaaS pricing is negligible.
- You need the support guarantees and managed deliverability of enterprise SaaS.
For a detailed pros/cons analysis, read our guide on whether self-hosted marketing automation is worth it in 2026.
Choosing Your Platform: CampaignOS vs Mautic
The two main self-hosted marketing automation platforms in 2026:
| Criteria | CampaignOS | Mautic |
|---|---|---|
| Stack | Next.js, Node.js, PostgreSQL | PHP/Symfony, MySQL |
| Setup time | 1–2 hours | 4–8 hours+ |
| Multi-channel native | Email, SMS, Push | Email (SMS plugin) |
| Visual workflow builder | Modern, React-based | Functional, dated UI |
| n8n integration | Native support | Via webhooks |
| CRM depth | Contact management | Full CRM + scoring |
| Min RAM | 1GB | 2GB |
| License | MIT | GPL v3 |
Recommendation: Choose CampaignOS if you want a modern stack, multi-channel automation, and faster setup. Choose Mautic if you need deep CRM features, lead scoring, or have existing PHP infrastructure. See our full Mautic alternatives comparison for context.
Server Setup and Requirements
Recommended Server Specs (CampaignOS)
- Up to 50k contacts: 2GB RAM, 2 vCPU, 40GB SSD — DigitalOcean Droplet or Hetzner CX21 (~$12–$20/month)
- 50k–250k contacts: 4GB RAM, 2–4 vCPU, 80GB SSD (~$20–$40/month)
- 250k+ contacts: 8GB RAM, 4 vCPU, consider managed PostgreSQL (~$60–$100/month)
Required Software
- Ubuntu 22.04 LTS
- Node.js 18+ (via nvm)
- PostgreSQL 14+
- Nginx (reverse proxy + SSL termination)
- Certbot (Let’s Encrypt SSL)
- PM2 (Node.js process manager)
Installing CampaignOS: Step-by-Step
-
Update server and install dependencies
sudo apt update && sudo apt upgrade -y sudo apt install -y postgresql postgresql-contrib nginx certbot python3-certbot-nginx curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs npm install -g pm2 -
Create PostgreSQL database
sudo -u postgres psql CREATE DATABASE campaignos; CREATE USER campaignos_user WITH ENCRYPTED PASSWORD 'your_password'; GRANT ALL PRIVILEGES ON DATABASE campaignos TO campaignos_user; q -
Clone and configure CampaignOS
git clone https://github.com/campaignos/campaignos.git cd campaignos cp .env.example .env nano .env # Configure DATABASE_URL, SMTP settings, API keys -
Install dependencies and run migrations
npm install npx prisma migrate deploy npm run build - Configure Nginx reverse proxy pointing your domain to the CampaignOS port (default 3000).
-
Obtain SSL certificate:
sudo certbot --nginx -d yourdomain.com -
Start with PM2:
pm2 start npm --name "campaignos" -- start && pm2 save && pm2 startup
Configuring Email Sending: SMTP Setup
CampaignOS supports any SMTP provider. For Amazon SES (recommended for cost):
- Create an AWS account and navigate to SES in your preferred region.
- Verify your sending domain in SES (adds required DNS records).
- Create SMTP credentials in SES (Security Credentials > Create SMTP credentials).
- Add to CampaignOS
.env:SMTP_HOST=email-smtp.us-east-1.amazonaws.com SMTP_PORT=587 SMTP_USER=your-ses-smtp-user SMTP_PASS=your-ses-smtp-password SMTP_FROM=noreply@yourdomain.com - Request production access from SES sandbox (required before sending to unverified addresses).
Connecting n8n for Advanced Automation
CampaignOS integrates natively with n8n, an open-source workflow automation tool, for complex automation scenarios that go beyond built-in campaign workflows. Common n8n + CampaignOS use cases:
- Triggering campaigns based on events from external systems (Stripe payments, Shopify orders, custom CRM events).
- Syncing contact data between CampaignOS and your CRM or data warehouse.
- Building complex multi-branch automation with conditional logic beyond the built-in visual builder.
- Connecting WhatsApp, Slack, or other channels not natively in CampaignOS.
n8n can be self-hosted on the same server or a separate instance. Its webhook trigger nodes listen for CampaignOS events, and its HTTP request nodes call CampaignOS’s API to create contacts, trigger sends, or update segments.
Setting Up Multi-Channel: SMS and Push Notifications
SMS Setup (Twilio)
CampaignOS supports SMS via Twilio integration:
- Create a Twilio account and purchase a phone number.
- Add Twilio Account SID and Auth Token to CampaignOS settings.
- Enable SMS as a campaign channel in your workspace settings.
- Collect phone numbers via your opt-in forms — always with explicit SMS consent.
Push Notification Setup
CampaignOS supports web push notifications via the Web Push Protocol:
- Generate VAPID keys (run
npx web-push generate-vapid-keys). - Add VAPID public and private keys to CampaignOS settings.
- Add the push notification service worker snippet to your website’s HTML.
- Test with a browser opt-in to verify the subscription flow.
DNS and Deliverability Configuration
After installing CampaignOS and configuring SES, add these DNS records to your domain:
- SPF:
v=spf1 include:amazonses.com ~all(TXT record on root domain) - DKIM: Add the three DKIM TXT records provided by SES when you verify your domain.
- DMARC: Start with
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com— monitor for 2 weeks then move top=quarantineorp=reject. - MX record: If you want reply tracking, configure your domain’s MX records and enable reply processing in CampaignOS.
For the broader context on why self-hosted automation is increasingly popular, see our guide on self-hosted marketing automation in 2026 and the marketing automation statistics report.
Launching Your First Campaign
- Import contacts: Upload your CSV file via Contacts > Import. Include all suppression lists.
- Create a segment: Build your first audience segment using contact properties or tags.
- Design your email: Use the built-in editor or paste HTML. Preview on desktop and mobile.
- Create an automation workflow: Use the visual builder to set a trigger (list signup, specific date, event) and build your sequence.
- Send a test: Send to your own email address and verify delivery, rendering, and link tracking.
- Launch: Start with a small segment (500–1,000 contacts) for your first send on a new domain. Monitor bounce and complaint rates in your SES dashboard.
Frequently Asked Questions
How long does it take to set up self-hosted marketing automation?
With CampaignOS, a complete self-hosted setup — server provisioning, application install, SMTP configuration, DNS records, and first import — takes 2–4 hours for someone familiar with Linux servers. Mautic typically takes 4–8 hours. Add 1–2 days for domain warm-up before sending campaigns at full volume.
What’s the cheapest server for self-hosted marketing automation?
For lists up to 50k, a 2GB RAM VPS from Hetzner ($4.15/month for CX11) or DigitalOcean ($12/month for the 2GB Droplet) is sufficient for CampaignOS. Hetzner is the most cost-effective option for European data residency; DigitalOcean has more global availability zones.
Can I run self-hosted marketing automation without technical knowledge?
Self-hosting requires basic Linux server management. If your team has no one comfortable with command-line server management, consider CampaignOS’s cloud-hosted option at app.campaignos.site — you get the same open-source platform with zero server management. For fully self-hosted setups, budget 2–4 hours of technical setup time.
Is n8n required for CampaignOS to work?
No. CampaignOS works fully without n8n. The built-in visual workflow builder handles most marketing automation use cases. n8n is an optional enhancement for teams that need complex external integrations, multi-system data sync, or custom API-driven triggers beyond what the built-in builder supports.
How do I handle unsubscribes in self-hosted marketing automation?
CampaignOS processes unsubscribe requests automatically via one-click unsubscribe links in all campaign emails. The platform maintains a suppression list that prevents any future sends to unsubscribed contacts. This is GDPR-required behavior and is handled by the platform without manual intervention.
Ready to Own Your Marketing Automation?
CampaignOS is the open-source, self-hostable marketing automation platform built for teams that want full control. Multi-channel campaigns, visual automation, and zero vendor lock-in.
