[Unit] Description=JupyterLab Server After=network.target Wants=oauth2-proxy-jupyter.service [Service] Type=simple User={{ jupyterlab_user }} Group={{ jupyterlab_group }} WorkingDirectory={{ jupyterlab_notebook_dir }} ExecStart={{ jupyterlab_venv_dir }}/bin/jupyter-lab \ --config=/etc/jupyterlab/jupyter_lab_config.py \ --ip=127.0.0.1 \ --port={{ jupyterlab_port }} \ --no-browser \ --notebook-dir={{ jupyterlab_notebook_dir }} Environment="PATH={{ jupyterlab_venv_dir }}/bin:/usr/local/bin:/usr/bin:/bin" Restart=on-failure RestartSec=10 # Security hardening NoNewPrivileges=true PrivateTmp=true # Logging StandardOutput=journal StandardError=journal SyslogIdentifier=jupyterlab [Install] WantedBy=multi-user.target