Prerequisites
- A running LightYear GPU server
- Python 3.10+ installed
- Port 8888 open in your firewall group
Step 1 — Install Jupyter
>_BASH
$pip3 install jupyterlabStep 2 — Generate a Config File
>_BASH
$jupyter lab --generate-configStep 3 — Set a Password
>_BASH
$jupyter lab password$# Enter and confirm a passwordStep 4 — Configure Remote Access
Edit ~/.jupyter/jupyter_lab_config.py:
PYTHON
c.ServerApp.ip = '0.0.0.0'
c.ServerApp.port = 8888
c.ServerApp.open_browser = False
c.ServerApp.allow_root = TrueStep 5 — Open the Firewall
In the LightYear control panel, add a firewall rule:
| Protocol | Port | Source |
|---|---|---|
| TCP | 8888 | Your IP (e.g. 203.0.113.0/32) |
Step 6 — Start Jupyter Lab
>_BASH
$jupyter lab --no-browser &Access at: http://<SERVER_IP>:8888
Running as a systemd Service
INI
# /etc/systemd/system/jupyter.service
[Unit]
Description=Jupyter Lab
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/jupyter lab --no-browser
Restart=on-failure
[Install]
WantedBy=multi-user.target>_BASH
$systemctl daemon-reload$systemctl enable jupyter$systemctl start jupyterUsing SSH Tunnelling (More Secure)
Instead of opening port 8888 publicly, tunnel via SSH:
>_BASH
$ssh -L 8888:localhost:8888 root@<SERVER_IP>Then access http://localhost:8888 on your local machine.
