Serve n8n over an subpath

Hi everyone,
I have the challenge that i need to serve n8n over an subpath.
So instead of localhost:5678 it needs to be accessible from localhost:5678/subpath
I have already changed the base parameter in the vue router config(packages/editor-ui/src/router.ts) to /subpath, but this parameter is of course only responsible for the client side routing.
All the static files and /rest are still accessed over the root path. Does anyone know what I have to change in the source code so that they will also be served from the subpath?

Hey @nick, welcome to the community! Perhaps this helps? n8n/docker/compose/subfolderWithSSL at master · n8n-io/n8n · GitHub :slight_smile:

hey @tanay . Is there any way to do this without traefik? Just by configuring N8N_PATH?

I’m not familiar with traefik. What rules are used to configure the subpath if using another reverse proxy?

Thanks.

ok, so it just works. If you don’t use traefik just configure N8N_PATH, and everything served from n8n will have the subpath. Now just configure your reverse proxy to point to that particular url.

I have an issue with opening workflows from n8n.io but will post a new question.