Reset Admin Password

In case you have forgotten the root admin password, you can reset it by removing all users, organisation and invites from the SQLite database.

The guide mainly covers the following:

  • Exec into the query-service container
  • Remove all users, organisation and invites using SQLite shell
  • Restart the query-service container

Exec into query-service Container

Docker Standalone

docker exec -it signoz-query-service sh

Docker Swarm

docker exec -it $(docker ps -q -f name=signoz_query-service) sh
Info

Replace signoz with your Docker stack name.

Kubernetes

kubectl -n platform exec -it pod/my-release-signoz-query-service-0 -- sh
Info

Replace my-release with your Helm release name. And platform with your SigNoz namespace.

Steps to Remove All Users, Organisation and Invites

Step 1: Install SQLite and Connect to the Database File

apk update
apk add sqlite

sqlite3 /var/lib/signoz/signoz.db

Step 2: Remove All Users and Organisation

In the sqlite shell, run the following commands:

select * from users;
select * from organizations;
select * from invites;

delete from users;
delete from organizations;
delete from invites;

Step 3: Verify the Users, Organisation and Invites are Removed

select * from users;

select * from organizations;

select * from invites;

Step 4: Exit from SQLite Shell and Container Shell

To exit from the sqlite shell, press CTRL + D and then exit from the query-service container.

Step 5: Restart the signoz-query-service Container

To restart the query-service container, run the following command:

For Docker Users

docker restart signoz-query-service

For Docker Swarm Users

docker service update --force signoz_query-service

For Kubernetes Users

kubectl -n platform rollout restart statefulset/my-release-signoz-query-service

Now, you should be able to create a new admin account from SigNoz UI: http://localhost:3301.

Reset Admin Password

Was this page helpful?