The docs describe how to create a password to protect your jupyter notebooks. I would like to be able to create and share a particular notebook with a special password for just that notebook. Is this possible?
No, it is not possible. The password protects the whole Jupyter server. Once somebody has logged into the server, there’s nothing that could stop them from accessing all of the notebooks stored in the file system.
I needed to share password prtected notebook recently and after some research I found 3 ways to do it (and even wrote an article on how to share password protected Jupyter notebook).
First two options are for static notebook (converted to HTML) and third option is for sharing interactive notebook.
There are hosting platforms like Vercel or Netlify that can add password protection to static website. You need to convert notebook to HTML file, change the name to
index.html and upload to such hosting provider. It might require paid plan.
There is a staticrypt library that can encrypt HTML file with your password.
You can share encrypted HTML file on GitHub Pages or AWS S3. You will have one password for all users.
There is an open-source framework Mercury that can convert Jupyter Notebook to interactive web application. It is using YAML header to add widgets to the notebook. The YAML header has a
share option, that can be used to specify with whom notebook is shared (you can read more in Mercury’s documentation).
Example YAML header:
title: Some title description: Some app description share: private params: input: text label: Please enter text
Authentication is a paid feature in Mercury, so you will need a commercial license for this.