Environment
Component | Details |
---|---|
Application | n8n workflow automation tool |
Version | 1.81.4 (and similar) |
Deployment | Docker container |
Problem
Admin password is lost or forgotten for n8n running in Docker container.
Failed Attempts
Standard n8n commands executed inside the container:
n8n users:update --email=user@example.com --password=newpassword
Error: command users:update not found
n8n user-management:list
Error: command user-management:list not found
n8n user-management:reset
Output: Successfully reset the database to default user state.
(but doesn’t work without container restart)
Solution
Execute from host system:
docker exec -it n8n n8n user-management:reset
Restart container:
docker restart n8n
Navigate to n8n web interface where you’ll be prompted to create new credentials.
Why This Works
- The reset command executed from the host properly resets the user database
- Container restart allows n8n to reinitialize with the reset database
- After restart, n8n recognizes the reset state and prompts for new admin credentials
Common Errors
Invalid timestamp warning:
Invalid timestamp value for N8N_RELEASE_DATE: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
Permissions warning:
Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide.
These warnings don’t prevent the password reset process from working.