Bootstrap-admin acc not recognized with external db

Hey!

im fighting a loong fight with keycloak. I have tried helm version, then standard kubernetes deployment one and back to helm version.

I have a problem with keycloak. When i try to run it without connecting external db its respecting env variable for temporary admin and i can log in just fine.

But when im adding an external db - google cloud postgres, its connecting and everything, but i cant use temp admin acc anymore, its not recognizing any user described in env or startup command. No matter of the form of command. Tried all i have found in the net and i just cant log in :frowning: there is some default “user” in db but cant find out what the password is for that account, also tried many different ones and still in logs i can see that its a wrong password.

Im honestly out of options and pretty frustrated. In my company keycloak must be sitting in cluster and with external google cloud db, it cant be any other way. So i need some help/advice why after connecting external db its forgetting/not respecting bootstrap temp admin and what can i do in this situation :frowning:

Hi @Przemoo :wave:

If you are on Keycloak 26, it might be because the master realm has already been created. Try switching to version 25.0.6, and using these in your startup:

KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin

Don’t forget to immediately delete this admin when you are able to log in, so that potential bad actors cannot access your admin console using these credentials.