By using AWS re:Post, you agree to the Terms of Use
/set up jupyter lab in AWS lightsail/

set up jupyter lab in AWS lightsail


I want to run a Jupyterlab server in AWS lightsail. I create a lightsail instance (bitnami LAMP), install anaconda, install jupyter -- everything goes well. If I edit


I can see the result in an external browser by going to


(pretending that 34.345.3.190 is my lightsail instance's IP address), so apache is working and port 80 is open. If I run

jupyter-lab --no-browser

from inside the lightsail instance (having ssh'd in), everything appears to be fine, so no problem with jupyterlab. It tells me to access jupyter at http://localhost:8888/lab

Now I go to Networking in my lightsail instance and "add a rule" choosing Custom, TCP, 8888 to open the 8888 port, but this is where things go wrong.


gives me "unable to connect" in my external browser.

If I run

ss -tuln | grep 8888

I get

tcp   LISTEN 0      128                 *

If I run

sudo nmap -sT -O localhost

I get

22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
3306/tcp open  mysql
8888/tcp open  sun-answerbook
Device type: general purpose

If I run

netstat -antop | grep 8888

I get

tcp        0      0*               LISTEN      6911/python3.9       off (0.00/0/0)

This sounds relevant, but it's EC2 specific and I couldn't get it to work in lightsail:

asked a month ago20 views
1 Answers

Jupyter needs additional configuration in order to receive connections from origins other than localhost. Have you tried the solution described here?

answered a month ago
  • Thank you! Let me try. I'll report back.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions