Cloud and Self-Hosting

KeyCloak Docker Installation

This guide will help you to install keycloack on Ubuntu Server Step 1 : Install Ubuntu Server & Update sudo apt-get update && sudo apt-get.....

By Amjid Ali · · Updated · 1 min read

KeyCloak Docker Installation: SyncBricks cover
In this article
  1. Step 1 : Install Ubuntu Server & Update
  2. Step 2 : Install docker on Ubuntu Server
  3. Step 3 : Install JDK on Ubuntu Server
  4. Check that Java in installed for this you must use the java version
  5. Pull keyclock image using below command
  6. Restart the Container that was created
  7. Access the Server with port 8080

This guide will help you to install keycloack on Ubuntu Server

Step 1 : Install Ubuntu Server & Update

sudo apt-get update && sudo apt-get upgrade

Step 2 : Install docker on Ubuntu Server

sudo apt install docker

Step 3 : Install JDK on Ubuntu Server

Update the Repository for Open JDK

sudo add-apt-repository ppa:openjdk-r/ppa

Update the Repository

sudo apt-get update

Now install the app

sudo apt install openjdk-14-jdk

Check that Java in installed for this you must use the java version

java -version 

Pull keyclock image using below command

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

Restart the Container that was created

docker restart <CONTAINER>

Access the Server with port 8080

Open Web Browser and access the port with port 8080 for example

https://keycloack.syncbricks.com:8080

Taking Backup of Container

sudo docker commit -p f511d78a5c21 my-backup

extract the backup file

sudo docker save -o ~/my-backup.tar my-backup