How to run Jupyter lab in browser through AWS EC2 instance?

Viewed 980

I need help using up my EC2 instance, I am new to this. So, I have Ubuntu 18.04 LTS EC2 instance created and Jupyter lab installed in it, but, I cant run it since I can not launch the browser through my instace. I tried launching firefox, it says: No DISPLAY variable found. Is there a way to do this.

PS: I am loging in to Ubuntu instance from my Windows 10 PC using PuTTY.

Thanks in advance!

1 Answers

A common way to run notebook on an instance involves three steps:

  1. Launch your notebook in tmux, screen, nohup or any other way persisting it after you logout from the instance.
  2. Setup ssh tunnel from your local machine to the instance to securely forward connections to the notebook.
  3. Access the notebook on your local workstation using browser and localhost (not IP of your instance).

There are number of resources showing more details how to set it up. Some examples:

Related