Install & Run Keycloak Docker Image in Dev Mode

Install & Run Keycloak Docker Image in Dev Mode

June 2024

In this quick one step tutorial we will install and run the Keycloak Docker image in dev mode. The official Keycloak Docker Image docs can be found here: https://www.keycloak.org/getting-started/getting-started-docker

Be sure to have docker installed before you follow this tutorial otherwise it will not work at all. You can find our tutorial on installing Docker on Ubuntu here: https://phoenixignited.tech/install-docker-on-ubuntu/ We intend to create many more keycloak tutorials so check back often!

Run the Official Keycloak Docker Image

In the only step of this tutorial we will run the official Keycloak Docker Image via: 

							
							
					docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:25.0.1 start-dev				
			

This will run keycloak on port 8080, you must run this on a local machine or on a local network otherwise you will not be able to log into the admin keycloak realm. If you setup SSL certificates more at: https://www.keycloak.org/server/enabletls then you should be able to run this in dev mode on a remote server. -e KEYCLOAK_ADMIN declares the admin username, feel free to modify as desired and -e KEYCLOAK_ADMIN_PASSWORD declares the admin password, also feel free to change to whatever you want. As we are running this in dev mode and on a local machine though we won’t bother with changing the decfault credentials. 

After we run the docker image you should see the keycloak login screen shown below.

That’s it, we have successfully ran keycloak in a docker container, this is the first in a series of keycloak tutorials, so stay tuned! You can find more info at https://www.keycloak.org/.

Walter Miely is a tech entrepreneur and CEO of Phoenix Ignited Tech You can find him on Linkedin. This material is licensed under the CC BY 4.0 License LEGAL DISCLAIMER: The content provided here is provided AS IS, and part of, or the entirety of this content may be incorrect. Please read the entireLegal Disclaimer here.