title: Keycloak SSL setup using docker image
body: <p>I am trying to deploy keycloak using docker image (<a href="https://hub.docker.com/r/jboss/keycloak/" rel="noreferrer">https://hub.docker.com/r/jboss/keycloak/</a> version 4.5.0-Final) and facing an issue with setting up SSL.</p>
  
  <p>According to the docs </p>
  
  <blockquote>
    <p>Keycloak image allows you to specify both a
    private key and a certificate for serving HTTPS. In that case you need
    to provide two files:</p>
    
    <p><em>tls.crt</em> - a certificate <em>tls.key</em> - a private key Those files need to be
    mounted in /etc/x509/https directory. The image will automatically
    convert them into a Java keystore and reconfigure Wildfly to use it.</p>
  </blockquote>
  
  <p>I followed the given steps and provided the volume mount setting with a folder with the necessary files (tls.crt and tls.key), But I am facing issues with SSL handshake, getting </p>
  
  <p>ERR_SSL_VERSION_OR_CIPHER_MISMATCH</p>
  
  <p>error, blocking keycloak load in browser when trying to access it.</p>
  
  <p>I have used letsencrypt to generate pem files and used openssl to create .crt and .key files. 
  Also tried just openssl to create those files to narrow down issue and the behavior is same(some additional info if this should matter)</p>
  
  <p>By default, when I simply specify just the port binding <em>-p 8443:8443</em> without specifying the cert volume mount <em>/etc/x509/https</em> the keycloak server generates a self signed certificate and I don't see issue in viewing the app in browser</p>
  
  <p>I guess this might be more of a certificate creation issue than anything specific to keycloak, But, unsure how to get this to working.
  Any help is appreciated</p>