Embed JupyterHub into a website (via IFrame)

saurs saurav
Sep 4, 2018 · 1 min read

If you are here to follow this guide, You probably have most knowledge in JupyterHub and it’s notebook.

Newbie in JupyterHub

1st Scenario

Two apps runs in a same server i.e

  1. Running JupyterHub ( http://localhost:8000 )

Inside a website, add a iframe tag with src pointing to JupyterHub’s host.

2nd Scenario

Two apps runs in different server i.e

  1. Running JupyterHub ( http://abc.jupyterhub.com )

Inside a website, add a iframe tag with src pointing to JupyterHub’s host.

If you open a website, In console you will get Blocked by Content Security Policy error.

Inside jupyterhub_config.py file, Add :

c.JupyterHub.tornado_settings allows jupyterhub to run inside website.

NotebookApp.tornado_settings allows jupyter-notebook to run inside website.

Finally, run JupyterHub with above configuration.


saurs saurav

Written by

Engineer at Fusemachines

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade