how can i recover my n8n credentials?

loxers
HOBBY

a month ago

I dont remember my n8n credentials and I cant access.

Also, I'm trying to run a command inside my n8n service container to reset the user password, but all CLI methods are failing.

  • My service is deployed via Nixpacks.

  • railway run n8n user-management:reset fails with either No such file or directory or command not found: n8n.

  • The web terminal/shell option is not available in my service's UI.

  • The "Start Command" field in the UI is locked, so I cannot modify it.

  • railway shell only creates a local subshell, and railway run still fails from within it.

I need a reliable way to execute a command inside my running service. The command I need to run is: n8n user-management:reset.

Thank you.

$10 Bounty

3 Replies

quadstrikesecurity
FREE

a month ago

Container Command Execution

Since railway run fails, try:

bash# Get container ID

railway ps

# Execute directly in container

railway exec -- npm run start -- user-management:reset

Or add a custom start command in Railway dashboard:

npx n8n user-management:reset && npx n8n start

Temporary Dockerfile :

Create a Dockerfile to override Nixpacks:

dockerfileFROM n8nio/n8n:latest

RUN npx n8n user-management:reset --email=admin@example.com --password=newpassword

CMD ["n8n", "start"]


sim
FREETop 1% Contributor

24 days ago

n8n is in a sandbox so you cannot use the CLI like that globally


sim
FREETop 1% Contributor

24 days ago

Why don't you try railway run npx n8n user-management:reset or add a script to run it with via npx


how can i recover my n8n credentials? - Railway Help Station