Installing n8n and first boot

Note We have set the n8n interface to port 5678, since port 443 (HTTPS) is a privileg port that only the root user can run . If we configure it like this, we will have problems logging in or out.

2.4. Creation of user n8n

As we mention above, the n8n user will not have any privileges except for the n8n service itself. Of course, we can set the username we want, but if we change it we must make sure that everything points to this new user.

We will execute the following command:

sudo useradd -m n8n -s binbash

2.5. Configuring HTTPS for n8n.
To communicate with the n8n web interface (locat on port 5678) we will configure a web server that acts as a proxy. In a nutshell, we will run a truemoney database web server (nginx, for example) as root on port 443, which will rirect the request to port 5678, which is where the n8n interface is locat.

 

special data

Nginx web server

NGINX is an open source web server software, similar to Apache.

To install it, we will run the following:

sudo apt-get install -yq nginx
To configure the reverse proxy if this persona represents your target with Nginx, we will write the following:

We activate the n8n web service
sudo ln -fs etcnginxsites-availablen8n.conf etcnginxsites-enabln8n.conf.

We restart Nginx sudo service nginx reload

To add a secure certificate for the n8n address, we can use Certbot, which will create a secure HTTPS certificate using LetsEncrypt and automatically renew it from time to time.

sudo apt-get -yq install python3-certbot-nginx

sudo certbot -d n8n.yourdomain.com
and we will answer in the console the relevant questions that Certbot asks us.

We will see that the file we have in etcnginxsites-availablen8n.conf has been chang (Certbot has add its directives), it should look snbd host something like this.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top