Running Jupyter Notebook on a remote server

With a command-line interface to the server, it is often hard to quickly scan through the contents on a server. This can be circumvented using jupyter-lab (or jupyter notebook) running on the server and accessing it using a client machine. I presume you have already installed jupyter-lab (or jupyter-notebook) on server. Jupyter-lab is a better option as it comes with a file-navigator, spread-sheet viewer (faster than excell, reminds me of sublime text) and an image-viewer. Check out this video for the latest feature updates in jupyter-lab.

  1. Run this command on the server-terminal:jupyter-lab --ip=0.0.0.0 --no-browserThe command above will start jupyter-lab on the default port 8888 of server and you will be presented with a link on your terminal which looks simillar this:http://0.0.0.0:8888/?token=38a730e566a33ae50ba914942ba523c93c9501dd1542e56f
  2. Replace 0.0.0.0 with the IP of the server (XXX.XXX.XXX.XXX) and paste the modified link on the client-browser.Replace jupyter-lab with jupyter-notebook for running notebook instead of lab.
  3. If you want to specify the port on which jupyter-lab is running, use this command:jupyter-lab --ip=0.0.0.0 --no-browser --port=6767 and the link now will become:​​​http://0.0.0.0:6767/?token=38a730e566a33ae50ba914942ba523c93c9501dd1542e56f

 

 

Additional settings for AWS

For AWS you will have to let client access the server-IP by setting an additional inbound rule: In AWS panel go to Network & Security > Security Groups  and create a security group. This security group has to be attached to EC2 instance you are running. Check out these links below for more info:

https://serverfault.com/questions/37088/how-to-add-a-security-group-to-a-running-ec2-instance/565852#565852

https://www.youtube.com/watch?v=4YLNKMTfdYo

Additional Resources

https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s