Back to TresekoView full library

Reset administrator

How to recover access when the local administrator password is lost.

Practical guide

1 guide found

All guides

Reset administrator

How to recover access when the local administrator password is lost.

Open guide
Reading
5 min
Updated
2026-07-12
Version
1.0.6

When to use this guide

Use it when no one can log in with the local admin user or when the temporary password from the first login was lost before saving it.

Expected result

The local admin receives a new temporary password, logs in again and Treseko prompts a password change on the next login.

Treseko does not document a fixed password for the administrator. On a clean installation, `admin@qa.local` is created and the installer prints a temporary password only once.

If that password is lost, the correct recovery is to run the reset script inside the backend. The script generates a new temporary password and avoids leaving secrets written in documentation.

After the reset, review open sessions, admin users and audit logs. Recovering access should not become a permanent backdoor without oversight.

Recommended flow

  1. Access the server where Treseko runs.
  2. Verify that the backend container exists and can connect to the database.
  3. Run reset_user_password.py for the admin email.
  4. Save the temporary password in a secure channel.
  5. Log in through the UI and change the password.
  6. Review users with the ADMIN role.

Reset in Docker Compose

docker compose -f docker-compose.prod.yml --env-file compose.production.env run --rm --entrypoint python backend /app/reset_user_password.py --email admin@qa.local

Verify services

docker compose -f docker-compose.prod.yml ps
docker compose -f docker-compose.prod.yml logs --tail=80 backend

How to verify

  • The command prints a new temporary password.
  • Login with admin@qa.local works.
  • The UI requires a password change if applicable.
  • The temporary password was not copied into issues, public chats or versioned files.

Common pitfalls

  • Running the reset against the wrong database and thinking it did not work.
  • Sharing the temporary password through insecure channels.
  • Leaving multiple ADMIN users unnecessarily after recovering access.
adminpasswordrecoverydockersecurity