2018-08-02 12:35:36 -07:00
|
|
|
.. _install/custom:
|
2018-07-10 14:35:14 -07:00
|
|
|
|
2018-07-11 12:00:58 -07:00
|
|
|
=============================
|
|
|
|
|
Installing on your own server
|
|
|
|
|
=============================
|
2018-07-10 14:35:14 -07:00
|
|
|
|
2018-08-11 08:25:21 +02:00
|
|
|
|
2019-05-18 14:06:16 -07:00
|
|
|
Follow this guide if your cloud provider doesn't have a direct tutorial, or
|
|
|
|
|
you are setting this up on a bare metal server.
|
2018-08-11 08:25:21 +02:00
|
|
|
|
2019-05-18 14:06:16 -07:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
|
|
Do **not** install TLJH directly on your laptop or personal computer!
|
|
|
|
|
It will most likely open up exploitable security holes when run directly
|
|
|
|
|
on your personal computer.
|
2018-08-11 08:25:21 +02:00
|
|
|
|
2019-05-19 11:05:24 -07:00
|
|
|
.. note::
|
|
|
|
|
|
|
|
|
|
Running TLJH *inside* a docker container is not supported, since we depend
|
|
|
|
|
on systemd. If you want to run TLJH locally for development, see
|
|
|
|
|
:ref:`contributing/dev-setup`.
|
|
|
|
|
|
2018-07-10 14:35:14 -07:00
|
|
|
Goal
|
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
By the end of this tutorial, you should have a JupyterHub with some admin
|
|
|
|
|
users and a user environment with packages you want installed running on
|
|
|
|
|
a server you have access to.
|
|
|
|
|
|
|
|
|
|
Pre-requisites
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
#. Some familiarity with the command line.
|
2023-01-14 10:21:34 +08:00
|
|
|
#. A server running Ubuntu 18.04+ where you have root access.
|
2021-10-18 18:39:50 +05:30
|
|
|
#. At least **1GB** of RAM on your server.
|
2018-07-10 14:35:14 -07:00
|
|
|
#. Ability to ``ssh`` into the server & run commands from the prompt.
|
2019-05-17 10:21:43 +10:00
|
|
|
#. An **IP address** where the server can be reached from the browsers of your target audience.
|
2018-07-10 14:35:14 -07:00
|
|
|
|
2019-01-09 15:54:47 -08:00
|
|
|
If you run into issues, look at the specific :ref:`troubleshooting guide <troubleshooting/providers/custom>`
|
|
|
|
|
for custom server installations.
|
|
|
|
|
|
2018-07-10 14:35:14 -07:00
|
|
|
Step 1: Installing The Littlest JupyterHub
|
|
|
|
|
==========================================
|
|
|
|
|
|
|
|
|
|
#. Using a terminal program, SSH into your server. This should give you a prompt where you can
|
|
|
|
|
type commands.
|
|
|
|
|
|
2019-11-06 10:41:42 -05:00
|
|
|
#. Make sure you have ``python3``, ``python3-dev``, ``curl`` and ``git`` installed.
|
2018-08-21 11:21:53 -04:00
|
|
|
|
2018-11-03 17:29:30 -04:00
|
|
|
.. code::
|
2018-08-21 11:21:53 -04:00
|
|
|
|
2019-11-06 10:41:42 -05:00
|
|
|
sudo apt install python3 python3-dev git curl
|
2018-08-21 11:21:53 -04:00
|
|
|
|
2018-07-10 14:35:14 -07:00
|
|
|
#. Copy the text below, and paste it into the terminal. Replace
|
|
|
|
|
``<admin-user-name>`` with the name of the first **admin user** for this
|
2019-05-18 14:22:58 -07:00
|
|
|
JupyterHub. Choose any name you like (don't forget to remove the brackets!).
|
2018-08-10 10:09:24 -07:00
|
|
|
This admin user can log in after the JupyterHub is set up, and
|
2018-08-02 16:16:19 -07:00
|
|
|
can configure it to their needs. **Remember to add your username**!
|
2018-07-10 14:35:14 -07:00
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
2020-07-07 23:14:25 -05:00
|
|
|
curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin <admin-user-name>
|
2018-07-10 14:35:14 -07:00
|
|
|
|
2018-08-10 10:09:24 -07:00
|
|
|
.. note::
|
2018-08-01 18:05:34 -07:00
|
|
|
|
|
|
|
|
See :ref:`topic/installer-actions` if you want to understand exactly what the installer is doing.
|
|
|
|
|
:ref:`topic/customizing-installer` documents other options that can be passed to the installer.
|
|
|
|
|
|
2018-07-10 14:35:14 -07:00
|
|
|
#. Press ``Enter`` to start the installation process. This will take 5-10 minutes,
|
2019-05-17 10:21:43 +10:00
|
|
|
and will say ``Done!`` when the installation process is complete.
|
2018-07-10 14:35:14 -07:00
|
|
|
|
2018-08-21 11:21:53 -04:00
|
|
|
#. Copy the **Public IP** of your server, and try accessing ``http://<public-ip>`` from
|
2018-07-10 14:35:14 -07:00
|
|
|
your browser. If everything went well, this should give you a JupyterHub login page.
|
|
|
|
|
|
|
|
|
|
.. image:: ../images/first-login.png
|
|
|
|
|
:alt: JupyterHub log-in page
|
|
|
|
|
|
2021-01-21 10:14:44 +00:00
|
|
|
#. Login using the **admin user name** you used in step 3. You can choose any
|
2018-08-10 10:09:24 -07:00
|
|
|
password that you wish. Use a
|
2018-07-10 14:35:14 -07:00
|
|
|
strong password & note it down somewhere, since this will be the password for
|
|
|
|
|
the admin user account from now on.
|
|
|
|
|
|
|
|
|
|
#. Congratulations, you have a running working JupyterHub!
|
|
|
|
|
|
|
|
|
|
Step 2: Adding more users
|
|
|
|
|
==========================
|
|
|
|
|
|
|
|
|
|
.. include:: add_users.txt
|
|
|
|
|
|
|
|
|
|
Step 3: Install conda / pip packages for all users
|
|
|
|
|
==================================================
|
|
|
|
|
|
|
|
|
|
.. include:: add_packages.txt
|
2018-08-29 15:09:46 -07:00
|
|
|
|
|
|
|
|
Step 4: Setup HTTPS
|
|
|
|
|
===================
|
|
|
|
|
|
|
|
|
|
Once you are ready to run your server for real, and have a domain, it's a good
|
|
|
|
|
idea to proceed directly to :ref:`howto/admin/https`.
|