Connect from VS Code or another IDE
Run notebooks from your local editor against your Databaas notebook server.
You do not have to work in the browser. An editor that can attach to a JupyterHub server gives you
your own editor and shortcuts, while the code runs on your Databaas notebook server — with your
permissions, your files and databaas-utils.
To run code on your laptop instead, with your own Python and files, sign in with databaas login and
use the same helpers there. See working locally.
Prerequisite
You need the Use notebooks app permission. See notebook sessions.
Get your server URL and a token
Every editor needs the same two things.
Copy your server URL
The portal shows Notebooks inside its own page, so its address bar does not show your server URL. Go to Notebooks directly instead: open a new browser tab and enter
https://jupyter.<your-databaas-domain>with the same domain as your portal. Once JupyterLab has loaded, the address bar shows your notebook server URL, of the form:
https://jupyter.<your-databaas-domain>/user/<username>/labCopy it up to and including /user/<username>/.
Create a token
In JupyterLab, open File → Hub Control Panel, select Token, and request a new token. Copy it when it is shown. It stays valid until you revoke it, so it survives restarts of your server.
Some editors want the token as part of the URL. Add it as a query parameter:
https://jupyter.<your-databaas-domain>/user/<username>/?token=<token>Treat the token like a password: anyone with it can run code on your server as you, with your data access. Do not paste it into shared channels, commits or notebooks. If it leaks, revoke it in File → Hub Control Panel → Token.
VS Code
- Install the JupyterHub extension (
ms-toolsai.jupyter-hub). - Create a notebook: open the command palette (Ctrl+Shift+P, or Cmd+Shift+P on macOS) and run Create: New Jupyter Notebook.
- Select Select Kernel in the top right, then Existing JupyterHub Server….
- Paste your URL with the token, name the connection, and pick a kernel.
The same steps work in editors built on VS Code that ship this extension, such as Cursor and Windsurf.
PyCharm
In PyCharm Professional, open Tools → Add Jupyter Connection, add an external server, paste your server URL, and supply the token. Use Test connection before you save.
JupyterLab Desktop
On the Welcome page, choose Connect… and paste your URL with the token. JupyterLab Desktop
reads the token from the ?token= part.
Other editors
Any client that can attach to an existing Jupyter server by URL works with the same URL and token.
Use the catalog
The kernel runs on your notebook server, so everything in querying data works unchanged:
from databaas_utils.user import get_catalog
catalog = get_catalog()
catalog.load_table("<namespace>.<table>").scan(limit=10).to_pandas()Limitations
- Your files live on Databaas, not on your laptop. The editor is local; the kernel, the filesystem and the data access are remote. A notebook you open from your laptop runs on the server, but reads and writes files on the server, not next to the notebook on your disk. See notebook storage.
- marimo notebooks cannot use the remote server. The marimo editor extension does not connect to an external server; open marimo notebooks in the browser, or run marimo on your laptop as described in working locally.
- Zed is not supported. Its REPL runs against local kernels only.
- If the connection fails, start your server first. A server is stopped after an hour without activity, which also drops your editor’s connection. Open Notebooks in the browser, wait for JupyterLab to load, then reconnect.