Installation of Sendy on Ubuntu

MSP Medium
6 min readSep 22, 2023

--

Introduction

Sendy is a self hosted email application that helps to send trackable emails via Amazon SES. It supports multiple client accounts called ‘Brand’. Clear reports are generated and has List and Subscriber Management. Housekeeping, Auto responder, Blacklist are the major features of Sendy.

Prerequisites

  1. Sendy License (One time cost)
  2. EC2 for hosting Sendy
  3. SES Activation
  4. Valid and Verified Domain Name in SES

Procedure

  1. License should be purchased from https://sendy.co/

Name, Email and Domain Name should be filled before purchasing License. For eg: sendy.mydomain.com

2. Email will be sent after successful purchase of license where you can download Sendy Application zip file. License Key will also be sent on same email

3. Now you need an AWS Account where Sendy will be installed and can use Amazon SES Service.

By Default, Amazon SES would be in Sandbox Mode, to enable production mode, you need to explain to the AWS Team why we are using this service. Create a Support case to increase the Service limit.

Use case description example:

Hello AWS Team,

We are <company description>. Our domain is ‘https://domain.com/' . We need to provide various information about our activities, public involvements and other details for our registered users.

We do have our subscribed user list and will be sending only to those email addresses. We will be sending emails after checking the validity of email. For that, we use an email sanitization application ‘usebouncer.com’ that provides detailed information such as deliverable email, undeliverable email and unknown. Hence, we will be using deliverable email only for sending emails.

I hope my request for Amazon SES Production access will be approved. Please let me know if you have any queries.

Thank you!

Regards,

Gaurav khatiwada

4. Now Create an EC2 instance for installing Sendy. You can use ‘t3.small’ and a 20GB SSD would be enough. Also, attach an EIP/ Static IP. After that, you need to point the EIP to the domain name ‘eg: sendy.domain.com’

Installation of Sendy on Ubuntu

First launch an ec2 like shown below

You can use ‘t3.small’ and a 20GB SSD would be enough. Also, attach an EIP.I am just testing so i would choose 8 ssd and no Elastic ip.

Make key pair so we can ssh into server

Then launch instance

Then ssh into server like shown below

ssh -i sendy.pem ubuntu@52.90.126.159

sudo su

apt-get update -y

apt-get install php-fpm libapache2-mod-php php-mysql php-curl php-xml

y

apt-get install mariadb-server mariadb-client

y

mysql -u root -p

create database sendy;

show databases;

Create user ‘gk-db’@’localhost’ IDENTIFIED BY ‘gaurav’;

GRANT ALL PRIVILEGES ON *.* TO ‘gk-db’@’localhost’;

FLUSH PRIVILEGES;

exit

aws configure in your local pc with secret & access key and give region where your server is;

aws configure

Then upload sendy.zip from your local pc to server by scp like shown below;

scp -i sendy.pem sendy-6.0.7.1.zip ubuntu@52.90.126.159:~

Again ssh into server;

ssh -i sendy.pem ubuntu@52.90.126.159

You can see the sendy.zip which you just scp from your local pc

ls

sudo su

mv sendy-6.0.7.1.zip /var/www/html

cd /var/www/html

ls

apt install unzip

unzip sendy-6.0.7.1.zip

ls

cd sendy/includes

nano config.php

define(‘APP_PATH’, ‘https://sendy.domain.com')

$dbHost = ‘localhost’;

$dbUser = ‘mysql-username’;

$dbPass = ‘mysql-password’;

$dbName = ‘database-name’;

Ctrl+x

y

Enter

cd /etc/apache2

nano apache2.conf

<Directory /var/www/>

Options Indexed FollowSymLinks

AllowOverride All

Require all granted

</Directory>

cd /etc/apache2/sites-available

cp 000-default.conf sendy.conf

nano sendy.conf

Uncomment ServerName by removing # and write the domain name ‘eg: sendy.domain.com’

Change the DocumentRoot to /var/www/html/sendy

sudo a2ensite sendy.conf

Then give SES & SNS full access to this account or user

service apache2 restart

service php8.1-fpm restart

service mysql restart

Copy public ip of ec2 where sendy is installed

Then make A record with subdomain & public ip like shown below;

Then open your subdomain then the sendy will open

Sendy is successfully installed on EC2 server, and can be accessed through domain name

Documentation by:Gaurav khatiwada

2023 Setember 22

https://medium.com/@gauravkhatiwada11

--

--