Prerequisites

Before you begin, make sure you have the following:
  • An organization on Anaconda.com with a current subscription.
  • A Linux server that meets the system requirements.

Installing JupyterHub

1

Download and unpack the installer

  1. Log in to your Linux server as a root user.
  2. Download the installer by running the following command:
    # Replace <INSTALLER_LOCATION> with the provided location of your installer
    curl -O <INSTALLER_LOCATION>
    
  3. Unpack the installer tarball:
    Example
    tar -xvf jupyterhub-#.#.#-<hash>.tar
    
2

Create a CA certificate

If necessary, create a CA certificate and make self-signed certificates off of that using the DIY-SSL-CA package:
# Replace <HOSTNAME> with your JupyterHub server hostname
cd DIY-SSL-CA
bash create_noprompt.sh <HOSTNAME>
Make note of the the CERT, KEY, and CA_CERT values.
3

Create a service account

Create a dedicated service account for the JupyterHub services to use to authenticate to your organization members.
  1. Sign in to Anaconda.com.
  2. Navigate to your Organizations page.
  3. Select the organization you want to create a service account for.
  4. Under User Management, select Service Accounts.
  5. Click Add Account.
  6. Name for your service account JupyterHub.
  7. Click Save.
  8. Save the Client ID and Client Secret in a secure location.
4

Add your OAuth callback URL

Submit a request to add your OAuth callback URL to the JupyterHub service account. Complete the request form as follows:
  1. Enter your email address.
  2. Enter “JupyterHub OAuth callback URL” as the subject.
  3. In the description, provide your JupyterHub server’s fully qualified domain name.
    If you have modified your jupyterhub_config.py’s config class variable (c.AnacondaServerAuthenticator.oauth_callback_url), include the modified value in the description.
  4. Select All users as the user impact.
  5. Select Low as the priority.
  6. Select Package Security Manager (Cloud) as the product.
  7. Enter N/A as the product version.
  8. Select Production as the system type.
  9. Select Integration as the ticket type.
  10. Select Submit.
You will receive an email when your request is approved. You can continue with the installation process while you wait for the request to be approved, but users will not be able to log into the JupyterHub server until your request is approved.
5

Create an environment file

Create an environment file named .env in your /home/<username>/ directory.
If you already have an .env file in your home directory, you can name your new file something else, like .env_jhub_anaconda.
Add the following information to the .envfile you just created, including the actual values:
CLIENT_ID=
CLIENT_SECRET=
CERT=
KEY=
CA_CERT=
REPO_CHANNELS=("org_chan1" "org_chan2" "defaults")
The CA Cert is only required if you are using self-signed certificates.
The REPO_CHANNELS variable is a list of channels that the JupyterHub services will use to install packages when users build new environments in Jupyter. The installer configures conda to respect the order of the channels as they are listed in the environment file.
6

Run the installer

Run the installer with the following command:
sudo ENV_FILE=/home/<user>/.env ./jupyterhub-#.#.#-<hash>.sh -b

I am receiving a libcrypt.so.1 error post installation

Amazon Linux does not include libxcrypt-compat, which causes nginx services to error when starting. If you receive a libcrypt.so.1 error post installation, install the libxcrypt-compat package on your JupyterHub server:
sudo yum install libxcrypt-compat
After installing the package, restart the nginx service:
sudo systemctl restart nginx.service