Skip to content

Connecting to JupyterHub from vscode.dev

Don Jayamanne edited this page Oct 1, 2023 · 3 revisions

Accessing JuptyerHub from vscode.dev, github.dev or the like requires some special configuration of the JupyterHub application.

  • Generate a configuration file for JuptyerHub as defined in the JupyterHub configuration docs
  • Ensure the configuration file has the following settings to allow access to JupyterHub from other web applications:  
origin = '*'
c.Spawner.args = [f'--NotebookApp.allow_origin={origin}']
c.JupyterHub.tornado_settings = {
    'headers': {
        'Access-Control-Allow-Origin': origin,
        'Access-Control-Allow-Private-Network': 'true', 
    },
}

Note:

'Access-Control-Allow-Private-Network': 'true' is required only if JupyterHub is running on your local machine

Clone this wiki locally