In this short blog post, I will explain a great trick to expose various services like Jupyter-notebook, tensorboard, etc. to the entire internet. We generally use it at Nayan
Before following the steps I want you to understand some fundamentals behind the hosting of different services.
Whenever we host some services on a local server having URLs like (https://localhost:8888 or http://127.0.0.1:8888) they are behind a NAT or firewall of our computer(Most of the hackers work to breach these).
To jump over the firewall, we will use ngrok.
Ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on.
something like this:
First, we need to install tmux for running processes(jupyter in our case) in background and jupyter notebook.
2) Download ngrok using
3) Unzip to install ngrok
4) Create an account on ngrok and get authtoken.
1 ./ngrok authtoken <your_auth_token>
Now on tmux we will run jupyter-notebook
jupyter-notebook --ip=0.0.0.0 --allow-root ```
Host the noted port using ngrok. For my case it is 8890
./ngrok http 8890
Also, you can make a config file and can host multiple ports using the same account as mentioned here.
- Now note the URL you got on ngrok screen.
- Cheers and now hit the URL as many times as you can to access your favorite jupyter notebook.
In this cool blogpost, we understood to host jupyter notebook on the local machine. We can host other services like tensorboard or anything you want.