# Potential Admin Console Lockout for Bootstrap Admin on Keycloak 26

**URL:** <https://forum.keycloak.org/t/potential-admin-console-lockout-for-bootstrap-admin-on-keycloak-26/29609>\
**Category:** Configuring the server\
**Created:** [February 17, 2025, 9:09am UTC](https://forum.keycloak.org/t/potential-admin-console-lockout-for-bootstrap-admin-on-keycloak-26/29609 "2025-02-17T09:09:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leretap265](https://avatars.discourse-cdn.com/v4/letter/l/eb8c5e/32.png) [@leretap265](https://forum.keycloak.org/u/leretap265)\
**Post date:** [February 17, 2025, 9:09am UTC](https://forum.keycloak.org/t/potential-admin-console-lockout-for-bootstrap-admin-on-keycloak-26/29609/1 "2025-02-17T09:09:41Z")

</div>

I just noticed that when using Keycloak version `26`, I am only able to create the bootstrap admin on initial startup (i.e. when the `master` realm does not exist).

For security, we routinely wipe the entire admin accounts in the `master` realm (by performing a cascading delete on PostgreSQL). But the problem is that the admin credentials are not recreated on startup (bootstrap or otherwise), leading to an admin console lockout.

We actually had to downgrade to version `25.0.6`, and are using this in the configuration:

```auto
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD}

```

**Potential Solution:**

1. The admin bootstrap also works when there are no admin accounts (not just when the `master` realm is initially created).
2. An additional configuration option `KC_BOOTSTRAP_ADMIN_EXPIRY`, which sets when the admin credentials automatically get deleted (instead of having to do it manually). It could have a default of 1 hour.

I would appreciate feedback on this, thank you.
