Skip to content

Instantly share code, notes, and snippets.

@Schm1tz1
Created May 5, 2019 08:28
Show Gist options
  • Save Schm1tz1/79cc8e77793cb264d35396a293b18142 to your computer and use it in GitHub Desktop.
Save Schm1tz1/79cc8e77793cb264d35396a293b18142 to your computer and use it in GitHub Desktop.
Jupyter Notebook as a service (example openhabian here)
#
# put this in /usr/lib/systemd/system/ folder
#
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
# Step 1 and Step 2 details are here..
# ------------------------------------
ExecStart=/home/openhabian/.local/bin/jupyter-notebook --config=/home/openhabian/.jupyter/jupyter_notebook_config.py
User=openhabian
Group=openhabian
WorkingDirectory=/home/openhabian/jupyter_notebooks
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