Describe the problem/error/question
I’ve setup n8n with npm, using websocket push backend and user management.
As I’m logged in on one of my used browsers, I can access and use n8n.
But if I open n8n in a new private tab, I only see the red loading spinner when I would expect the login screen.
The network logof the browser says, that while accessing /rest/login
n8n responded with
{
"code": 401,
"message": "Not logged in"
}
My nginx reverse proxy configuration looks like this:
location /webhook/ {
proxy_pass http://127.0.0.1:5678;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
location /rest {
proxy_pass http://127.0.0.1:5678;
proxy_ssl_verify off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'Upgrade';
proxy_set_header Host $host;
proxy_ssl_server_name on;
}
location / {
proxy_pass http://127.0.0.1:5678;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
My n8n systemd service unit looks like this:
[Unit]
Description=n8n - Easily automate tasks across different services.
After=network.target
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/n8n
Restart=on-failure
Environment=N8N_HOST="n8n.***************"
Environment=N8N_METRICS=true
Environment=N8N_VERSION_NOTIFICATIONS_ENABLED=false
Environment=N8N_DIAGNOSTICS_ENABLED=false
Environment=N8N_PROTOCOL=https
Environment=WEBHOOK_URL="https://n8n.***************/"
Environment=NODE_ENV=production
Environment=NODE_TLS_REJECT_UNAUTHORIZED=0
Environment=NODE_OPTIONS="--max-old-space-size=16384"
Environment=GENERIC_TIMEZONE="Europe/Berlin"
Environment=N8N_LOG_OUTPUT=console
Environment=N8N_LOG_LEVEL=debug
Environment=N8N_PAYLOAD_SIZE_MAX=1024
Environment=DB_TYPE=postgresdb
Environment=DB_POSTGRESDB_DATABASE="n8n"
Environment=DB_POSTGRESDB_USER="n8n"
Environment=DB_POSTGRESDB_PASSWORD="***************"
Environment=EXECUTIONS_DATA_PRUNE=true
Environment=EXECUTIONS_DATA_MAX_AGE=5
Environment=NODE_FUNCTION_ALLOW_EXTERNAL=he,crypto-js
[Install]
WantedBy=multi-user.target
Do you see any issue here?
Information on your n8n setup
- n8n version: 1.05
- Database (default: SQLite): Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system: Ubuntu LTS