How to Reset a Forgotten n8n Password in xCloud
Updated December 6, 2026 · 4 min read
If you forgot the password for your n8n site on xCloud, run n8n’s own reset command, n8n user-management:reset, from the site’s Commands page, restart n8n, and create the owner account again. Your workflows and saved credentials stay in place. This guide shows each step in the xCloud dashboard.
Your n8n login is saved inside your site folder, /var/www/YOUR_DOMAIN, so the reset command must run from that folder as your site user. The steps below do this for you.
What the reset changes
The reset puts n8n back to its first-run state, so the Set up owner account screen appears again. According to n8n’s CLI documentation:
| Item | What happens |
|---|---|
| Owner account | Email, name and password are cleared. Two-factor settings and API keys are kept. |
| Other users | All other user accounts (except service accounts) and pending invites are deleted. |
| Workflows and credentials | Kept. Workflows and their credentials move to the owner account you create next; credentials shared across the whole instance stay shared. |
If other users sign in through single sign-on (SAML, OIDC or LDAP), the reset fails; contact support.
If other people use your n8n site, you need to invite them again after the reset. If your site can send email, try the forgot-password link on the n8n sign-in page first: it changes only your password. That link works only after you set up SMTP for n8n.
Step 1: Open the site’s Commands page
In the xCloud dashboard, go to Sites and open your n8n site. In the left menu, click ‘Tools’ → ‘Commands’, then click ‘Run Custom Command’.

Step 2: Run the reset command
The Run New Command window opens. In the Command box, enter the line below. Replace YOUR_DOMAIN with your n8n site’s domain, exactly as it appears at the top of the site page:
cd /var/www/YOUR_DOMAIN && n8n user-management:reset
The User field already shows your site user, so the command runs as the user that owns n8n. Click ‘Run Command’.

Keep the cd /var/www/YOUR_DOMAIN && part. If n8n runs from another folder, it creates a new, empty database there and still prints a success message, while your real login stays unchanged.
Step 3: Check the output
The command takes a few seconds. When its status shows Completed, click ‘View’ next to it. The Output log should end with:
Successfully reset the database to default user state.

If the status shows Failed, open ‘View’ to read the error. If the output says “No such file or directory”, the domain in the cd part is wrong: fix it and run the command again.
Step 4: Restart n8n
n8n must restart before the change takes effect. In the site’s left menu, click ‘Settings’ and scroll to Rescue Site. Turn on ‘Restart PM2 Process’, click ‘Run Now’, then confirm with ‘Yes, Run Now’.

You can also restart n8n from the Commands page or the web terminal. The PM2 process is named n8n- followed by your domain:
pm2 restart n8n-YOUR_DOMAIN
Step 5: Set up the owner account again
Open your n8n site in the browser. n8n now shows the Set up owner account screen. Enter your email, first name, last name and a new password (8 or more characters, with at least 1 number and 1 capital letter), then click ‘Next’.

You are signed in as the owner, and your existing workflows are still there. Store the new password in a password manager, and invite any other users again.
If you also lost your two-factor codes
If the account had two-factor authentication and you no longer have the codes, the reset does not remove it. Run this on the Commands page instead, with the email of the locked account:
cd /var/www/YOUR_DOMAIN && n8n mfa:disable [email protected]
Then restart n8n as in Step 4 and sign in with your password. n8n then lets you set up two-factor authentication again.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| The old login still works after the reset | The command ran outside the site folder | Run it again with cd /var/www/YOUR_DOMAIN && in front, then restart n8n |
| The sign-in page still shows instead of the setup screen | n8n was not restarted | Restart n8n (Step 4) and reload the page |
| The site shows a 503 error after the restart | n8n is still starting or has stopped | Wait a minute, then follow how to fix 503 errors for n8n |
Frequently asked questions
Will resetting the n8n password delete my workflows?
No. The reset keeps all workflows and credentials. Workflows and their credentials move to the owner account you create next; credentials shared across the whole instance stay shared. It removes the owner’s email, name and password, and it deletes every other user account and pending invite.
The command said it worked, but my old login still opens n8n. Why?
The command ran outside your site folder, so n8n reset a new, empty database instead of your site’s. Run it again with cd /var/www/YOUR_DOMAIN && in front, then restart n8n.
Can I reset the password by email instead?
Yes, if your n8n site can send email. Set up SMTP for the site first, then use the forgot-password link on the n8n sign-in page. Without SMTP, use the reset command in this guide.
I also lost my two-factor authentication codes. What now?
Run the n8n mfa:disable command from your site folder on the Commands page, with the email address of the locked account, then restart n8n and sign in with your password.
Related guides
- Deploy n8n with xCloud One Click Apps
- Set up SMTP for n8n
- Fix 503 Bad Gateway errors for n8n
- Run commands in your site and server
If you run into any issues while resetting your n8n password, feel free to reach out to our support team.