Create a plist
file in your user directory. In the following change USERNAME to your own.
/Users/USERNAME/Library/LaunchAgents/local.jupyter.notebook.plist
With this content:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>local.jupyter.notebook</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/jupyter</string>
<string>notebook</string>
<string>--ip=0.0.0.0</string>
<string>--port=8888</string>
<string>--no-browser</string>
<string>--notebook-dir=/Users/USERNAME/</string>
<string>--config=/Users/USERNAME/.jupyter/jupyter_notebook_config.py</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/USERNAME/.jupyter/jupyter.log</string>
<key>StandardErrorPath</key>
<string>/Users/USERNAME/.jupyter/jupyter.log</string>
</dict>
</plist>
now go to that directory and load / start the daemon:
launchctl load local.jupyter.notebook.plist
launchctl start local.jupyter.notebook.plist
The notebook will be running now and also after boot. you can also stop or unload the service:
launchctl stop local.jupyter.notebook.plist
launchctl unload local.jupyter.notebook.plist
if you remove plist file and the daemon ist still running, you can remove it by:
launchctl remove local.jupyter.notebook.plist