- Generate
~/.jupyter/jupyter_notebook_config.py
jupyter notebook --generate-config
if you log in as root , you need add --allow-root
jupyter notebook --generate-config --allow-root
- Manually generate a password
open IPython and type below code
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:xxxx'
The output is the password of NotebookApp
c.NotebookApp.password = u'sha1:xxxx'
- Modify the
jupyter_notebook_config.py
c.NotebookApp.ip='*' # you maybe set c.NotebookApp.ip='0.0.0.0' with python3.5
c.NotebookApp.password = u'xxxxxx'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 # Any free port