Skip to content Skip to footer

How to Reset Your n8n Admin Password in Docker

How to Reset Your n8n Admin Password in Docker

Forgot your n8n admin password? Don’t worry—this guide will walk you through the exact steps to reset it when running n8n in a Docker container.

The Situation

You’re running n8n version 1.81.4 (or similar) in a Docker container, and you’ve lost access to your admin account. The standard password reset commands either fail or don’t work as expected.

What Doesn’t Work

Before we get to the solution, here’s what you might have already tried:

Attempting to update the user password directly:

n8n users:update --email=user@example.com --password=newpassword

This fails with: command users:update not found

Trying to list users:

n8n user-management:list

This fails with: command user-management:list not found

Running reset inside the container:

n8n user-management:reset

While this appears to work (showing “Successfully reset the database to default user state”), it doesn’t actually complete the reset without a container restart.

The Working Solution

The key is to execute the reset command from your host system (not inside the container) and then restart the container. Here’s the exact process:

Step 1: Reset the User Database

From your host terminal, run:

docker exec -it n8n n8n user-management:reset

Replace n8n with your actual container name if it’s different. You can find your container name by running docker ps.

Step 2: Restart the Container

Immediately after the reset, restart your n8n container:

docker restart n8n

Again, replace n8n with your container name if needed.

Step 3: Create New Admin Credentials

Once the container restarts, open your n8n web interface in your browser. You’ll be greeted with the initial setup screen prompting you to create new admin credentials.

Simply fill in your desired email and password, and you’re back in business.

Why This Method Works

The magic happens in the combination of these steps:

  1. Executing from the host ensures the reset command properly modifies the user database with the correct permissions
  2. Restarting the container allows n8n to reinitialize and read the reset database state
  3. Fresh initialization triggers n8n to recognize it needs new admin credentials, displaying the setup wizard

Warnings You Can Ignore

During this process, you might see some warnings pop up:

Invalid timestamp warning:

Invalid timestamp value for N8N_RELEASE_DATE: $(date -u +"%Y-%m-%dT%H:%M:%SZ")

Permissions warning:

Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide.

These are cosmetic issues and won’t prevent your password reset from working. The process will complete successfully despite these messages.

Quick Reference

For future reference, here’s the complete command sequence:

# Reset user database
docker exec -it n8n n8n user-management:reset

# Restart container
docker restart n8n

# Open browser and create new admin account

That’s it! Your n8n instance is now accessible with fresh admin credentials, and you can continue automating your workflows without missing a beat.

Leave a Comment