Embed JupyterHub into a website (via IFrame)
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
- Running JupyterHub ( http://localhost:8000 )
- Running Website ( http://localhost:3000 )
Inside a website, add a iframe tag with src pointing to JupyterHub’s host.
2nd Scenario
Two apps runs in different server i.e
- Running JupyterHub ( http://abc.jupyterhub.com )
- Running Website ( http://bcd.website.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.
