N8N with alb ingress and as a behaviour in the cloudfront with path based routing

Describe the problem/error/question

Is there anyone who has an experience of adding N8N service which is in kubernetes and was build within alb ingress controller. So I do have a website example.com which is on s3 bucket and was distrubuted with cloudfront to world. And there I have some backend services in cloudfront was added as behaviours. and when I search for example.com/backend it will get me there. So I want to make like that with N8N but it is not working somehow. So I want to add N8N to cloudfront so under one ALB I could route traffic to different services. So when I will search for example.com/n8n it should get me to N8N. is there anything what can I do with image to make it work?

n8n creates the webhook URL by combining N8N_PROTOCOL , N8N_HOST and N8N_PORT . If n8n runs behind a reverse proxy, that won’t work. That’s because n8n runs internally on port 5678 but is exposed to the web using the reverse proxy on port 443. In that case, it’s important to set the webhook URL manually so that n8n can display it correctly in the Editor UI and register the correct webhook URLs with external services.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Kylychbek,

I would advise against using k8s if you are not familiar with how to configure it as if you misconfigure something you could potentially have some big problems.

You can run n8n under a subfolder, we have a compose example on how to do this here: https://github.com/n8n-io/n8n/tree/master/docker/compose/subfolderWithSSL in theory using that may give you enough to get your k8s install running as needed.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.