Preparing your instance

OS Updates

Before doing anything else, update your operating system by running these two commands:

sudo apt update
sudo apt upgrade
curl -fsSL <https://deb.nodesource.com/setup_17.x> | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt install nginx
sudo systemctl status nginx
cd /etc/nginx/sites-available/
sudo nano n8n.conf

Now insert a copy of the below example configuration and replace

The last step is making your n8n instance available to the outside world. To do so, we create what NGINX calls a server block (a configuration block that defines how a server responds to requests):

Configure NGINX 1st way

Make sure NGINX is running: The below command should return Active: active (running) among other information.

The last piece to install is NGINX. This will be our reverse proxy accepting requests from the internet and forwarding them to n8n. It can easily be extended in case you want to run additional applications on the same instance.

NGINX

Installing Node.js v17.x: