I am trying to run a Jupyter Notebook in the background. I found this question that included the command
jupyter notebook &> /dev/null &
which worked on my local machine. However, I have two problems:
I need a token in order to be able to access my notebooks in a browser window. However, with the above command, there is no output into the Terminal window except for the process ID, and therefore I could not access my notebooks.
I also need to run the notebook in the background on a remote machine. I
ssh
into the remote machine, and then runjupyter notebook --no-browser
. However, once I close my laptop, the notebook process is killed in my local Terminal window, as well as thessh
.
I was able to crudely circumvent the above problems by running the normal
jupyter notebook --no-browser
in the remote server, and then killing the ssh
to the remote server. My question boils down to the following two sub-questions:
Is there any way of doing this besides closing the
ssh
? I guess this isn't really the biggest problem, but it seems very hacky to simply kill the ssh instead of some more elegant or more effective solution.How would I achieve the same thing on my local machine? I need to run the Jupyter Notebook in the background while also somehow getting the output. Can I direct the output into another file or read it somewhere else?