Register Jupyter Notebook server as a service on Linux

Configure your Jupyter Notebook server to automatically start upon reboot or system crash by registering it as a service on Linux. The following instructions were adapted from this blog post and tested on Ubuntu 18.04 (should work on other versions of Ubuntu or Ubuntu derivatives).


Install Jupyter

The following command installs Jupyter Notebook on the base (default) conda environment. You can use other python environment.

conda activate base
which pip
pip install notebook==6.0.3
jupyter-notebook --generate-config

Configure Jupyter

Open the config file,

gedit ~/.jupyter/

and find/modify the following lines:

c.NotebookApp.ip = '<your IP address of choice>'
c.NotebookApp.password_required = False
c.NotebookApp.port = <your port number of choice>
c.NotebookApp.token = ''

Adjust the IP address and port number to your liking. You can set the IP address to localhost ( or internal address (such as or external address depending on the network configuration.

Create a service

Create a service file as follows:

Description=Jupyter Daemon



Modify the ExecStart, User, Group, WorkingDirectory lines. ExecStart points to the binary that runs the Jupyter Notebook server. User and Group sets the UNIX user/group to run the binary file as. WorkingDirectory sets the default directory for the Jupyter Notebook.

Install the service file with the following commands:

sudo cp jupyter.service /etc/systemd/system/
sudo systemctl enable jupyter.service
sudo systemctl daemon-reload
sudo systemctl start jupyter.service
systemctl status jupyter.service