Complete Tutorial

Self-Hosted Newsletter Platform

Complete step-by-step guide to set up your own newsletter platform. Own your audience, control your costs, master email deliverability.

What is this?

A complete self-hosted newsletter platform that runs entirely on your server. No monthly subscriptions, no external dependencies, no vendor lock-in. You own your audience data and control every aspect of your newsletter.

Built with Go backend, SvelteKit frontend, and Docker deployment. Includes email deliverability optimization, subscriber management, campaign creation, and analytics - everything you need to run a professional newsletter.

Why Self-Hosted?

  • • Complete ownership of your subscriber data
  • • No monthly fees or usage limits
  • • Full control over email deliverability
  • • Customizable to your exact needs
  • • No platform can shut you down

Prerequisites

What you need:

  • VPS or Server: Any Linux server with Docker support (Ubuntu 20.04+ recommended)
  • Domain: A domain name for your newsletter (e.g., newsletter.yourdomain.com)
  • Basic Terminal Knowledge: Comfortable with copy-pasting commands
  • 30 minutes: Setup time for the complete platform

Quick Start (5 minutes)

One-Command Installation

curl -sSL https://raw.githubusercontent.com/your-repo/install.sh | bash

This script will install Docker, clone the repository, and start all services automatically.

Detailed Installation

1

Prepare Your Server

Connect to your server via SSH and update the system:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git
2

Install Docker

Install Docker and Docker Compose:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Log out and back in for Docker group changes to take effect.

3

Clone and Configure

Clone the repository and set up environment variables:

git clone https://github.com/UmarbekFU/self-host.git
cd self-host
cp .env.example .env

Edit the .env file with your domain and license key:

SENDING_DOMAIN=newsletter.yourdomain.com
LICENSE_KEY=your-license-key-here
4

Start the Platform

Launch all services with Docker Compose:

docker-compose up -d

The platform will be available at http://your-server-ip

Email Configuration

DNS Records Setup

After starting the platform, you'll need to configure DNS records for email deliverability:

SPF Record

v=spf1 a mx ip4:YOUR_SERVER_IP ~all

Add this TXT record to your domain's DNS

DKIM Record

newsletter._domainkey.yourdomain.com

The platform will generate your DKIM key automatically

Important: These DNS records are crucial for email deliverability. Without them, your emails will likely go to spam folders.

Domain Verification

The platform includes built-in tools to verify your DNS configuration:

  1. 1. Go to the Domains section in your admin panel
  2. 2. Add your domain (e.g., newsletter.yourdomain.com)
  3. 3. The platform will generate DKIM keys and DNS records
  4. 4. Copy the provided DNS records to your domain registrar
  5. 5. Use the built-in verification tool to check your setup

How to Use

1. Create Subscriber Lists

Start by creating subscriber lists to organize your audience:

  • • Go to "Lists" in the admin panel
  • • Click "Create New List"
  • • Give it a name (e.g., "Weekly Newsletter")
  • • Add a description for your reference

2. Import Subscribers

Import your existing subscriber list or add subscribers manually:

CSV Format:

email,name,source
john@example.com,John Doe,website
jane@example.com,Jane Smith,referral

3. Create Your First Campaign

Design and send your newsletter:

  1. 1. Go to "Campaigns" and click "Create Campaign"
  2. 2. Select your subscriber list
  3. 3. Write your subject line and content
  4. 4. Use the built-in editor or paste HTML
  5. 5. Preview and test with a few email addresses
  6. 6. Schedule or send immediately

4. Track Performance

Monitor your newsletter performance with built-in analytics:

Key Metrics:

  • • Open rates
  • • Click-through rates
  • • Bounce rates
  • • Unsubscribe rates

Subscriber Growth:

  • • New signups
  • • List growth over time
  • • Geographic distribution
  • • Engagement patterns

Troubleshooting

Common Issues & Solutions

Emails going to spam

This usually means DNS records aren't configured properly.

  • • Check SPF record is added to your domain
  • • Verify DKIM record is properly configured
  • • Ensure DMARC policy is set up
  • • Use the platform's verification tool

Docker containers won't start

Usually a port conflict or permission issue.

  • • Check if ports 80, 443, 25, 587 are available
  • • Ensure Docker is running: sudo systemctl start docker
  • • Check logs: docker-compose logs

Can't access admin panel

Check firewall and port configuration.

  • • Ensure port 80 is open in your firewall
  • • Check if containers are running: docker ps
  • • Try accessing via server IP instead of domain

Getting Help

If you run into issues:

  • • Check the logs: docker-compose logs -f
  • • Verify your DNS records with online tools
  • • Test email sending with a small list first
  • • Check server resources (RAM, disk space)

Best Practices

Email Deliverability

  • • Always use double opt-in for new subscribers
  • • Keep your sending volume consistent
  • • Monitor bounce rates and remove bad emails
  • • Use a dedicated IP address for sending
  • • Warm up your IP gradually with small sends

Content Strategy

  • • Write compelling subject lines
  • • Keep content valuable and relevant
  • • Use clear call-to-actions
  • • Test different send times
  • • Segment your audience for better engagement

Technical Maintenance

  • • Regular backups of your database
  • • Monitor server resources and performance
  • • Keep Docker images updated
  • • Set up monitoring and alerts
  • • Test your setup regularly

Legal Compliance

  • • Include unsubscribe links in every email
  • • Honor unsubscribe requests immediately
  • • Follow GDPR and CAN-SPAM regulations
  • • Keep clear records of consent
  • • Provide clear privacy policy

Project Status

Production Ready

This self-hosted newsletter platform is fully functional and ready for production use. All core features are implemented and tested.

Core Features

Email sending, subscriber management, campaign creation, analytics

Email Deliverability

DKIM, SPF, DMARC configuration, bounce handling

Easy Setup

One-command installation, Docker deployment, clear documentation

Next Steps

Ready to get started? Follow the installation guide above and you'll have your own newsletter platform running in under 30 minutes.

Get the Code

The complete self-hosted newsletter platform is available on GitHub with full documentation.

git clone https://github.com/UmarbekFU/self-host.git

One-Time Setup

Install once, use forever. No monthly fees or usage limits.

Full Control

Own your data, customize everything, scale as needed.