Exposing python jupyter on LAN

PythonLinuxPython 3.xUbuntu 14.04Jupyter

Python Problem Overview


I've installed jupyter on local network LAN but im unable to access http://<IP>:8888 from another macine on LAN. I've opened ports 8888 and port range 49152 to 65535 with iptables (this range is specified at http://jupyter-notebook.readthedocs.io/en/latest/public_server.html)

This guide http://jupyter-notebook.readthedocs.io/en/latest/public_server.html describes exposing a notebook publicly but I'm just attempting to share over LAN.

Have I missed a step ?

Python Solutions


Solution 1 - Python

Try jupyter notebook --ip <your_LAN_ip> --port 8888 Then visit http://your_LAN_ip:8888 from another computer.

It's recommended that you use a password when accessing your notebook server. To set up a password, just run jupyter notebook password. To make it even more secure, you can use SSL for your server by passing the arguments --certfile and --keyfile to jupyter notebook. You can read more about setting that up here.

Solution 2 - Python

In macOS, the following worked for me

###0. Generate configure file using jupyter notebook --generate-config ###1. Set in configure file and add

c.NotebookApp.ip = '0.0.0.0' # listen on all IPs
c.NotebookApp.token = ''     # disable authentication
c.NotebookApp.allow_origin = '*' # allow access from anywhere
c.NotebookApp.disable_check_xsrf = True # allow cross-site requests

###2. Run:

jupyter notebook --ip <your_LAN_ip> --port 8888

Solution 3 - Python

It's also possible to add the IP/host in the configuration file in the c.NotebookApp.ip = '<your_ip_or_hostname>' and c.NotebookApp.port = 8888 parameters.

If you don't have a jupyter configuration file yet run jupyter notebook --generate-config

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionblue-skyView Question on Stackoverflow
Solution 1 - Pythonperfect5thView Answer on Stackoverflow
Solution 2 - Python未来陆家嘴顶尖的投资人View Answer on Stackoverflow
Solution 3 - PythonchjortlundView Answer on Stackoverflow