Skip to content

Instantly share code, notes, and snippets.

@baoyunfan
Forked from whophil/jupyter.service
Created August 20, 2017 20:32
Show Gist options
  • Select an option

  • Save baoyunfan/8106c266a7864ded08d9896c9ad76c3d to your computer and use it in GitHub Desktop.

Select an option

Save baoyunfan/8106c266a7864ded08d9896c9ad76c3d to your computer and use it in GitHub Desktop.
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/usr/local/bin/jupyter notebook --no-browser --config=/home/jail/home/notebook/.jupyter/jupyter_notebook_config.py
User=notebook
Group=notebook
WorkingDirectory=/home/jail/home/notebook/workdir
Restart=always
RestartSec=10
#KillMode=mixed
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment