Keycloak: Starting Standalone Server

In this tutorial, you will learn how to download and start up a standalone Keycloak server.

For video lessons on how to secure your Spring Boot application with OAuth 2.0. and Spring Security 5, please checkout my complete video course OAuth 2.0. in Spring Boot applications.

The best place to look for a link to download Keycloak is of course its official site. For this tutorial, I will download a ZIP archive of the Keycloak standalone server.

To learn how to create a new user after the server has started, have a look at this tutorial “Keycloak: Creating a new user.”.

Starting up Keycloak Standalone Server

Once you have downloaded and unzipped Keycloak, open the terminal window and change directory to the Keycloak folder. Then,

On Linux, run:


If you are on Windows, then run:


By default, the Keycloak server will start on port 8080 and will be available at http://localhost:8080/auth/ but to access any of its web pages you will need to open the browser window.

To access the Welcome page, open the following URL in the browser window http://localhost:8080/auth/.

To access the Administration Console, open the following URL in the browser window http://localhost:8080/auth/admin/.

At the time of writing this tutorial below is how the welcome page looks like.

Keycloak Authorization Server Welcome Page

Starting Keycloak Docker Container

If you have Docker installed and prefer running Keycloak as a Docker container then below is an example of a Docker run command you can use. Note, that the following command also creates a new user with username “admin” and password “admin”. You can use a different username and password.

docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin

The above Docker command will download and run the latest version of the Keycloak server. To run a specific version of the authorization server container, simply specify an image version at the end.

docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin

For a complete list of Docker container versions, have a look at the following repository – Repository tags.

Once the server has started up, you should be able to access the Welcome page by opening the http://localhost:8080/auth/ in the browser window.

I hope this short tutorial was of some help to you. If you are interested to learn more, have a look at other Keycloak Server tutorials on this web site. There is more to learn.

Happy learning 🙋🏻‍♂️

Leave a Reply

Your email address will not be published.