# Allow JupyterHub users to install their own JupyterLab extensions

**URL:** <https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037>\
**Category:** JupyterHub\
**Tags:** jupyterlab, jupyterhub, how-to\
**Created:** [September 30, 2021, 4:56pm UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037 "2021-09-30T16:56:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobo-jamson](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bobo-jamson/32/5357_2.png) [@bobo-jamson](https://discourse.jupyter.org/u/bobo-jamson)\
**Post date:** [September 30, 2021, 4:56pm UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037/1 "2021-09-30T16:56:56Z")

</div>

Hello,

I’m wondering if there is a way for individual users logged in through JupyterHub to be able to install their preferred JupyterLab extensions from the JupyterLab extensions side panel? Currently when I try to do so I get 500-errors, which I suspect is from the user not being able to install to the path. Is there a way to have JupyterHub start an instance of JupyterLab from a users virtual environment?

Any help on this matter would be great.

Thanks,  
Bobo

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [September 30, 2021, 7:01pm UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037/2 "2021-09-30T19:01:22Z")

</div>

It should be possible, but it depends on how you’ve deployed and configured JupyterHub. For instance if you’re using DockerSpawner then each user gets their own container, optionally with a mounted persistent home directory.

---

<div class="post-metadata">

**Author:** ![bobo-jamson](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bobo-jamson/32/5357_2.png) [@bobo-jamson](https://discourse.jupyter.org/u/bobo-jamson)\
**Post date:** [October 1, 2021, 3:13am UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037/3 "2021-10-01T03:13:54Z")

</div>

Thank for the reply @manics!

I’m pretty novice to jupyterHub, so my setup is pretty vanilla at the moment, that is to say that my config file is the default one. JupyterHub is launched from systemd on boot, but none of the users who login are able to make any changes to JupyterLab extensions.

Does this help?

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [October 2, 2021, 2:49pm UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037/4 "2021-10-02T14:49:17Z")

</div>

JupyterHub is very flexible, and there isn’t a “vanilla” install. Can you show us which instructions you followed to setup your JupyterHub?

---

<div class="post-metadata">

**Author:** ![bobo-jamson](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bobo-jamson/32/5357_2.png) [@bobo-jamson](https://discourse.jupyter.org/u/bobo-jamson)\
**Post date:** [October 3, 2021, 8:18pm UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037/5 "2021-10-03T20:18:04Z")

</div>

@manics, understood.

I followed along:

> **[Note: How To Install JupyterHub on a Local Server](https://www.pugetsystems.com/labs/hpc/Note-How-To-Install-JupyterHub-on-a-Local-Server-1673/)**
>
> This note describes installing and configuring JupyterHub and JupyterLab on a "bare-metal" server.

The uncommented lines from my `jupyterhub_config.py` are:

```auto
c.JupyterHub.bind_url = 'http://:8888
c.Spawner.default_url = '/lab'

```

and the Systemd launcher configuration file looks like:

```auto
[Unit]

Description=JupyterHub
After=syslog.target network.target

[Service]

User=root
Environment="PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/jupyterhub/bin"
ExecStart=/opt/jupyterhub/bin/jupyterhub -f /opt/jupyterhub/etc/jupyterhub/jupyterhub_config.py

[Install]
WantedBy=multi-user.target

```

As it currently stands, the system works, I am able to make virtual environments as a user, add the kernel and see it available when I log in via JupyterHub, but when I try to install an extension I am unable to do so (Error 500: Internal Server Error).

The effect I am looking for is to have JupyterHub launch a JupyterLab instance from the users environment where they have permission to install extensions as they please.

Many Thanks,

Bobo

---

<div class="post-metadata">

**Author:** ![icecreampint](https://avatars.discourse-cdn.com/v4/letter/i/eb9ed0/32.png) [@icecreampint](https://discourse.jupyter.org/u/icecreampint)\
**Post date:** [February 5, 2024, 6:57am UTC](https://discourse.jupyter.org/t/allow-jupyterhub-users-to-install-their-own-jupyterlab-extensions/11037/6 "2024-02-05T06:57:40Z")

</div>

@bobo-jamson did you ever find an answer to your question?
