Describe the problem/error/question
When I send invite emails from n8n, the URL in the email includes port :5678
, like this:
http://<m,y-domain>:5678/n8n/signup?inviterId=...
However, I’m exposing n8n via an nginx reverse proxy at:
https://<your-domain>/n8n
Port 5678 is not publicly accessible, so these links don’t work externally.
How can I ensure that invite links use the correct public URL without the port?
What is the error message (if any)?
This is not workflow-related. It’s about deployment and URL generation.
Information on your n8n setup
n8n version: 1.89.2
Database: PostgreSQL
n8n EXECUTIONS_PROCESS: default
Running n8n via: Docker (compose)
Operating system: Ubuntu (hosted on AWS EC2)
Relevant docker-compose environment variables:
version: '3.8'
services:
n8n:
image: n8nio/n8n
restart: always
environment:
- N8N_HOST=<my-domain>
- N8N_PORT=5678
- N8N_PROTOCOL=https
- N8N_PATH=/n8n
- N8N_EMAIL_MODE=smtp
- N8N_SMTP_HOST=smtp.gmail.com
- N8N_SMTP_PORT=465
- N8N_SMTP_USER=<myuser>
- N8N_SMTP_PASS=<mypass>
- N8N_SMTP_SENDER=<mysender>
- N8N_SMTP_SSL=true
- N8N_GENERIC_CONFIG_TRUST_PROXY=true
- N8N_RUNNERS_ENABLED=true
- N8N_PROXY_HOPS=1
- N8N_METRICS_INCLUDE_IN_HEADERS=false
- N8N_WEBHOOK_URL=https://<my-domain>/n8n
- DB_POSTGRESDB_DATABASE=<mydb>
- DB_POSTGRESDB_USER=<myuser>
- DB_POSTGRESDB_SCHEMA=n8n
- DB_POSTGRESDB_PASSWORD=<mypass>
- GENERIC_TIMEZONE=Asia/Tokyo
- N8N_SECURE_COOKIE=false
ports:
- "5678:5678"
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
nginx config:
server {
listen 443 ssl;
server_name <your-domain>;
ssl_certificate /etc/letsencrypt/live/<your-domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<your-domain>/privkey.pem;
location /n8n{
proxy_pass http://localhost:5678/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Any help or clarification is greatly appreciated. Thank you!