Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run Jupyter notebooks locally with password and no token?

Since update, jupyter notebook command will run jupyter with a token, by default. So that you have to open a URL like http://localhost:8889/?token=46b110632ds2f...

It is not very inconvenient, since you need to copy-paste this token from terminal. How can I run a jupyter server with a predefined password, so that I can save it in my browser and don't need to copy-paste the token from the command line?

like image 231
volodymyr Avatar asked Jun 08 '17 16:06

volodymyr


People also ask

How do I get the jupyter notebook password or token?

If a generated token doesn't work well for you, you can set a password for your notebook. jupyter notebook password will prompt you for a password, and store the hashed password in your jupyter_notebook_config. json . New in version 5.0: jupyter notebook password command is added.

How do I access jupyter notebook locally?

To launch a Jupyter notebook, open your terminal and navigate to the directory where you would like to save your notebook. Then type the command jupyter notebook and the program will instantiate a local server at localhost:8888 (or another specified port).

How do you put a password on a jupyter notebook?

Resetting your PasswordOpen your Jupyter environment. Then run "jupyter notebook password". Enter a new password when prompted.


Video Answer


1 Answers

You can from the command line run:

jupyter notebook password

The command prompt will ask you for the password and then set the hash in a JSON document in your configuration directory.

You can determine that with:

jupyter --config-dir

If you delete the file, the password will no longer work.
You may wish to set up SSL as well.

like image 57
J.Bacon Avatar answered Sep 20 '22 11:09

J.Bacon