Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Rizwan-Hasan/c93a0b0ad30debb3e8e3c9fa3313dac2 to your computer and use it in GitHub Desktop.
Save Rizwan-Hasan/c93a0b0ad30debb3e8e3c9fa3313dac2 to your computer and use it in GitHub Desktop.
# ~/.config/systemd/user/jupyter.service
[Unit]
Description=An interactive python notebook server
After=network.target

[Service]
ExecStart=/usr/bin/jupyter notebook\
    --no-browser\
    --port=8001\
    --notebook-dir=~/home/rizwan
Restart=yes
PrivateTmp=true
ProtectSystem=true

[Install]
WantedBy=multi-user.target
$ systemctl --user daemon-reload
$ systemctl start --user jupyter
$ journalctl --user -fu jupyter
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment