
Setting up a Remote Jupyter Lab Server
In order to setup a remote Jupyter Lab server you must complete the following steps:
- Open ports 22 (ssh) and 8888 (jupyter)
- Configure Jupyter Lab to request a password instead of a token
- Start the Jupyter Lab server on the Remote server
- Access Jupyter on your local browser
Configure your Router
This step will be router specific but will be a similar process no matter what kind of router you have.
You will need to do get the IP address of your server:
$ hostname -I
192.168.0.120Use this private IP address when forwarding both ports 22 and 8888
Configure Jupyter Lab Password
$ jupyter notebook --generate-config
$ jupyter notebook password
Enter password: ****
Verify password: ****
[NotebookPasswordApp] Wrote hashed password to /Users/username/.jupyter/jupyter_notebook_config.jsonYou will use this password when logging in remotely
Starting Jupyter Lab on the Remote Server
jupyter-lab --ip 0.0.0.0 --port 8888 --no-browserStarting Jupyter like this will make sure you can access it publicly and will also stop Jupyter from trying to start a browser instance on your remote machine
Access Jupyter on a Local Browser
Navigate to the following address:
http://<your-routers-public-ip>:8888It should ask you for the password you set up earlier and you should be able to use Jupyter Lab remotely