Skip to content

Self-hosted newsletter software

Self-hosted newsletter software is a newsletter app you run on your own infrastructure instead of paying a company to run it. FlockStack is licensed under the AGPL-3.0 and runs on Cloudflare Workers, with D1 for data, R2 for files and Amazon SES for sending, so your subscribers, issues and sending reputation live in accounts you own.
  • Runs on your CloudflareWorkers for the app, D1 for your data and R2 for images and exports, in your own account.
  • Your email providerYou connect your own Amazon SES account, and your sending reputation is yours.
  • No plans, no limitsA self-hosted server has no billing, and no limit on emails or subscribers other than your providers'.
  • The same API and MCPThe same 234 actions as FlockStack Cloud, for your code or an AI assistant.

What self-hosted newsletter software is

Hosted newsletter platforms run the software, the servers and the email sending for you and charge for it. Self-hosted software reverses that: you run the application on infrastructure you control and connect an email provider such as Amazon SES. You pay your providers' prices instead of a platform's, and you take on the setup and the upkeep.

What FlockStack provides

The whole app, not only a sender: a campaign editor, signup forms with double opt-in, welcome emails, CSV imports with address checks, tags, segments and automations, scheduling, a public website for each newsletter with an RSS feed, referrals, comments, paid subscriptions and products, and a REST API and MCP server for everything the dashboard does. The code is licensed under the GNU AGPL-3.0 and lives at github.com/ankurmans/flockstack.

The licence lets you read, change and run the code. If you change it and let other people use your version over a network, it asks you to offer them your source. Read the licence for the details.

Hosting architecture

  • Cloudflare Workers run the app, built with OpenNext.
  • D1 holds contacts, campaigns, stats and settings. A D1 database is limited to 10 GB.
  • R2 holds uploaded images and, in private buckets, account exports and product files.
  • Upstash QStash runs the background work: sending in batches of 50 emails, scheduled sends and the other jobs.
  • Amazon SES delivers the email, through an AWS account of your own. PostShiba is the other provider FlockStack supports, invite only for now.
  • Upstash Redis is optional, for rate limits shared across instances.

What you need

A Cloudflare account, an AWS account with SES approved for production sending, an Upstash account for QStash, a domain, and a computer with Node.js 22 or later. Plan for about an hour, most of it waiting for DNS and for AWS to approve production sending.

How deployment goes

  • Create the D1 database and the R2 buckets, and apply the migrations with Wrangler.
  • Build with OpenNext and deploy the Worker.
  • Set the secrets, among them BETTER_AUTH_SECRET, SUPPRESSION_HASH_KEY, ADMIN_EMAILS and APP_URL. FlockStack refuses to start with a short secret.
  • Connect SES: a production-access request, an SNS topic for bounce and complaint events, and an IAM user with the policy the README lists.
  • Create the QStash schedule that runs automations every 5 minutes.
  • Turn sending on with SENDING_ENABLED. Until then nothing goes out to readers, so a half-finished setup can't send by mistake.

Subscribers and sending

Everything about the list works as it does on FlockStack Cloud: confirmation, imports with checks, segments, tags, 20 custom fields a newsletter, merge tags and automations. Each account can have up to 3 newsletters. Only the addresses you list in ADMIN_EMAILS and ALLOWED_EMAILS can sign in.

How sending through Amazon SES works, including what it costs and what AWS expects of a sender, is on its own page.

API and MCP

The REST API and the MCP server are part of every server: 234 actions, the same ones the dashboard runs. The newsletter API and the newsletter MCP server describe them; the keys and OAuth sign-in work against your own address.

Data ownership

Your subscribers and issues are in your D1 database and your images in your R2 bucket, in your Cloudflare account. Nobody else holds a copy. Account export, which writes contacts as CSV and issues as Markdown and HTML, is part of the app.

What stays your job

  • Deliverability. SES reputation and limits belong to your AWS account. FlockStack pauses and blocks sends past bounce and complaint limits, but your sending domain's DNS and your list's quality are yours.
  • Upgrades. Deploying a new version and applying its migrations is a manual step.
  • Secrets. Rotating BETTER_AUTH_SECRET signs everyone out and breaks the links in emails already sent.
  • Backups and monitoring of your own D1 database and Worker.
  • Support. Self-hosting comes without support: setup questions go unanswered.

Self-hosted or FlockStack Cloud

Self-hosted FlockStack Cloud
Setup About an hour, by you None: create an account
Sending Your own Amazon SES account FlockStack's Amazon SES account
Cost Your Cloudflare, Upstash and email provider bills Free for 2,500 subscribers and 10,000 emails a month, then plans from $9 a month
Limits on emails and subscribers None from FlockStack Set by the plan
Support None A help chat that answers from the docs, and email to support
Updates You deploy them Done for you

Getting started

The README lists every service, secret and step in order, with the AWS policy and the commands. If you would rather not run it, FlockStack Cloud is the same code, run for you.

Sources

  • FlockStack's source, licence and README: github.com, checked
  • Amazon SES prices per 1,000 emails: aws.amazon.com, checked

Questions

Is FlockStack open source?
Yes. The app is licensed under the GNU AGPL-3.0, so you can read the code, change it and run it on your own server. The source is at github.com/ankurmans/flockstack.
What does it run on?
Cloudflare Workers, with D1 for data, R2 for files, Upstash QStash for background jobs and Amazon SES for sending.
How much does self-hosting cost?
FlockStack itself costs nothing to run. You pay what Cloudflare, Upstash and your email provider charge. Amazon SES charges $0.10 to $0.16 per 1,000 emails depending on its pricing plan, and the Amazon SES guide covers what that means for a newsletter.
Is there a limit on subscribers or emails?
Not from FlockStack. A self-hosted server has no plans, so the limits come from your email provider and your Cloudflare plan.
Can I get support?
No. Self-hosting comes without support, and the issue tracker is off. FlockStack Cloud has a help chat and email support.

Prefer not to run it?

FlockStack Cloud is the same application, run for you. Start free, and pay for the emails you send when you outgrow it.

Start with FlockStack Cloud