Hi There. I am currently unable;e to log back into N8n after restarting the containers. I set Postgres, and reviewed the log files for the containers, and no issues.
So when prompted with the login screen, it does recognize my user, but says my password is invalid (I did also double check my password)
If I reset the password it works and I can log in. Do it is able to store some information.
I am using portainer, i created a stack/docker compose and below is my config (With random password and url data):
version: '3.8'
networks:
n8n_net:
driver: bridge
services:
n8n:
container_name: n8n
image: n8nio/n8n
restart: unless-stopped
user: 0:0
ports:
- 5678:5678
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8ndatabase
- DB_POSTGRESDB_USER=admin
- DB_POSTGRESDB_PASSWORD="apassword"
- WEBHOOK_URL=https://n8.mydomain.com/
- EXECUTIONS_PROCESS=main
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_EDITOR_BASE_URL=https://n8.mydomain.com/
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD="Test@132"
- N8N_PROTOCOL=http
- NODE_ENV=production
- GENERIC_TIMEZONE=Africa/Harare
- N8N_EMAIL_MODE=smtp
- N8N_SMTP_PORT=587
- N8N_SMTP_HOST=smtp.office365.com
- N8N_SMTP_USER=admin.mydomain.com
- N8N_SMTP_PASS=randompassword
- [email protected]
- N8N_SMTP_SSL=false
volumes:
- /home/ubuntu/DockerCompose/n8n:/home/node/.n8n
networks:
- n8n_net
links:
- postgres
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:11
restart: always
container_name: n8n_postgres
user: 0:0
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD="apassword
- POSTGRES_DB=n8ndatabase
- POSTGRES_NON_ROOT_USER=adminroot
- POSTGRES_NON_ROOT_PASSWORD="adminrandompassword
volumes:
- /home/ubuntu/DockerCompose/n8n/database:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U admin -d n8ndatabase']
interval: 5s
timeout: 5s
retries: 10
ports:
- 3306:3306
networks:
- n8n_net