Skip to main content

Self-Hosted Newsletter Template

Self-Hosted Newsletter & Waitlist
Software You Fully Own

Collect subscribers with double opt-in, manage lists and compose campaigns from a no-code admin UI, and deliver through Mailgun or Brevo. Your subscriber list lives in your own database—no per-subscriber tax, no vendor lock-in.

npm install -g codehooks
coho create mynewsletter --template email-newsletter
cd mynewsletter && npm install && coho deploy
# Your newsletter platform is live

No credit card required. Free tier for development. Set up your coding agent →

Newsletter Software Without the Per-Subscriber Tax

Mailchimp, Substack, ConvertKit—they get you sending, but the trade-offs add up:

  • Pricing climbs with every subscriber you add
  • Your subscribers live in their database, not yours
  • No source code—you can't extend or self-host
  • Black-box delivery you can't fully audit

Own your newsletter with a self-hosted platform that scales on your terms.

What You Get, Self-Hosted

Double opt-in signupTokenized confirm
No-code admin dashboardLists & campaigns
Markdown campaign composerImages & preview
Bulk list importBring your list

Everything You Need to Run a Newsletter

A complete, self-hosted newsletter and waitlist service—not just an API

Double Opt-In Signup

Tokenized email confirmation out of the box. Subscribers confirm before they join, keeping your list clean and your sender reputation intact.

No-Code Admin Dashboard

A password-protected admin UI to manage lists, subscribers, and campaigns. No code changes needed for day-to-day sending.

Markdown Campaign Composer

Write campaigns in Markdown with inline image uploads and live preview. Send when it looks right—no HTML wrangling.

List Management & Bulk Import

Create multiple lists, bulk-import existing subscribers, and cascade-delete cleanly. Your subscriber data lives in your own database.

Deliverability Built In

List-Unsubscribe headers, one-click unsubscribe, and hourly send rate limiting protect new sending domains from throttling.

Fully Brandable

Set your logo, colors, sender details, and email footer at runtime from the admin UI—no redeploy required.

Manage Everything from the No-Code Admin UI

A password-protected dashboard to track subscribers, manage lists, and compose campaigns in Markdown—no code required for day-to-day sending.

your-app.codehooks.io/admin.html
Self-hosted email newsletter admin dashboard showing subscriber stats, list filtering, and campaign management

How the Newsletter Works

From signup form to inbox, with double opt-in and rate-limited delivery

Subscriber

Signs up

Double Opt-In

Confirms email

Admin UI

Composes campaign

Delivered

Mailgun / Brevo

Automated flow: Visitor subscribes via POST /subscribe → confirms via double opt-in → you compose in the admin UI → campaign is delivered with rate limiting via Mailgun or Brevo

A Self-Hosted Alternative to Mailchimp & Substack

Hosted newsletter services keep your list and charge per subscriber. This template gives you the same essentials while you own the data and the code.

CapabilitySelf-HostedHosted SaaS
You own the subscriber database
Full source code access
Flat pricing, not per-subscriber
Self-hosted on your own backend
No-code admin UI
Double opt-in & unsubscribe

Choose Your Email Provider

Deliver through Mailgun or Brevo—set one environment variable

Mailgun

The default provider. Developer-friendly APIs with strong deliverability and EU region support.

MAILGUN_API_KEY

Brevo

A generous free sending tier that's great for getting a new newsletter off the ground.

BREVO_API_KEY

Built for Newsletters and Waitlists

One self-hosted template, several ways to grow an audience

Company Newsletter

Send product updates and announcements to a list you own. Compose in Markdown, brand it, hit send.

updates • announcements • digests

Product Waitlist

Capture early interest with a double opt-in signup, then email the whole list the day you launch.

signup • confirm • launch-email

Community Digest

Run multiple lists for different segments and send a recurring digest to each from one admin UI.

segments • lists • weekly-digest

Deploy Your Own Newsletter Platform

A self-hosted newsletter and waitlist service in minutes. Own your list, own your code, no per-subscriber pricing.

Self-Hosted Newsletter FAQ

Common questions about the self-hosted newsletter and waitlist template

What is self-hosted newsletter software?
Self-hosted newsletter software runs on infrastructure you control instead of a third-party SaaS. You own the subscriber database, the sending logic, and the admin interface. This template deploys a complete newsletter and waitlist service to your own Codehooks backend, so your list is never locked inside another company's platform.
Is this a good Mailchimp or Substack alternative?
Yes—if you want ownership and flat pricing. Mailchimp, Substack, and ConvertKit are hosted services that charge per subscriber and keep your data in their systems. This template gives you the same core capabilities (double opt-in, lists, campaigns, a no-code admin UI) while you self-host everything and keep full source code access.
How does double opt-in work?
When someone signs up via the public POST /subscribe endpoint, the system sends a tokenized confirmation email. The subscriber is only added to your active list once they click the confirmation link. This keeps your list clean and protects your sender reputation.
Which email providers are supported?
Mailgun (the default) and Brevo. Set your provider's API key as an environment variable and you're ready to send. Switch providers by changing EMAIL_PROVIDER—your lists and campaigns stay the same.
Can I import an existing subscriber list?
Yes. The admin UI supports bulk import, so you can move an existing list into your self-hosted newsletter. You can also manage multiple lists and cascade-delete them cleanly.
Is it CAN-SPAM and GDPR compliant?
The template ships with the building blocks: List-Unsubscribe headers, one-click unsubscribe, and a configurable footer for your company name and mailing address (required for CAN-SPAM). Because you own the subscriber data in your own database, honoring deletion and access requests is straightforward.
Do I need to know how to code?
You need to run a few CLI commands once to deploy and set environment variables. After that, everyday work—creating lists, composing campaigns, editing branding—happens in the no-code admin UI. Developers can still customize the source when they want to.
How do I collect subscribers?
The template exposes a public signup endpoint at POST /subscribe that accepts { email, list }. Point your signup form or waitlist page at it, and confirmed subscribers flow straight into the list you created in the admin UI.
How much does it cost?
Codehooks has a free tier for development and a $19/month production tier. There's no per-subscriber pricing—you pay for the backend, not the size of your list. Your email provider (Mailgun or Brevo) bills separately for sending.