Skip to content

Instantly share code, notes, and snippets.

@ahmadawais
Last active November 13, 2023 12:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadawais/56aa81f46261c7cd45e3c3950b42f657 to your computer and use it in GitHub Desktop.
Save ahmadawais/56aa81f46261c7cd45e3c3950b42f657 to your computer and use it in GitHub Desktop.
Install Sendy on DigitalOcean 2022

You can open the Marketplace tab and search for the current LAMP stack.

We will use the LAMP stack on a Basic plan for 5$/month.

php -v

# if php 8 then
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.0-curl
sudo apt-get install php8.0-curl
apt-get install php-xml
sudo apt-get install php8.0-xml
systemctl restart apache2
sudo systemctl reload nginx
sudo service apache2 restart

# Set up A record for domain and then
certbot --apache -d sub.domain.com
# certbot --nginx -d sub.domain.com -d www.sub.domain.com

mysql

# Run the following four linces copied/pasted at once.
create database sendy;
CREATE USER 'sendy_admin'@'localhost' IDENTIFIED BY 'PASS_HERE';
GRANT ALL ON *.* TO 'sendy_admin'@'localhost';
FLUSH PRIVILEGES;


# - Setup sendy/includes/config.php file
# Copy sendy to server
# - `rsync -av Downloads/sendy/ root@DO_IP_HERE:/var/www/html/`

chmod 777 /var/www/html/uploads/

sudo a2enmod rewrite && sudo service apache2 restart

# Now access your domain to install.
@MeMartijn
Copy link

Still works in 2023! Couple of comments for people using this:

  1. sudo apt-get install php8.0-curl runs twice in this script, that's unnecessary.
  2. sudo systemctl reload nginx is not necessary in the current version of the LAMP stack from DO Marketplace, so I skipped this one after it failed.
  3. Make sure to set up an A-record already to your Droplet, otherwise certbot fails while trying to create a certificate. I linked my domain to DigitalOcean, and then you can just let DigitalOcean create the records.
  4. I had an issue after all the steps that when I got on the page, I got this error: Uncaught Error: Call to undefined function curl_init() in /var/www/html/includes/functions.php(1). Following the steps in this article, I got it to work by running sudo apt-get install php-curl and then restart apache using systemctl restart apache2 and sudo service apache2 restart to be sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment