diff --git a/_reference/dropletSetup.md b/_reference/dropletSetup.md index 5454fde13..345313552 100644 --- a/_reference/dropletSetup.md +++ b/_reference/dropletSetup.md @@ -33,20 +33,6 @@ Add the SSH key to the drop creation screen. 2. Nginx Http: Opens only port 80 (normal, unencrypted web traffic) 3. Nginx Https: Opens only port 443 (TLS/SSL encrypted traffic) 5. Should now be able to go to IP and see nginx responding with a blank page. -4. Install Certbot - 1. $ sudo add-apt-repository ppa:certbot/certbot - 2. $ sudo apt-get update - 3. $ sudo apt install python-certbot-nginx - 4. $ sudo nano /etc/nginx/sites-available/default - 5. Find the existing server_name line and replace the underscore with your domain name: - ... - server_name example.com www.example.com; - ... - 6. $ sudo nginx -t //Verify syntax. - 7. $ sudo systemctl reload nginx -5. Generate Certificate - 1. $ sudo certbot --nginx -d example.com -d www.example.com //Follow prompts. - 2. $ sudo certbot renew --dry-run //Dry run to test auto renewal. 6. Install NodeJs 1. $ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - 2. $ sudo apt install nodejs @@ -56,8 +42,9 @@ Add the SSH key to the drop creation screen. 2. $ cd bodyshop && npm install //Install all server dependencies. 8. Setup PM2 1. $ npm install pm2 -g - 2. $ pm2 start server.js - 3. $ pm2 startup ubuntu //Ensure it starts when server does. + 2. copy the environment variables to the local .env file. + 3. $ pm2 start server.js + 4. $ pm2 startup ubuntu //Ensure it starts when server does. 9. Alter Nginx config 1. sudo nano /etc/nginx/sites-available/default 2. Add Appropriate server names to the file. www. and non-www. @@ -68,6 +55,18 @@ Add the SSH key to the drop creation screen. proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; - - +9. Install Certbot + 1. $ sudo add-apt-repository ppa:certbot/certbot + 2. $ sudo apt-get update + 3. $ sudo apt install python-certbot-nginx + 4. $ sudo nano /etc/nginx/sites-available/default + 5. Find the existing server_name line and replace the underscore with your domain name: + ... + server_name example.com www.example.com; + ... + 6. $ sudo nginx -t //Verify syntax. + 7. $ sudo systemctl reload nginx +10. Generate Certificate + 1. $ sudo certbot --nginx -d example.com -d www.example.com //Follow prompts. + 2. $ sudo certbot renew --dry-run //Dry run to test auto renewal.