# How to configure JupyterHub server to launch JupyterLab containers as Privileged

**URL:** <https://discourse.jupyter.org/t/how-to-configure-jupyterhub-server-to-launch-jupyterlab-containers-as-privileged/7165>\
**Category:** JupyterHub\
**Tags:** jupyterhub\
**Created:** [December 15, 2020, 1:36am UTC](https://discourse.jupyter.org/t/how-to-configure-jupyterhub-server-to-launch-jupyterlab-containers-as-privileged/7165 "2020-12-15T01:36:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmvega](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/nmvega/32/1960_2.png) [@nmvega](https://discourse.jupyter.org/u/nmvega)\
**Post date:** [December 15, 2020, 1:36am UTC](https://discourse.jupyter.org/t/how-to-configure-jupyterhub-server-to-launch-jupyterlab-containers-as-privileged/7165/1 "2020-12-15T01:36:59Z")

</div>

Hello Friends:

I need `JupyterHub` to launch `JupyterLab` containers in `privileged` mode. So in `jupyterhub_config.py` (the **HUB** configuration file, not the **LAB** configuration file), I added the following entry:

```auto
c.DockerSpawner.extra_host_config = {
           "privileged" : True,
           "devices" : ["/sys/fs/cgroup:/sys/fs/cgroup:ro",],
           "tmpfs" : {"/tmp":"", "/run":"", "/run/lock":""}, }

```

After implementing that (and restarting), and then launching a **LAB** server, I don’t see a `--privileged` option in the output of `docker ps --no-trunc`. As well, the output of `docker inspect jupyter-jdoe | grep -i priv` shows `Privileged` as `false`.

Does anyone know how to properly implement this? I think I’m close, but I need help.

Thank you!

---

<div class="post-metadata">

**Author:** ![nmvega](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/nmvega/32/1960_2.png) [@nmvega](https://discourse.jupyter.org/u/nmvega)\
**Post date:** [December 15, 2020, 2:02am UTC](https://discourse.jupyter.org/t/how-to-configure-jupyterhub-server-to-launch-jupyterlab-containers-as-privileged/7165/2 "2020-12-15T02:02:13Z")

</div>

Sigh! I determined what the issue was. The above is correct. The issue is that, while I correctly set `c.DockerSpawner.extra_host_config` as shown, I accidentally clobbered that `dict()` later in the code by overwriting it versus `.update()`ing it. 🤡 Apologies for the false alarm. Hoping others find the question and method useful though. 😊
