Server Setup For Jupyter Notebook
Server Setup For Jupyter Notebook
After Ec2 instance is created we get “pem” file and ssh command:
Example:
ssh -i "roopa.pem" [email protected]
Type “Terminal” and press Enter to find and launch the Terminal shortcut and click on Terminal.
You can get the terminal window like this
Press Enter to navigate to that folder , you can see like this
Press Enter
If you get error like this in your terminal like this:
1. Create jupyter config file by running this command in terminal in home directory
Automatically a folder will be created in home directory with name ~/.jupyter/
After running this command answer basic questions and press enter:
Now we can see two files in certs folder by using “ ls ” command → mycert.pem , mykey.key
4. Configure jupyter:
To configure jupyter notebooks we have to include certificates files in jupyter config file
by following commands :
1. First move into jupyter directory - cd ~/.jupyter/
2. To edit jupyter config file use -
vi jupyter_notebook_config.py (or) vim
jupyter_notebook_config.py
Now we can see an attention msg:
● Please type “E” and press Enter , you can see jupyter_notebook_config.py file content.
● To insert something in file please press “i” in keyboard
c = get_config()
# Kernel config
# Notebook config
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.password =
u'sha1:98ff0e580111:12798c72623a6eecd54b51c006b1050f0ac1a62d' #the encrypted
password we generated above
# Set the port to 8888, the port we set up in the AWS EC2 set-up
c.NotebookApp.port = 8888
● To save the file press “Esc” and then type :wq then press “Enter”
(OR)
tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach
them (they keep running in the background) and reattach them to a different terminal.
You can refer this document to understand tmux and to learn some commands:
https://phoenixnap.com/kb/tmux-tutorial-install-commands
Instead of session_name, type the name you want assigned to the session.
● Your screen will change and display a status bar at the bottom. In the lower-left, you’ll see the
● In the lower-right, the date and time are displayed. Just beside the date and time, you’ll see the
Now you can see your jupyter server started with https:
Accessing Jupyter Notebook In Browsers
ssh -i "roopa.pem" [email protected]
● You find ip address in ssh command, Here it is highlighted in blue color: 52.39.239.66
● Port : The port with which jupyter notebook opened , You can find port number in above image
which underline with yellow line : 8888
Note: You can’t access the jupyter notebook by http link because we encrypted the jupyter server with the
certificates.
When you access the https link in chrome, jupyter notebook login page will be opened:
Enter Password which you set before: