You can make a configuration to all options in a file, generated by command jupyter notebook --generate-config
.
This will produce a file with all configurations explained and commented out in the file ~/.jupyter/jupyter_notebook_config.py
.
vi jupyter_notebook_config.py
to access and edit
In this file you can un-comment:
## Allow password to be changed at login for the notebook server.
#
# While loggin in with a token, the notebook server UI will give the opportunity
# to the user to enter a new password at the same time that will replace the
# token login mechanism.
#
# This can be set to false to prevent changing password from the UI/API.
c.NotebookApp.allow_password_change = True
and set some starting or no token with
## Token used for authenticating first-time connections to the server.
#
# When no password is enabled, the default is to generate a new, random token.
#
# Setting to an empty string disables authentication altogether, which is NOT
# RECOMMENDED.
c.NotebookApp.token = ''
For a simple single password: In the jupyter_notebook_config.py:
# my notebooks settings
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 5000
# setting up the password
from IPython.lib import passwd
password = passwd("your_secret_password")
c.NotebookApp.password = password
See also here in the docs:https: