✨ Strapi MCP is now Generally Available - let your agents manage your Strapi content ✨

You forgot your Strapi admin password. You clicked "Forgot password", and nothing arrived, because on a local project no email provider is configured, and Strapi's default email provider writes to the console instead of sending mail.

You do not need the email flow. Strapi ships a CLI command for exactly this.

The one-line fix

From the root of your Strapi project:

# yarn
yarn strapi admin:reset-user-password --email="you@example.com" --password="NewPassw0rd!"

# npm
npm run strapi admin:reset-user-password -- --email="you@example.com" --password="NewPassw0rd!"

# npx
npx strapi admin:reset-user-password --email="you@example.com" --password="NewPassw0rd!"

Then log in at /admin with the new password.

The -- that trips everyone up

With npm you need a bare -- before the options. Without it, npm swallows --email and --password as its own arguments and Strapi receives nothing:

npm run strapi admin:reset-user-password -- --email="..." --password="..."
#                                        ^^ this

This is the single most common reason the command "does nothing", and the reason many forum answers say "it only worked for me with npm" or "only with yarn". Both work; the argument syntax differs.

Password requirements

The new password must be at least 8 characters and contain at least one uppercase letter and one number. Weak passwords like 12345 are rejected, and the failure can look like the command silently doing nothing.

If you also forgot which email you used

List every administrator account first:

npx strapi admin:list-users

That prints a table of ID, email, first and last name, active status, blocked status, and assigned roles. Pick the right email and re-run the reset.

Running it interactively

Call the command with no options and Strapi prompts you for the email and password:

yarn strapi admin:reset-user-password

One caveat straight from the docs: interactive prompts do not display with npm. If you want the prompt flow, use yarn or npx. With npm, pass the options explicitly.

If no admin account exists at all

A fresh database with no administrator, whether after a data transfer, a container rebuild, or a wiped volume, needs a user created rather than reset:

npx strapi admin:create-user \
  --firstname="Kai" \
  --lastname="Doe" \
  --email="you@example.com" \
  --password="NewPassw0rd!"

The related administration commands are all available from the same CLI: admin:list-users, admin:active-user, admin:block-user, and admin:delete-user.

Doing this on a deployed instance

The command has to run in the same environment as the running application, because it talks to the database through your project's config/database configuration. Where that leaves you depends on your hosting:

  • A VPS or bare-metal server: SSH in, cd to the project directory, and run the command. Make sure the same environment variables the app uses are loaded in your shell, otherwise the CLI will connect to the wrong database, or to none at all.
  • Docker: docker compose exec strapi npx strapi admin:reset-user-password --email="..." --password="..."
  • A platform with no shell (some PaaS tiers): run the command locally with the production database credentials exported in your environment. You are connecting to the same database, just from a different machine, so check that your IP is allowed by the database firewall first.
  • Strapi Cloud: use the project's admin panel to manage users; you can also open a shell via the Cloud CLI.

Setting up the email flow so this does not happen again

The "Forgot password" link works fine once a real email provider is configured. Strapi's default provider (sendmail) is intended for development and prints to the terminal. For anything you actually rely on, install a provider (@strapi/provider-email-nodemailer, SendGrid, Amazon SES, Mailgun, Resend) and configure it in config/plugins:

module.exports = ({ env }) => ({
  email: {
    config: {
      provider: 'nodemailer',
      providerOptions: {
        host: env('SMTP_HOST'),
        port: env.int('SMTP_PORT', 587),
        auth: {
          user: env('SMTP_USERNAME'),
          pass: env('SMTP_PASSWORD'),
        },
      },
      settings: {
        defaultFrom: 'no-reply@example.com',
        defaultReplyTo: 'no-reply@example.com',
      },
    },
  },
});

Then set the admin panel's public URL under config/admin, so the reset link in the email points at the right host rather than localhost.

What about the old strapi console snippet?

Older forum threads suggest opening strapi console and calling internal services to hash and write a password directly. Do not do that on Strapi 5. Those APIs changed between major versions, the snippets floating around target v3, and writing a badly hashed password into the admin_users table locks the account out in a way that is harder to recover from than the original problem. The CLI command is supported and does the right thing.

Quick reference

TaskCommand
Reset a passwordstrapi admin:reset-user-password --email=… --password=…
List adminsstrapi admin:list-users
Create an adminstrapi admin:create-user --firstname=… --email=… --password=…
Unblock an adminstrapi admin:block-user --email=… --block=false
Re-activate an adminstrapi admin:active-user --email=… --active=true

Further reading:

Theodore Kelechukwu OnyejiakuDevRel and Community | Software Developer | Technical Writer

Theodore is a Technical Writer and a full-stack software developer. He loves writing technical articles, building solutions, and sharing his expertise.

The True TCO of Self-Hosting a Headless CMS
Ecosystem·12 min read

The True TCO of Self-Hosting a Headless CMS

Discover the real cost of self-hosting Strapi 5: infrastructure, DevOps labor, security, migrations, and hidden costs—with a practical TCO checklist.

·September 24, 2026
How Do You Preserve SEO Rankings During a CMS Migration?
Ecosystem·13 min read

How Do You Preserve SEO Rankings During a CMS Migration?

A developer's CMS migration SEO checklist: URL mapping, 301 redirects, on-page parity, robots.txt, redirect testing, and post-launch monitoring.

·September 24, 2026
What Is a Content Agent? Agentic AI for CMS Workflows Explained
Ecosystem·24 min read

What Is a Content Agent? Agentic AI for CMS Workflows Explained

Learn what a content agent is, how the observe-plan-act-evaluate loop works, and when agentic AI makes sense for your CMS workflows and content operations.

·September 24, 2026