When Starting with npm run dev; localhost:5678 redirects to a login page;whats the init email and psw? how can i find .env template

Describe the problem/error/question

When starting the n8n application locally using “npm run dev”, it redirects to a login page when accessing “localhost:5678” for local development. The login page requests an email and password. When using the GitHub email and password, it consistently shows an error. what’s the initial email and password or how to bypass this step.
where can i find .env.local file?

What is the error message (if any)?

n8n:dev: [Node] 401 Not logged in
n8n:dev: [Node] 401 Wrong username or password. Do you have caps lock on?
n8n:dev: [Node] 401 Wrong username or password. Do you have caps lock on?
n8n:dev: [Node] 401 Wrong username or password. Do you have caps lock on?
n8n:dev: [Node] 401 Wrong username or password. Do you have caps lock on?
n8n:dev: [Node] 401 Wrong username or password. Do you have caps lock on?

Please share your workflow

image

Information on your n8n setup

  • **n8n version: latest
  • **Database (default: SQLite):
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • **Operating system: macos

Hey @chris-deng,

Welcome to the community :cake:

There is no default email / pasword it will ask you to set it when you first launch n8n. It may be worth checking if you have ever ran n8n before (desktop, docker, from npm) and used the same home path as it will share the database if that is the case.

If you wanted you can reset the user management feature using the cli command n8n user-management:reset or if you are sure you have not used n8n locally before you can move the database.sqlite file from ~/.n8n/database.sqlite to somewhere else then start up n8n and it will ask you to make the account again.

3 Likes

I ran the command “npx n8n” and accessed localhost:5678, where I applied for a username and password. However, when I run “pnpm run dev” and enter the same email and password, I keep getting an error.

thanks for your replay;
i used n8n user-management:rest command to reset user info
thats solved my question
:+1:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.