Skip to content

Instantly share code, notes, and snippets.

@MiXaiLL76
Forked from whophil/jupyter.service
Last active June 12, 2020 08:10
Show Gist options
  • Save MiXaiLL76/18f4d64963447ec46d0d0ecb73430f5e to your computer and use it in GitHub Desktop.
Save MiXaiLL76/18f4d64963447ec46d0d0ecb73430f5e to your computer and use it in GitHub Desktop.
A systemd script for running a Jupyter notebook server.
# Setting up a Jupyter Lab remote server raspberry
[Unit]
Description=Jupyter Lab
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/pi/.local/bin/jupyter-lab --config=/home/pi/.jupyter/jupyter_notebook_config.py
User=pi
Group=pi
WorkingDirectory=/home/pi/
Restart=always
RestartSec=10
#KillMode=mixed
[Install]
WantedBy=multi-user.target
@MiXaiLL76
Copy link
Author

service for ubuntu

# Setting up a Jupyter Lab remote server raspberry

[Unit]
Description=Jupyter Lab

[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/ubuntu/.local/bin/jupyter-lab --config=/home/ubuntu/.jupyter/jupyter_notebook_config.py
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/
Restart=always
RestartSec=10
#KillMode=mixed

[Install]
WantedBy=multi-user.target

@MiXaiLL76
Copy link
Author

Setting up a Jupyter Lab remote root ubuntu server

/etc/systemd/system/jupyter.service

[Unit]
Description=Jupyter Lab

[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/usr/local/bin/jupyter-lab --config=/root/.jupyter/jupyter_notebook_config.py --allow-root
User=root
Group=root
WorkingDirectory=/root
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