# Configuring Jupyter on WebMO
Steps outlining how to set up JupyterLab on the WebMO server and port forward for access on a local web browser.
## Steps
1. We need to run JupyterLab as the `webmo` user so we'll need to install miniconda as `webmo` in their home directory. After connecting to the WebMO server do the following:
```bash
# we log in as webmouser so need to switch user to webmo
$ sudo su webmo
# move to /home/webmo
$ cd
# download the miniconda installer
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# run the installer in silent mode
# if prompted to run `conda init` type yes
$ bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
```
This should install Miniconda for `webmo` so we're ready to install JupyterLab.
2. Creating an environment and installing JupyterLab. Next, still as the user `webmo` we need to create a conda environment and install JupyterLab into it.
```bash
$ conda create -n jupyter -c conda-forge jupyterlab
```
This should install some additional dependencies like a python version etc but feel free to install other packages into this environment as you need them.
3. Start a headless JupyterLab session in your environment.
```bash
$ conda activate jupyter
(jupyter)$ jupyter lab --no-browser
```
This will start a jupyter lab session in your current directory with no browser but return in the command line the url to the notebook.
4. SSH port forward from WebMO to your local machine to use Jupyter in your browser.
Do the below on your local machine not on WebMO server.
```bash
$ ssh -i /path/to/sshkey -N -L localhost:8888:localhost:8888 webmouser@webmo-leeds.uksouth.cloudapp.azure.com
```
This will hang the terminal as SSH holds open the connection and forwards ports from the WebMo server to your local machine. If you open a browser on your local machine and go to [http://localhost:8888/](http://localhost:8888) it should open the jupyter lab session in your browser