-
Notifications
You must be signed in to change notification settings - Fork 286
Connecting to a remote Jupyter server from vscode.dev
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':
On the next step, enter the URI of your Jupyter server:
This should then allow you to pick a kernel from your jupyter server when opening a notebook:
If you're starting this server yourself, there are some special requirements to get it to work in the browser:
The server has to be started with an 'allow_origin' or 'allow_origin_pat' to allow a browser to connect.
For vscode.dev, this origin is special. You'd start your server with either of the following:
jupyter notebook --no-browser --NotebookApp.allow_origin_pat=https://.*vscode-cdn\.net
or
jupyter notebook --no-browser --NotebookApp.allow_origin='*'
.
Using https://vscode.dev
as the allow_origin doesn't work because vscode-dev doesn't run extensions at the same URL as the UI. This is a security measure to prevent extensions on different tabs from talking to each other.
If you have the wrong allow_origin
set, the Developer Tools console on the browser will show something like so:
If you're using https, the certificate provided must be trusted by the browser. When this error occurs, the jupyter extension just receives unable to fetch. You can see the results in the network tab for Developer Tools:
The way to enable an untrusted certificate is to open the jupyter server's URI in the browser. It should show something like so:
If you trust the server (maybe because it's your local machine), you can add this untrusted certificate to the browser. If you reconnect from vscode.dev after that point, it should work.
If the URL for the server works in the browser, but you still cannot connect, please log an issue.
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension