Generate Cookie Secret
Encrypt your lab's cookie for security purposes:
sudo -iCreate a new directory for the cookie secret:
mkdir /srv/jupyterhubGenerate a random number and save it as the cookie secret:
openssl rand -hex 32 > /srv/jupyterhub/jupyterhub_cookie_secretEdit JupyterHub's configuration file:
nano /etc/jupyterhub/jupyterhub_config.pyCopy the following and add it to the file:
c.JupyterHub.cookie_secret_file = '/srv/jupyterhub/jupyterhub_cookie_secret'Use CTRL+O then enter to overwrite the document and CTRL+X to exit.
Ensure that only the system administrator can read and write the cookie secret:
chmod 600 /srv/jupyterhub/jupyterhub_cookie_secretRestart to ensure recognition of the new extension:
systemctl restart jupyterhub.serviceLast updated