본문 바로가기
공부/aws

jupyter notebook/ jupyter lab 외부 리모트 서버에서 접근하기

by kyj0032 2024. 4. 29.

jupyter는 기본적으로 localhost에서만 접근 가능하다.

만약 aws EC2로 외부(remote) 서버로 jupyter notebook을 열었다면 내 local 노트북에선 접근할 수 없다.

그러므로 따로 설정을 해줘서 외부 ip로 접근가능하도록 해줘야 한다.

 

jupyter lab --generate-config
jupyter --config-dir
vi  /home/ubuntu/.jupyter/jupyter_lab_config.py
c.ServerApp.allow_origin = '*'
c.ServerApp.ip = '0.0.0.0'

jupyter_lab_config.py를 생성한 후, 그 위치를 찾아 vi 에디터로 4~5번째 줄을 추가해주면 된다.

 

 

 

https://stackoverflow.com/questions/42848130/why-i-cant-access-remote-jupyter-notebook-server/54063685#54063685

 

Why I can't access remote Jupyter Notebook server?

I have started a Jupyter Notebook server on my centos6.5 server.And jupyter is running like [I 17:40:59.649 NotebookApp] Serving notebooks from local directory: /root [I 17:40:59.649 NotebookApp] 0

stackoverflow.com