---
title: "Recover admin password - Rest PKI"
description: "Recovering the Admin password of an on-premises Rest PKI instance by running a SQL update that resets it, then changing it after signing in."
canonical: "https://docs.lacunasoftware.com/en-us/articles/rest-pki/on-premises/admin-recover"
locale: "en"
product: "Rest PKI (legacy)"
last_updated: "2026-07-14"
---

# Recover admin password - Rest PKI

If you lose the password for the *Admin* user, configured during the setup of your
[*on premises*](https://docs.lacunasoftware.com/en-us/articles/rest-pki/on-premises) instance of [Rest PKI](https://docs.lacunasoftware.com/en-us/articles/rest-pki), execute the following query on the
database to reset it to `Senha!01`:

```sql
update "dbo"."AspNetUsers"
set "PasswordHash"='AClrojBpn4Y/ly8qXXVkvVN67/oUsCxaMdKD7Bq0GWsLbXXVqz5a4V6g06JqIemJ3A=='
where "UserName"='Admin';
```

Once you reset the paassword, sign in on Rest PKI (user `Admin` password `Senha!01`) and, on
the top menu, click on the username (**Admin**) &gt; **Account** &gt; **Change password**.
