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

**URL:** <https://community.n8n.io/t/n8n-with-alb-ingress-and-as-a-behaviour-in-the-cloudfront-with-path-based-routing/32094>\
**Category:** Questions\
**Tags:** deployment\
**Created:** [October 26, 2023, 4:32pm UTC](https://community.n8n.io/t/n8n-with-alb-ingress-and-as-a-behaviour-in-the-cloudfront-with-path-based-routing/32094 "2023-10-26T16:32:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kylychbek](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kylychbek/32/29951_2.png) [@Kylychbek](https://community.n8n.io/u/Kylychbek)\
**Post date:** [October 26, 2023, 4:32pm UTC](https://community.n8n.io/t/n8n-with-alb-ingress-and-as-a-behaviour-in-the-cloudfront-with-path-based-routing/32094/1 "2023-10-26T16:32:35Z")

</div>

## 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](http://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](http://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](http://example.com/n8n) it should get me to N8N. is there anything what can I do with image to make it work?

> **[Configuration methods | n8n Docs](https://docs.n8n.io/hosting/configuration/configuration-methods/)**
>
> How to set environment variables for n8n.

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

```auto
(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:**

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [October 26, 2023, 7:38pm UTC](https://community.n8n.io/t/n8n-with-alb-ingress-and-as-a-behaviour-in-the-cloudfront-with-path-based-routing/32094/3 "2023-10-26T19:38:21Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [January 24, 2024, 7:38pm UTC](https://community.n8n.io/t/n8n-with-alb-ingress-and-as-a-behaviour-in-the-cloudfront-with-path-based-routing/32094/4 "2024-01-24T19:38:45Z")

</div>

Closed on January 24, 2024, 7:38pm UTC

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