


I use a minimum Debian installation that doesn’t include programs such as git or curl. Ready to begin? Lets Go! Install Required Packages

Without it you will not be able to use HTTPS. A domain name that’s setup to point to your server.A server is required because we’ll also set up Let’s Encrypt for HTTPS (because security). If you don’t have an account click here to claim $10 free Digital Ocean credit ($10 is enough to fund 2 months worth of server space). Unless you know what you’re doing I highly recommend Digital Ocean to set up a test server. Debian 9 (Stretch) is required to follow through with this guide.Prerequisitesīefore we start you’ll need a few things: This is a fairly long article so go grab a coffee, or a beer, and let’s begin. We’ll also secure our application by using HTTPS and Let’s Encrypt and go into a little detail on securing the firewall. Imho it’s much easier to scale an application that already uses HAProxy as opposed to having to refactor the setup afterwards. I could have used Nodes’ cluster to do this, but HAProxy is simpler, and offers more features. In my setup HAProxy acts like a reverse proxy, proxying requests from port 443 to the port of the NodeJS application (in this tutorial we run 3 instances of the application on ports 5001, 5002, 5003) and use HAProxy to load balance between them.
#Nodebox on ubuntu how to#
You will also learn how to turn your NodeJS application into a daemon so it can be stopped, started and restarted and automatically restart on crash/reboot. In this guide I’m going to show you how to setup a NodeJS server using HAProxy and Let’s Encrypt on Debian Stretch.
