I configured Nginx on my server to manage the SSL certificate, which worked correctly.
Before that I couldn’t open the OAuth2 authentication screen, now I can open the page because https is working but it gives an error:
Error: getaddrinfo ENOTFOUND api.mercadolivre.com.br
More details
Failed to connect. The window can be closed now.
Config Nginx:
server {
listen 80;
listen 443 ssl;
server_name flow.mimostyle.com.br;
ssl_certificate /etc/letsencrypt/live/mimostyle.com.br/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mimostyle.com.br/privkey.pem;
location / {
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_cache_bypass $http_upgrade;
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;
}
}
Config N8N:
[Unit]
Description=✨N8N Workflow Automation ✨
[Service]
ExecStart=/usr/bin/n8n start
Restart=always
User=administrador
Group=sudo
Environment="N8N_HOST=flow.mimostyle.com.br"
Environment="N8N_PORT=5678"
Environment="N8N_PROTOCOL=https"
Environment="NODE_ENV=production"
Environment="WEBHOOK_URL=https://flow.mimostyle.com.br/"
Environment="GENERIC_TIMEZONE=America/Sao_Paulo"
Environment="TZ=UTC"
Environment="N8N_PERSONALIZATION_ENABLED=true"
Environment="N8N_BASIC_AUTH_ACTIVE=true"
Environment="N8N_BASIC_AUTH_USER=username"
Environment="N8N_BASIC_AUTH_PASS=password"
Environment="N8N_PAYLOAD_SIZE_MAX=10240"
Environment="N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}"
Environment="NODE_FUNCTION_ALLOW_EXTERNAL=moment,lodash,moment-with-locales"
Environment="EXECUTIONS_DATA_PRUNE_INTERVAL=true"
Environment="EXECUTIONS_DATA_MAX_AGE=24"
Environment="EXECUTIONS_DATA_PRUNE_MAX_COUNT=50"
Environment="EXECUTIONS_DATA_MAX_AGE=336"
Environment="LD_LIBRARY_PATH=/opt/oracle/instantclient"
Environment="N8N_LOG_LEVEL=verbose"
Environment="N8N_LOG_OUTPUT=console,file"
Environment="N8N_LOG_FILE_LOCATION=/home/administrador/.n8n/logs/n8n.log"
Environment="N8N_LOG_FILE_MAXSIZE=50"
Environment="N8N_LOG_FILE_MAXCOUNT=60"
Environment="N8N_SECURE_COOKIE=false"
NODE_OPTIONS="--max_old_space_size=8000"
Environment="SSL_EMAIL=xxxxxxxxxxxx"
[Install]
WantedBy=multi-user.target
Information on your n8n setup
- **n8n version:1.75.2
- **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 20.04