Forgot your Uptime Kuma password? It takes a minute to fix

Uptime Kuma ships a tool to reset the password. How to use it in Docker, why it needs a "real" terminal, and how to do the same in Portainer.

IvánPublished on Updated on October 10, 20264 minLeer en español

It happened to me recently: I wanted to set up Uptime Kuma alerts and couldn’t remember the password. That’s what you get for setting something up and not logging in for weeks. A week later the same thing happened with Portainer. So here are both.

Good news: no need to reinstall anything or lose your monitors. Uptime Kuma ships a tool to reset it.

And if you were looking for the default password: there isn’t one. Uptime Kuma asks you to create the admin user the first time you open it, so if you’ve forgotten it, resetting is the only way in.

1. Uptime Kuma in Docker

From the machine running the container:

docker exec -it uptime-kuma npm run reset-password
  • uptime-kuma is the container name. If yours is called something else, check with docker ps.
  • It asks for the new password twice. Nothing shows while you type: that’s normal.
  • It changes the password of your existing user. It doesn’t create a new one.

Then log into the web UI with your usual username and the new password.

If it’s not in Docker

Go to the folder where you installed Uptime Kuma and run:

npm run reset-password

2. If you do it from another computer over SSH

Here’s the catch. If you run the command like this:

ssh pi@192.168.1.50 docker exec -it uptime-kuma npm run reset-password

it fails with something like “the input device is not a TTY”. The tool needs an interactive terminal to ask for the password, and SSH doesn’t open one when you pass it a command directly.

The fix is to add -t to ssh:

ssh -t pi@192.168.1.50 docker exec -it uptime-kuma npm run reset-password

And if an AI assistant is helping you

I manage a good part of the Pi with an AI assistant in the terminal, and this is where it got stuck: its terminal isn’t interactive, so it can’t type the password when the tool asks. Which makes sense anyway: you should type the new password yourself, not hand it to anyone.

What I did was run the command myself. Two ways:

  • Open it in a normal terminal (on Windows, the Terminal app).
  • If your assistant allows it, run the command yourself from its own window. In Claude Code, for example, you start the line with ! and the command runs in your terminal, with a TTY.

3. Same thing, but in Portainer

Portainer doesn’t have a reset-password inside the container; it has a separate image that does the job. One important detail: stop the container first, because the tool opens the same data Portainer uses.

docker stop portainer
docker run --rm -v portainer_data:/data portainer/helper-reset-password
docker start portainer
  • portainer_data is the volume where Portainer keeps its data. If you created it with another name, check with docker inspect portainer (the Mounts section).
  • Unlike Kuma, it doesn’t ask you anything: it generates a password for the admin user and prints it. Copy it.
  • Log in with it and change it from the web UI (your user → change password), because you won’t remember the generated one.
  • --rm removes the tool’s container when it’s done. The image stays downloaded; if you don’t want to keep it, docker rmi portainer/helper-reset-password.

What if you don’t remember the username either?

Try the usual ones first (admin, your name). In Portainer, the tool resets the original admin’s password, so you don’t need to know it. In Kuma, the username is in its database, but then you’re touching sensitive data: make a copy before opening it (and if it’s SQLite, also copy the -wal and -shm files, as I explain in upgrading Kuma from 1 to 2).

What not to do

  • Delete and recreate the container thinking you’ll start fresh. The data (and the password) live in the volume, not the container, so you’re back where you started.
  • Delete the volume to start fresh. That does work, but you lose every monitor, the history and the notifications.
  • Run Portainer’s tool with Portainer running.
  • Give the new password to an assistant or paste it into a chat. Type it yourself.

Summary

  1. Kuma: docker exec -it uptime-kuma npm run reset-password.
  2. Over SSH, add -t. From an AI assistant, run it yourself.
  3. Portainer: stop the container, run portainer/helper-reset-password against its volume, and start it again.
  4. Change the generated password as soon as you log in.

So it doesn’t happen again

Keep it in a password manager. I run one at home on the same Raspberry Pi, and that’s where all my home services’ passwords go now. The password you don’t have to remember is the one you never forget.

Mini quiz

Did it stick?

Three quick questions. Each right answer is worth 10 XP.

  1. Which command resets the Uptime Kuma password in Docker?
  2. What is ssh's -t option for in this case?
  3. Why do you have to stop Portainer before running helper-reset-password?
  • #uptime-kuma
  • #portainer
  • #docker
  • #ssh
  • #passwords
Esc