Installing Your Own Email Marketing Service with Sendy

Looking for an affordable, self-hosted email marketing platform? Given ridiculous SaaS subscription fees, Sendy is an impressive alternative worth considering.

By running Sendy yourself, you get advanced deliverability features and scripting comparable to enterprise tools – without the huge price tag. Thousands rely on Sendy‘s customizability and integration options to drive business growth while keeping costs low.

In this step-by-step guide, I‘ll show you how to fully install Sendy on Ubuntu, leverage the power of AWS SES, and implement best practices around security, deliverability and automation.

Why Sendy Changes The Game

Let‘s quickly discuss why self-hosted solutions like Sendy are game changing:

Serious Cost Savings

Here‘s a comparison if sending 100,000 emails/month:

Service Monthly Cost
SendGrid $79
MailChimp $199
Sendy + AWS SES $25

With Sendy, once you pay the 1-time $59 license fee, ongoing costs boil down to:

  • A small Ubuntu VPS (~$10/mo)
  • Super cheap AWS delivery fees

Customization & Control

Managing your own setup means avoiding restrictive vendor policies. You can customize both emails and workflows to suit your business needs precisely.

And having direct access to the server environment means…

Deep Data Insights

Beyond tracking opens/clicks, your scripts can hook into low-level event and log data for next-level engagement analysis.

Extensibility & Integrations

Want to pull subscriber data from a CRM? Automatically enroll webinar signups? Sendy‘s developer-friendly API enables limitless integrations.

Now that you know the unique advantages, let‘s get Sendy running on your Ubuntu server!

Prerequisites

Before we begin, make sure you have:

  • Ubuntu 18.04/20.04 server access
  • A registered domain name
  • AWS SES authenticated account (signup link)
  • Sendy purchase license key (buy here)

Step 1 – Setting up AWS SES Credentials

Since Sendy leverages Amazon SES for email delivery, we need to authorize API access in AWS first.

  1. Login to your AWS console and navigate to the IAM dashboard.

  2. Click "Add user" and set a username like SendyMailer.

  3. Check the "Programmatic access" checkbox. This will generate a access key and secret we‘ll use later.

  4. Search and attach the AmazonSESFullAccess policy to permit sending email.

  5. Finish creating the user and copy both the ID and secret key that gets generated. Treat these like passwords you‘d want to keep private.

Awesome! With credentials setup in AWS, let‘s shift over to our Ubuntu server…

Step 2 – Installing Base Requirements

We‘ll use Apache for serving web pages, PHP to run Sendy‘s code, MariaDB for storing data, and some helper libraries.

Login as root and update packages first:

apt update  

Then install required components:

apt install apache2 php php-mysql php-curl php-xml mariadb-server unzip -y

We‘ll also want to enable URL rewriting in Apache:

a2enmod rewrite 

And run MariaDB‘s post install security script:

mysql_secure_installation

Set a root DB password and remove anonymous user access when prompted.

Alright, base stack ready! Now let‘s…

Step 3 – Prepare the Sendy Database

For safely storing subscriber data, campaign info and more, a dedicated DB is recommended.

Connect to MariaDB CLI as root:

mysql -u root -p

Enter the password set earlier when prompted.

Create a new database:

CREATE DATABASE sendy; 

Make a Sendy database user:

GRANT ALL ON sendy.* TO ‘sendyuser‘@‘localhost‘ IDENTIFIED BY ‘str0ngPassword123!‘;

Obviously set your own secure password here!

This user will have full access to manipulate the sendy database contents.

Step 4 – Setup Application Code

Almost there! We still need to:

  1. Upload Sendy source files
  2. Install PHP extensions
  3. Update configuration
  4. Complete web installer

4.1 Upload Source Code

Download your Sendy license files from the link received when purchasing.

Then scp or otherwise upload the zipped contents to your server and extract into Apache‘s public_html folder:

cd /var/www/html
unzip sendy-4.0.1.zip

A new sendy folder containing the application will be present.

4.2 Install Helpers

A couple PHP extensions are required as well:

apt install php-zip php-mbstring php-json -y
phpenmod zip mbstring json  

Restart Apache to load the new extensions:

systemctl restart apache2

4.3 Configure Settings

We need to update Sendy‘s config file with our database credentials.

Edit /var/www/html/sendy/includes/config.php:

nano /var/www/html/sendy/includes/config.php

Update the variables here to match:

define(‘DB_HOST‘, ‘localhost‘);
define(‘DB_USER‘, ‘sendyuser‘);
define(‘DB_PASS‘, ‘str0ngPassword123!‘); 
define(‘DB_NAME‘, ‘sendy‘);

Save changes after updating.

4.4 Run Installer

Finally, open Sendy in your browser at http://yourdomain.com/sendy/install to kick off the web installer.

Complete the steps, using the AWS credentials created earlier when asked.

Once finished, your Sendy panel will appear! 🎉

Step 5 – Customizing Sendy Post-Install

Now for some recommended tweaks to polish things up.

5.1 Increase AWS SES Quotas

Since we‘re just getting started, SES will be restricted to ~200 emails daily. Submit a quota increase request for higher limits aligned with your needs.

5.2 Verify Your Domain

Verify ownership of the domain you‘ll use to send email from in SES. This involves adding TXT/CNAME records.

Verification helps improve email deliverability and inbox placement significantly.

5.3 Enable Security Features

Turn on Sendy‘s built-in 2-factor authentication under Settings > API Access for better account security.

You may also want to look at limiting SSH access to your Ubuntu server by IP/key-based authentication only.

Ongoing Maintenance

Once everything‘s humming along, be sure to:

  • Create some email campaigns but start delivery small to warm-up your domain‘s reputation.
  • Watch out for Sendy or OS-level updates needing to be applied periodically.
  • Check in on email stats to catch any deliverability issues early.
  • Consider a Sendy-focused backup plan in case of disaster.

And I think that about wraps it up!

Let me know if any part of the process needs more explanation. With Sendy properly setup though, you now have a super powerful email marketing engine at your fingertips for pennies on the dollar compared to expensive SaaS platforms.

What types of emails will you create first? Segment subscribers by location and interests to deliver hyper-targeted campaigns driving conversions. Leverage automation flows to turn list-building into easy mode. Or simply keep things simple with a regular newsletter.

Either way, I hope you found this guide helpful for getting Sendy running smoothly. Now dive in and explore everything it can do!

Onwards and upwards,
[Your Name]

Tags: