Suppress SSL Warning on Internal Offline Instance (original) (raw)

Hi Folks!

I’ve set up a TLJH JupyterHub instance for our school lab. It is offline with no connection to the public Internet.

The JupyterHub login screen has a message about the importance of setting up SSL. Since we’re offline and can’t do that, I’d like to suppress the message.

The documentation points out that:

To achieve this, remove c.JupyterHub.ssl_key and c.JupyterHub.ssl_cert from your configuration (setting them to None or an empty string does not have the same effect, and will result in an error).

The thing is, I’ve checked the /opt/TLJH/config folder and the config.yaml only has the admin user definition. The jupyterhub_config.d and traefik_config.d folders are both empty. I’ve checked the jupyterub_config.py that’s part of the default TLJH installation.

tljh-config show returns the contents of the YAML file as expected.

Nowhere are the ssl_cert or ssl_key parameters set.

I’m at a loss for how to implement the instructions to suppress the SSL warning.

What am I missing?

Thanks!

Paul2708 April 22, 2025, 6:49am 2

If your goal is to suppress the warning without actually serving JupyterHub via SSL, you can modify the template login.html via JupyterHub configuration.

minrk April 23, 2025, 8:30am 3

that’s right. Specifically, hide the #insecure-login-warning element:

{% extends "templates/login.html" %}
{% block stylesheet %}
{{ super() }}
<style type="text/css">
#insecure-login-warning {
  display: none;
}
</style>
{% endblock stylesheet %}

Hi Folks!
I appreciate the advice. i’ll test that.
More broadly, I am a bit unclear about the recommended method to configure TLJH.

I understand that there is a command line utility but, I’m a bit old school and used to editing text files directly in /etc for server processes.

I see a .d folder to hold configuration parameters, but it’s currently empty on my fresh install of TLJH.

Does the command line utility persist configuration settings by writing files to that folder, or is there some other persistence mechanism?

I’m having trouble locating the appropriate documentation…

Thanks again!
alohawear