What is N8N?

n8n is a tool that helps you create workflows, which are like step-by-step instructions for your apps to follow. You don’t need to know how to code to use it. You just drag and drop different actions (called “nodes”) to create a flow. For example, you could set up a workflow that automatically saves email attachments to your cloud storage or posts updates to your social media accounts.

In short, n8n makes it easy to automate tasks and connect different apps and services, saving you time and effort

Server setting detail

By default n8n uses port 5678. Requests comes in has to be forwarded to port 5678.

SSL certificates

Using self managed server will require certificates to be installed on server.

HTTP to HTTPS

HTTP isn’t secure, this has to be forced to use HTTPS.

NginX on VM

nginx is installed on ubuntu server to handle following.

  1. Port forwarding to 5678
  2. Enforcing HTTPS
  3. SSL certificates

VM instance on GCP

Free tier VM is used for this project.

Dynamic ip address vs Static ip address

To optimize the cost, instead of using static public ip address, dynamic public ip address is used and to get around the ip address changing problem, DDNS is used with a purchased domain.

Domain registration

To optimize the cost, $1/year domain was purchased from IONOS.

DNS

NS was set to use free DDNS service, dynv6.

DDNS

Server, dynv6 was used to act as NS.

ddclient was installed on VM to handle updates of IP address of the VM/nic.

Using n8n

webhook, by default it uses localhost, this is updated in nginx to handle localhost and also I updated to use domain inserted as a parameter.

WEBHOOK_URL="https://mydomain/"