Init Problem: 403 Error - N8N, Nginx Proxy Manager, and Docker

Today I installed n8n on a Ubuntu 20.04 host running Docker. I have a domain with an A record that points to my local Nginx reverse proxy server. I want to reverse proxy to my internal server 192.168.1.21 (the Ubuntu box running docker). I am able use n8n locally at http://192.168.1.21:5678 however when I try to use my domain to get to my n8n instance I get the following 403 error:

Error

Here are the environment variables I used in docker:

Here are my Nginx proxy details:
n8n Proxy Host Details

I’m wondering if anyone has some ideas on what a possible cause is or if you have run into this issue before and what you did to fix it.

I’m still fairly green when it comes to linux, docker, and nginx so I am sure I am missing something.

I sincerely appreciate any help!

One other thing to note, when I try to add a node, I just get a spinning circle with the word loading under it.

Thanks all!

I just tried accessing my n8n.domain.com site from another computer and it works. The computer I was originally accessing it from is my work computer and it has McAfee UCE on it and I think it is blocking certain traffic. :unamused:

Nginx 403 Forbidden error is a status code generated and displayed to the user when a client tries to access a part of the webserver with insufficient permissions. When nginx access a directory, it tries to index it and return the list of files inside it to the browser/client, however by default directory indexing is disabled, and so it returns the Nginx 403 forbidden error.

Incorrect Index File

The try_files tries the literal path you specify in relation to the defined root directive and sets the internal file pointer. If you have directory indexing off, and is having this problem, it’s probably because the try_files you are using has a directory option:

location / {
  try_files $uri $uri/ /index.html index.php;
}

to

location / {
  try_files $uri /index.html index.php;
}

Incorrectly set permissions

This error can also result from files and directories having incorrectly set permissions. In order to resolve this , change the directories permission to 755 and the file permissions to 644 . Make sure that the user running the Nginx process owns the files. For example, set user to www-data:

sudo chown -R www-data:www-data *

Finally, set the directory and file permissions as:

sudo chmod 755 {dir}
sudo chmod 644 {files}