Jupyter Notebook on Boot Automatically

Issue
After making the file to create a system service for jupyter notebook running on CentOS so as to start jupyter server automatically during system start up, the service successfully loaded but systemctl status jupyter shown: Active: fail.

Solution
Be sure that jupyter-notebook is used instead of jupyter notebook, i.e.
ExecStart=/[pathOfTheBinary]/jupyter-notebook
or else it should be bracketed with quotation marks to ensure the space between jupyter and notebook is allowed.

Tricks

  • Be sure that the path of the jupyter binary is correct
  • Most of the info. on the web suggesting the content of jupyter.service file missed the fact that jupyter notebook is recommended to be run by non-root user, and it's imperative that the location of jupyter configuration file must be specified in the jupyter.service file and not just the User=[jupyterUser] directive.

Config

  • CentOS: 7-6
  • jupyter: Anaconda3-5

Leave a Reply

Close Menu