access JupyterLab outside of localhost

2,854 views
Skip to first unread message

Alex Krok

unread,
Nov 3, 2017, 4:07:19 PM11/3/17
to Project Jupyter
Hi Jupyter community,
I need help to configure my jupyterlab installation so I can access it outside of server
I have completed jupyterlab installation on Ubuntu 16.04.3 LTS using pip3 /python3 very recently, few day sago.
after I start jupyterlab with $jupyter lab 
it starts with no errors, and gives token
I can connect to server locally , ie with localhost
but not externally , ie outside of server using server public static IP 
when I request connection externally  on my laptop chrome web browser, ex with : http://123.45.67.89:8888 
I am getting error message is : 
This site can’t be reached
123.45.67.89 refused to connect

The question is how do I configure jupyterlab to be accessible outside of localhost? ie  http://123.45.67.89:8888
Thanks in advance
Alex

Robert Schroll

unread,
Nov 3, 2017, 4:26:08 PM11/3/17
to jup...@googlegroups.com, Project Jupyter
You need to configure your Jupyter server to listen to connections from all IPs, not just localhost.  One way to do this is to edit your ~/.jupyter/jupyter_notebook_config.py file (on the server) to include
    c = get_config()
    c.NotebookApp.ip = '*'

Note that this means anyone can access your server, so you may want to add password protection and SSL support.  More information is available here: http://jupyter-notebook.readthedocs.io/en/stable/public_server.html

Robert

Alex Krok

unread,
Nov 3, 2017, 6:22:48 PM11/3/17
to Project Jupyter
Bob, please forgive my ignorant question I m very new to ubuntu(. if I install jupyter with sudo account where is ~/.jupyter folder?

Alex Krok

unread,
Nov 3, 2017, 6:38:19 PM11/3/17
to Project Jupyter
when I do ~$ cd ~/.jupyter
-bash: cd: /home/fincad/.jupyter: No such file or directory

Alex Krok

unread,
Nov 3, 2017, 7:14:55 PM11/3/17
to Project Jupyter
Bob, never mind my last question, google help to find .jupyter folder. it actually did not exist and I had to create it
your suggestion for ~/.jupyter/jupyter_notebook_config.py worked! Thanks a lot

Matthias Bussonnier

unread,
Nov 6, 2017, 1:52:10 PM11/6/17
to jup...@googlegroups.com
Hi Alex,

Happy you solved your problem, I may be wrong but the ~/.jupyter
folder should have been created on startup I believe.

> if I install jupyter with sudo account where is ~/.jupyter folder?

Just as an advice, usually pip-installed packages should not be
installed with sudo or they may conflict with system software later
on. Usually you should be able to use `pip install --user` (and most
other commands will also have a --user option) to install software
only for your user.

As Robert said, we strongly advise users to setup a password and an
ssl certificate.

Enjoy,
--
Matthias
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/4e849c9f-6b96-4ca9-9e3d-a5ccc2edc4d4%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages