user6882757
user6882757

Reputation:

How to host jupyter notebook on Azure(ubuntu) VM and make available across the network

I have configure Azure VM ubuntu 18.04

I need to start jupyter-notebook on the VM and has to enable across the network. Below is the procedure I have done, but jupyter-notebook is not opening

  1. jupyter notebook --generate-config

2.vim /home/Nons/.jupyter/jupyter_notebook_config.py added 2 lines

c.NotebookApp.allow_origin = '' #allow all origins

*c.NotebookApp.ip = '0.0.0.0' # listen on all IPs

3.sudo ufw allow 8888

4.jupyter-notebook password(optional)

When I started the jupyter-notebook --ip 40.xx.xx.xx Error thrown "OSError: [Errno 99] Cannot assign requested address "

When I started jupyter-notebook [W 11:43:33.495 NotebookApp] No web browser found: could not locate runnable browser.

Upvotes: 0

Views: 1248

Answers (1)

Charles Xu
Charles Xu

Reputation: 31424

If you want to connect to the notebook from another computer, or over the internet, you need to configure the notebook server to listen on all network interfaces. It's unnecessary to set the IP address with the public IP of the VM, just set it with *:

jupyter notebook --ip=*

And then create the NSG unbound rule to allow the port 8888.

Upvotes: 1

Related Questions