Enable SSL for JupyterHub

To secure communication on JupyterHub with SSL, follow these steps:

  1. Generate an SSL Certificate and Key: Run the following command to create an SSL certificate and private key.

openssl req \\ -newkey rsa:2048 -nodes -keyout domain.key \\ -x509 -days 365 -out jupyterhub.crt
  • domain.key: The private key file.

  • jupyterhub.crt: The SSL certificate file.

  1. Update the JupyterHub Configuration: Add the SSL certificate and key file paths to the JupyterHub configuration file.

c.JupyterHub.ssl_cert = '_usr_odp_3.2.3.2-3_jupyter_jupyterhub.crt' c.JupyterHub.ssl_key = '_usr_odp_3.2.3.2-3_jupyter_domain.key'

If using Ambari to manage JupyterHub, add these properties in the JupyterHub configuration section of the Ambari UI, as shown in the screenshot.



  1. Save and Restart JupyterHub: After updating the configuration:

    • Save the changes.

    • Restart the JupyterHub service to apply the new SSL settings.


  1. Troubleshooting SSL Disabling: If you disable SSL and restart JupyterHub but encounter browser-related issues (e.g., connection errors), clear your browser cache to resolve the problem.



  Last updated