"You need local access to create the initial admin user. "

Were these variables created before starting up Keycloak?
If yes it should have worked.

Also look into this discussion to see if this helps
Keycloak 17 impossible to create initial admin user - Configuring the server - Keycloak

1 Like