n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
45.79k stars 6.4k forks source link

Cannot set port in using N8N_HOST #1431

Closed flypenguin closed 3 years ago

flypenguin commented 3 years ago

Describe the bug if you set N8N_HOST including a port it will take :5678 and then add the port number.

To Reproduce Steps to reproduce the behavior:

  1. start n8n using: N8N_HOST=thing.thang.thong:8080 node_modules/n8n/bin/n8n
  2. see this on startup: http://thing.thang.thong:8080:5678/
  3. check HTTP trigger nodes, which will have the same setting (which won't work, of course)

Expected behavior to see this: http://thing.thang.thong:18443/

Environment (please complete the following information):

Additional context This is important when running n8n behind a load balancer, for example.

janober commented 3 years ago

N8N_HOST is for the host and N8N_PORT for the port. So if you set them separately it will work fine.

You can find the documentation here: https://docs.n8n.io/reference/configuration.html#publish

Have fun!