help needed - n8n self-hosted auth locked out
alexisbhj
PROOP

2 months ago

My n8n instance on Railway has been inaccessible since this morning. Can't log in despite multiple reset attempts. This is critical as I have a client solution that needs to be deployed ASAP.

Setup:

  • n8n self-hosted on Railway (PostgreSQL + Redis + Queue workers)
  • 7 active production workflows (RAG, webhooks, client automations)
  • Cannot truncate: I cannot afford to lose the workflows

What I've already tried:

  • Deleted and recreated user in database with bcrypt hash
  • Verified environment variables (DB_ , N8N_)
  • Tested in private browsing / different browser / 4G network
  • Cleared browser cache completely
  • Redeployed n8n service (x5)
  • Checked logs: no errors, no trace of login attempts
  • Created a 2nd user with different credentials: same result
  • Checked for intrusion: no suspicious users or IPs in database

Symptoms:

  • Login screen displays correctly
  • "Wrong username or password" on every attempt
  • No logs appear when I try to log in (as if the request isn't reaching the DB)
  • "Forgot password" doesn't work (no SMTP configured)

Hypotheses:

  • Issue with N8N_ENCRYPTION_KEY that may have changed
  • bcrypt hash not compatible with n8n version
  • Frontend session issue

Question: How can I regain access WITHOUT losing the workflows in the database? Is there an API endpoint or CLI command to force a clean password reset?

Context: I have an urgent client delivery, so any quick solution would be greatly appreciated.

Solved$20 Bounty

Pinned Solution

Try this:

  1. SSH into your main n8n container (Right click your n8n service and Copy SSH Command)
  2. Run the command n8n user-management:reset
  3. Redeploy the service

You'll need Railway CLI installed locally for step 1.

2 Replies

Status changed to Open Railway 2 months ago


Try this:

  1. SSH into your main n8n container (Right click your n8n service and Copy SSH Command)
  2. Run the command n8n user-management:reset
  3. Redeploy the service

You'll need Railway CLI installed locally for step 1.


0x5b62656e5d

Try this: 1. SSH into your main n8n container (Right click your n8n service and Copy SSH Command) 2. Run the command `n8n user-management:reset` 3. Redeploy the service You'll need Railway CLI installed locally for step 1.

alexisbhj
PROOP

2 months ago

Thxxxxxx !


Status changed to Solved 0x5b62656e5d 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...