Multiple Classes Multiple Jupyterhubs/labs same domain?

Context is a university setting with a single domain (and group of machines) that will support multiple classes. Some classes are introductory so they should only have 1 kernel for simplicity. Other classes are more advanced and there may be a good reason to have multiple kernels and/or jupyterlab. We are currently reverse-proxying through Nginx. For authentication we are using freeipa (j u s t got that sort-of working) where freeipa authenticates users on the system and jupyterhub just inherits this authentication.

What is the recommended way to running multiple jupyterhubs on the same box? Do we use different config files? Can we create multiple jupyterlab environments? Or do we need to containerize everything to get any of this to work?

Just as a addendum I was given advice to use a single hub but use the spawner mechanism to provide for a multiplicity of environments (different courses) via different docker images. Is this a better way to go?

If you’re using Docker either option should work. Either have multiple JupyterHubs running under different /prefixes on your web server and configure your singleuser server Docker containers with different names, or have a single JupyterHub and extend DockerSpawner to let you choose from a selection of images

We are still having some issues with docker and freeipa. We have the freeipa running in a VM because we couldn’t containerize it and containers that are suppose to “just work” didn’t (at least for us). Then we are authenticating as clients against the freeipa, and using that to authenticate to jupyter. So far, though we are having some tangle on doing that in countainers but we really only just started moving that over. Just as a test, I thought we could take a machine and run multiple jupyterhubs on different ports (reverse-proxing them through nginx). But the seconded jhub fails on startup because it says we can’t run 2 on the same ip address even if the ports are different. Again, this has nothing to do with the reverse proxy … got that covered fine.
Since having multiple courses/labs sharing machines can’t be a corner case was hoping there was a standard (best practice) recipe but we can muddle through with some solution.

Jupyterhub uses two ports, one for the proxy and one for the hub API, did you change both? Are you able to share your config files?

If the main blocker for Docker is FreeIPA can you go for a mixed setup- FreeIPA running on the VM and Jupyter in Docker?