Skip to content

Commit

Permalink
Merge pull request jupyter#3346 from whosford/notebook-public-server-…
Browse files Browse the repository at this point in the history
…docs-change

Add more information for where jupyter_notebook_config.py is located
  • Loading branch information
minrk authored Feb 27, 2018
2 parents b66a60d + e67d66e commit a1fb317
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions docs/source/public_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,30 @@ This document describes how you can
Securing a notebook server
--------------------------

You can protect your notebook server with a simple single password by
configuring the :attr:`NotebookApp.password` setting in
:file:`jupyter_notebook_config.py`.
You can protect your notebook server with a simple single password. As of notebook
5.0 this can be done automatically. To set up a password manually you can configure the
:attr:`NotebookApp.password` setting in :file:`jupyter_notebook_config.py`.


Prerequisite: A notebook configuration file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check to see if you have a notebook configuration file,
:file:`jupyter_notebook_config.py`. The default location for this file
is your Jupyter folder in your home directory, ``~/.jupyter``.
is your Jupyter folder located in your home directory:

- Windows: :file:`C:\\Users\\USERNAME\\.jupyter\\jupyter_notebook_config.py`
- OS X: :file:`/Users/USERNAME/.jupyter/jupyter_notebook_config.py`
- Linux: :file:`/home/USERNAME/.jupyter/jupyter_notebook_config.py`

If you don't already have one, create a config file for the notebook
using the following command::
If you don't already have a Jupyter folder, or if your Jupyter folder doesn't contain
a notebook configuration file, run the following command::

$ jupyter notebook --generate-config

This command will create the Jupyter folder if necessary, and create notebook
configuration file, :file:`jupyter_notebook_config.py`, in this folder.


Automatic Password setup
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -132,9 +140,9 @@ directory, ``~/.jupyter``, e.g.::
c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'

Automatic password setup will store the hash in ``jupyter_notebook_config.json``
while this method store in in ``jupyter_notebook_config.py``. The ``.json``
while this method stores the hash in ``jupyter_notebook_config.py``. The ``.json``
configuration options take precedence over the ``.py`` one, thus the manual
password may not take effect if the Json file as a password set.
password may not take effect if the Json file has a password set.


Using SSL for encrypted communication
Expand Down

0 comments on commit a1fb317

Please sign in to comment.