$ mkcert --install # to generate and install your root ca
$ mkcert myserver.local # to generate certificate
Then to enable https in jupyter use this snipped (it assumes your pem and key.pem files are in ~/.jupyter)
from pathlib import Path
c.NotebookApp.keyfile, c.NotebookApp.certfile = sorted(map(str,Path.home().glob('.jupyter/*.pem')))