Keycloak 20.0.2 installation in ubuntu as service

Hi,
i am trying to install a new keycloak version 20.0.2, can anyone suggest me few things like,

  1. How to create a keycloak.service file,
  2. How to run keycloak frontend as well as admin console from desired url
    because for local host everything is working, now i want to install the same in ubuntu server,
    Can you please help me with this.
    Thank you,
    P.Phani,
    lakshmiganaputrevu@gmail.com
    7901495635

Hi,
I have also run into the same issue and have found on the net one solution.
However, the starting of keycloak has changed for the version I’m using (keycloak-21.0.1), so I have altered the keycloak.service file to that:

[Unit]
Description=The Keycloak Server
After=syslog.target network.target
Before=apache2.service

[Service]
User=keycloak
Group=keycloak
LimitNOFILE=102642
PIDFile=/var/run/keycloak/keycloak.pid
ExecStart=/opt/keycloak/bin/kc.sh start --optimized
StandardOutput=null

[Install]
WantedBy=multi-user.target

I have also put all my starting parameters inside the conf/keycloak.conf file.

This answer is a bit late, but I hope, if this didn’t help you, that it will help somebody.

regards
Andrija