How to run a Jupyter Notebook on a remote server

There are many reasons why you might want to work on a notebook that is running on a remote server. For instance, the computer in the lab has a lot of RAM, but the lab is dark and gloomy and I’d rather work in a coffeeshop on my laptop. Here is how to pull it off:

  • make an SSH tunnel
  • run the notebook with the –no-browser command

ssh username@xx.xx.xx.xx -NL 1234:localhost:1234

jupyter notebook --no-browser --port 1234

This blog post has more details.