# JupyterHub access on Cheyenne

**URL:** <https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253>\
**Category:** CMIP6 Hackathon\
**Created:** [October 8, 2019, 8:57pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253 "2019-10-08T20:57:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jukent](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jukent/32/297_2.png) [@jukent](https://discourse.pangeo.io/u/jukent)\
**Post date:** [October 8, 2019, 8:57pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/1 "2019-10-08T20:57:17Z")

</div>

# JupyterHub access on Cheyenne

**Step 1:** Navigate to [https://jupyterhub.ucar.edu/](https://jupyterhub.ucar.edu/).

**Step 2:** Launch your server, select from:  
- Cheyenne Supercomputer (i.e., the batch nodes)  
- Casper DAV (Analysis machine)   
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/b88bf389e292c626988c80827efe7b47613ab131.png)  
You may have to click “Launch Server” after selecting your machine:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/7b90803b8833b586c8515816f511716634a39627.png)

**Step 3:** Authenticate with either your yubikey or your DUO mobile app

**Step 4:** Specify:  
- Queue (reservation or Slurm QoS)  
- Project account number  
- Wall time

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/e4c8bb2611095780de0f15e296fc5389c668f267.png)

**Step 5:** Click “Spawn.”

# What to do if JupyterHub is down or unstable (The Murphy’s Law section):

In case you are having issues with jupyterhub.ucar.edu, we’ve provided utility scripts for launching JupyterLab on both Cheyenne and Casper via SSH Tunneling:

**Step 1:** SSH into Cheyenne or Casper:

```auto
ssh username@cheyenne.ucar.edu 
ssh username@casper.ucar.edu 

```

**Step 2:** Clone repository with utility scripts:

```auto
git clone https://github.com/NCAR/ncar-python-tutorial.git

```

**Step 3:** Submit Job and Launch Jupyter Server

_Note: This step requires having conda on your path, and `jupyter` installed in your `base` conda environment._ In order to launch the jupyter server from a different environment, make sure to run `conda activate ENV_NAME` where ENV\_NAME=your environment name prior running the following commands:

```auto
cd ncar-python-tutorial
./setup/jlab-ch # on Cheyenne

```

or

```auto
./setup/jlab/jlab-dav # On Casper

```

For custom configuration, you can use --help option to see the available options

```auto
$ ./setup/jlab/jlab-ch --help
Usage: launch Jupyter server
Possible options are:
 -a,--account: account
 -w,--walltime: walltime [default: 06:00:00]
 -q,--queue: queue [default: share]
 -m,--memory: memory request [default: 8GB]
 -d,--directory: notebook directory
 -p,--port: [default: 8888]
 --matlab: run matlab kernel
 --matlab-version: matlab version [default: R2018a]

```

**Step 4:** If step 3 is successful, you will see instructions along the lines:

```auto
----------------------------------------------------------------------
Execute on local machine:
ssh -N -L 8999:localhost:8999 username@casperxx.ucar.edu
 
Open a browser on your local machine and type in the address bar:
http://localhost:8999
----------------------------------------------------------------------

```

```
- Open a new terminal and run the `ssh command` listed under `Execute on local machine` section
- Open your favorite browser (chrome, firefox, etc..) and head over to the address listed under `Open a browser on your local machine ….` section
```

---

_[View the full topic](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253)._
