3 months ago
Hi Railway team,
I’m facing an unexpected authentication issue with my n8n deployment on Railway.
What changed
n8n was previously accessible directly via the public production URL (no login screen).
Suddenly, the same URL now redirects to an n8n login page asking for email and password, but no credentials were ever created.
What I’ve already tried
Redeployed all containers
Restarted the service
Tried changing environment variables (including auth-related ones)
Tried disabling auth-related flags
Cleared browser cookies / tested incognito
Reverted env vars back to previous values
None of these resolved the issue.
Current behavior
n8n container logs show it starts successfully:
n8n ready on port 5678
No startup errors
However, UI always forces login and rejects all attempts since no user exists.
Important context
This is a Docker-based n8n deployment on Railway
Authentication was never explicitly enabled
No email/password or owner user was set earlier
This behavior started suddenly without intentional config changes
Concern
It feels like either:
A Railway-level change,
A volume/state persistence issue,
Or n8n detecting auth incorrectly due to environment or storage state.
I need help with:
Understanding why auth got enforced automatically
How to reset or bypass auth safely
Whether any Railway defaults, updates, or volume changes could have caused this
I’m okay with:
Resetting n8n user/auth state
Recreating volumes if required
Following Railway-recommended fix
Please let me know the safest way to restore access.
Thanks.
4 Replies
Status changed to Awaiting User Response Railway • 3 months ago
3 months ago
Thanks for the detailed explanation.
I tried settingN8N_BASIC_AUTH_ACTIVE=false and N8N_USER_MANAGEMENT_DISABLED=true, then fully restarted the service.
Unfortunately, it still redirects me to the login page, and since no user was ever created, the login can’t succeed.
At this point, the app appears to be stuck in enforced auth mode despite these env vars.
Let me know what else I should check (DB flags, owner bootstrap, or volume reset), because the behavior hasn’t changed yet.
3 months ago
Thanks for the detailed explanation.
I tried settingN8N_BASIC_AUTH_ACTIVE=false and N8N_USER_MANAGEMENT_DISABLED=true, then fully restarted the service.
Unfortunately, it still redirects me to the login page, and since no user was ever created, the login can’t succeed.
At this point, the app appears to be stuck in enforced auth mode despite these env vars.
Let me know what else I should check (DB flags, owner bootstrap, or volume reset), because the behavior hasn’t changed yet.
3 months ago
hey @vaibbhav
yo caught that n8n auth mess in the thread sucks when it hits out of nowhere been stuck like that before on railway
core deal is fresh n8n drops force auth on public deploys like here and db holds it tight so env flips do zilch no user setup means dead end lock
solid fix reset user management bounces it to fresh mode make owner in ui wizard keeps workflows creds all that just nukes users zero anyway
### steps to sort it
1 snag railway cli if not around
run npm install -g @railway/cli or docs at https://docs.railway.com/guides/cli
log in railway login browser auth pops
2 hop in n8n shell
railway list grab project
railway shell or --service n8n if bunch check dashboard project > services for name
puts you in docker container
3 fire reset command
try n8n user-management:reset
if command missing npx n8n user-management:reset cuz node
if perms nag su node or su - node then command
should output reset to default state done
4 dip out and test
exit shell
restart service dashboard or railway up redeploy
hit n8n url incognito should wizard up
drop email name pass for owner
### if ditch auth full no login
after reset db clean add envs in service settings > variables
N8N_USER_MANAGEMENT_DISABLED=true
optional N8N_BASIC_AUTH_ACTIVE=false belt suspenders
redeploy restart stops auth flip back to open watch tho public url means free for all
### if reset tanks
scan container logs railway for command oops
last call if data loss cool dashboard n8n service > volumes trash volume wipes db redeploy fresh setup
syncs with n8n community docs go to for self host jams
share errors if hit for tweaks
hope that pops the lock bro
3 months ago
you just try:
N8N_USER_MANAGEMENT_DISABLED=false
N8N_BASIC_AUTH_ACTIVE=false
N8N_DISABLE_UI_AUTH=false
redeploy, then goto:"{your railway url}/setup " then create a owner, that's all and don't forget to delete these variables afterwards.
or if your DB doesn't allow /setup,
then delete the railway volume(first backup, cuz it'll delete the users and workflows too) and redeploy, n8n acts fresh recreate users, workflows & credentials, then you should be good to go.