Skip to content

12. DigitalOcean and LetsEncrypt HTTPS

Nick Doiron edited this page Apr 25, 2016 · 2 revisions

If you've been running your server on your own machine, you might be wondering how you can publish your site on the web.

Up to this point, all of this code can be pushed to Heroku.

If you want to support secure HTTPS connections, you'll need to pay a premium to Heroku, or re-deploy the app on a cloud host such as Amazon Web Services or DigitalOcean. 1batch.co is on DigitalOcean and uses LetsEncrypt for a free HTTPS certificate, so I'll describe how to set up those.

  1. Create a DigitalOcean account
  2. Create the smallest available 'droplet' server using Ubuntu OS, and wait for its root password to be sent to your e-mail
  3. Connect to the server using ssh root@IPADDRESS
  4. Update the server's existing software: sudo apt-get update && sudo apt-get upgrade
  5. Install git, NodeJS, and MongoDB (unless you're hosting MongoDB on another server)
  6. git clone your source code repo into /var/www/
  7. npm install
  8. In the home directory, git clone LetsEncrypt
  9. ./letsencrypt-auto

Clone this wiki locally