How do I open a remote jupyter notebook with IJulia

I frequently log into remote servers to work on large data sets. I usually run jupyter --no-browser --port=xxx on the server and forward the port to my local machine. In this mode, jupyter replies with the address where it starts and the token that I need to connect to the server.

When starting the notebook() after installing a new kernel with those command line arguments, it doesn’t tell me the port, though. Is there a way to get this information from within the REPL?

If you need to set the port or use the --no-browser option, you should run jupyter yourself, not via the IJulia.notebook() function (which is just a convenience wrapper around running jupyter — it’s not doing anything special).

(I think the default port used by jupyter is 8998, however. So you can normally just do ssh -L 8778:localhost:8998 someremotehost.com, run jupyter notebook --no-browser on the remote host, and then visit localhost:8778 in the browser on your local host.)

4 Likes

Right, OK, thanks for confirming.