This has been a long time coming! Apologies for the delay. Let’s dive right into it now. Recently I have been talking about Sendy and E-mail marketing quite a lot. People have reached out to me asking for help in setting it up, and I think this is the best way to help out everyone.
Here is what you are going to need :
1) Any VPS : For the purpose of this guide I’ll be using Digital Ocean(You can get it here if you don’t have it for $100 in Free Credits) A $10 Droplet should be more than enough.
2) Sendy License : You can purchase Sendy directly from their website here.
3) Amazon SES : This is to actually send emails, we will get to this later.
In your Digital Ocean account, select the following options. A $10/Month server has been more than enough for me till now. I would also recommend not having any landing pages on this server, since you can get hit with “Google Safe Browsing” hammer if you are running a large volume. And your email delivery rates would be severely affected. I tried to save $10 by uploading landing pages to the same server and probably cost me thousands in down-time till I built my reputation on a new domain again. Don’t be like me.
Now, an important thing to remember here is to set a root password and write it down somewhere. There are two options SSH keys or root password. Now they say that SSH keys are more secure, but frankly I don’t understand it so I went with root password. Assign a proper hostname so you can identify which server is what, not an issue if you have just one but when you keep adding more servers it gets really tricky to identify!
Now, we need to get a few pre-requisites installed in order to proceed.
- Point your domain to the IP of your Digital Ocean droplet.
- Install apache2
- Install php and required php-extensions
- Install MySql
Point number 1 is pretty self-explanatory and I won’t go into any details with it.
For this, you need to click on your newly created droplet and choose “Console” on the top right.
A Console will pop up, here is where you use the root password that you set before. Login is by default “root”. Once you get in, we will first start off by installing apache2. Follow the steps below!
$ sudo apt update
$ sudo apt install apache2
$ sudo ufw app list
You’ll be presented with an output like this below :
Available applications: Apache Apache Full Apache Secure OpenSSH
$ sudo ufw allow 'Apache'
//verify if it worked by following command:
$sudo ufw status
//check web server status by :
$ sudo systemctl status apache2
If you get this, your Apache server has been set up properly! You can test it out by visiting your IP address or if you have already set up a domain, then go to your domain and you’ll be able to see this page :
Now, we need to install php. Follow the next steps!
$sudo apt update
$sudo apt install php libapache2-mod-php
sudo systemctl restart apache2
After this we need to install mySQL
$sudo apt update
$sudo apt install mysql-server
sudo systemctl restart apache2
Now access mysql : sudo mysql
mysql command interface would open, type in the following commands one after the other
mysql>CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;
mysql>GRANT ALL PRIVILEGES ON * . * TO ‘newuser’@’localhost’;
mysql>CREATE DATABASE sendytest; (can name it anything)
mysql>GRANT ALL PRIVILEGES ON sendytest.* TO 'newuser'@'localhost'
Now for the next step, you need to install php zip module to upload and extract Sendy
If you have followed all steps above, connect to your server through SFTP using your root credentials and go to var/www/html. This is where you will be uploading your sendy zip file.
To extract it, you need php zip module and a few other extensions which can be downloaded with the following commands quite easily!
apt-get install php7.4-zip
sudo apt-get install php-mysql
sudo a2enmod rewrite
sudo apt update
sudo apt upgrade
sudo apt install curl
Now you need to upload Sendy to the var/www/html and extract it. After this you can head to the includes/config.php folder and enter the mysql credentials that we created a few steps ago. Your config.php file should look something like this.
Now just visit your sendy installation path using the url : “yourdomain.com/sendy” and you” land up on the page below. As you can see, simplexml is not installed.
You might run into a few other errors like this and all you need to do is google how to install the particular extension on your version of ubuntu and there are plenty of tutorials for that. In this case, we need to type this command :
sudo apt-get install -y php-simplexml
after installing any new extension, it’s good practice to just restart the apache server by:
sudo service apache2 restart
Also, in order for everything to work smoothly, make sure you change this in etc/apache2/apache2.conf
Options Indexes FollowSymLinks
Require all granted
Shown below :
You are all set now! All you need to do is get your credentials from Amazon and paste it in the boxes below! This is a pretty simple setup and Amazon has a great document for you to follow !