Skip to content

Connecting to a remote Jupyter server from vscode.dev

Rich Chiodo edited this page May 10, 2022 · 11 revisions

You can connect to a remote Jupyter server from vscode.dev by using the 'Jupyter: Specify Jupyter server for connections' command.

When this quick pick comes up, pick 'Existing':

image

On the next step, enter the URI of your Jupyter server:

image

This should then allow you to pick a kernel from your jupyter server when opening a notebook:

image

If you're starting this server yourself, there are some special requirements to get it to work in the browser:

  1. It needs an 'allow_origins' or 'allow_origins_pat' to allow a browser to connect. This should be something like so: jupyter notebook --no-browser --NotebookApp.allow_origin_pat=https://.*vscode-cdn\.net
  2. If you're using https, the certificate provided must be trusted by the browser. The jupyter extension can't tell when this is the case, so the best way to enable this is to just open the jupyter server's URI in the browser and it will tell you if it's trusted or not. You can then trust the certificate or not. Here's an example of what happens when you run the jupyter server with an untrusted certificate:

image

Clone this wiki locally