futurminds / n8n-self-hosting

9 stars 3 forks source link

Incorrect, breaking code provided in the examples.. #3

Open onlineadventures opened 2 weeks ago

onlineadventures commented 2 weeks ago

This wouldn't work without changing the following lines in the nginx config detailed in Step 4..

(UI won't update otherwise)

From:

proxy_set_header Connection '';

To:

proxy_set_header Connection 'upgrade';
proxy_set_header Upgrade $http_upgrade;

Additionally, the docker command given in Step 2 needed to be changed as it's incorrect..

sudo docker run -d --restart unless-stopped -it \
--name n8n \
-p 5678:5678 \
-e N8N_HOST="https://your-domain.com" \
-e WEBHOOK_TUNNEL_URL="https://your-domain.com/" \
-v ~/.n8n:/root/.n8n \
n8nio/n8n

This line:

-e N8N_HOST="https://your-domain.com" \

Should read:

-e N8N_HOST="your-domain.com" \

And the following line needs to be added to be able to receive webhooks:

-e WEBHOOK_URL="https://your-domain.com/" \

So, the corrected working version should read:

sudo docker run -d --restart unless-stopped -it \
--name n8n \
-p 5678:5678 \
-e N8N_HOST="your-domain.com" \
-e WEBHOOK_TUNNEL_URL="https://your-domain.com/" \
-e WEBHOOK_URL="https://your-domain.com/" \
-v ~/.n8n:/root/.n8n \
n8nio/n8n

Or if you are using a subdomain, it should look like this:

sudo docker run -d --restart unless-stopped -it \
--name n8n \
-p 5678:5678 \
-e N8N_HOST="subdomain.your-domain.com" \
-e WEBHOOK_TUNNEL_URL="https://subdomain.your-domain.com/" \
-e WEBHOOK_URL="https://subdomain.your-domain.com/" \
-v ~/.n8n:/root/.n8n \
n8nio/n8n
DayneLinx commented 2 weeks ago

Thank. you for the update. My server is setup and working as expected so far.

segunolamidegitup commented 1 week ago

Mine is not working I followed the same procedure and it did not.

segunolamidegitup commented 1 week ago

My domain is just loading the nginx https://n8n.nolimit.buzz @onlineadventures @futurminds

futurminds commented 1 week ago

@segunolamidegitup It seems your issue is fixed. I see your n8n getting loaded: Screenshot 2024-09-08 224416

futurminds commented 1 week ago

@onlineadventures You may not need the below changes: proxy_set_header Connection 'upgrade'; proxy_set_header Upgrade $http_upgrade; Instead, just removing the below line should work fine: proxy_set_header Connection '';

Thanks for pointing out the unwanted https in this line: -e N8N_HOST="https://your-domain.com" \

segunolamidegitup commented 6 days ago

@segunolamidegitup It seems your issue is fixed. I see your n8n getting loaded: Screenshot 2024-09-08 224416

Yes thank you. i had to use a new instance.