If you want to run the server against a local development Vite server, you'll have to pass the `--admin-dev` or `--account-dev` flag:
```sh
pnpm start --admin-dev
pnpm start --account-dev
```
The above commands will download the [Nightly version](https://github.com/keycloak/keycloak/releases/tag/nightly) of the Keycloak server and run it locally on port `8080`. If a previously downloaded version was found in the `server/` directory then that one will be used instead. If you want to download the latest Nightly version you can remove the server directory before running the command to start the server:
```sh
pnpm delete-server
```
Or if you just want to clear the data so you can start fresh without downloading the server again:
If you want to run Keycloak standalone (without the script) against the Vite development server, you can set the following environment variables to achieve the same result:
In order for the development version of the Admin UI to work you will have to import a custom client to the Keycloak server. This is only required during development as the development server for the Admin UI runs on a different port. This client will be imported automatically under the name `security-admin-console-v2` when the Keycloak server starts.
This client only allows redirects from/to "localhost:8080" so be sure either modify the client json in `./scripts` or only attempt to authenticate and redirect from that address