# Connect a local IDE to a codespace

> Connect a local IDE to a codespace - Use the DataRobot CLI and SSH to open a codespace from Visual
> Studio Code or another local editor.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-08-30T06:26:16.258465+00:00` (UTC).

## Primary page

- [Connect a local IDE to a codespace](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [前提条件](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#prerequisites): In-page section heading.
- [Install the CLI plugin](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#install-the-cli-plugin): In-page section heading.
- [認証](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#authenticate): In-page section heading.
- [Start the SSH tunnel](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#start-the-ssh-tunnel): In-page section heading.
- [Connect from VS Code](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#connect-from-vs-code): In-page section heading.
- [Isolated networks](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#isolated-networks): In-page section heading.
- [注意事項](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#considerations): In-page section heading.
- [トラブルシューティング](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#troubleshooting): In-page section heading.
- [次のステップ](https://docs.datarobot.com/ja/docs/workbench/wb-notebook/codespaces/connect-local.html.md#next-steps): In-page section heading.

## Documentation content

You can open a DataRobot codespace from a local editor such as Visual Studio Code (VS Code). The DataRobot CLI starts an SSH tunnel to the codespace, then VS Code connects to that host with Remote-SSH.

This procedure uses the DataRobot CLI and an SSH client. The steps below are written for VS Code. Other editors that use OpenSSH and your local SSH config can connect to the same host alias.

> [!NOTE] 本機能の提供について
> The Python 3.13 notebook environment required for this connection is available on Multi-tenant SaaS and on Self-managed in DataRobot version 11.11 and later. Select that image for the codespace; it is not the default environment.

After you connect, you can:

- Browse and edit files in the codespace persistent file system ( /home/notebooks/storage ).
- Use a remote terminal in your local editor.
- Run local editor extensions, including AI coding assistants, against the remote files.

## 前提条件

Before you connect:

- A codespace configured to use the Python 3.13 notebook environment. Other built-in images do not serve the SSH endpoint. See Built-in environment images .
- The DataRobot CLI ( dr ).
- An OpenSSH-compatible client on your machine (included with macOS and most Linux distributions; on Windows, install the OpenSSH Client optional feature).
- VS Code with the Remote-SSH extension.

> [!NOTE] Standalone notebooks
> This connection works with codespaces. It does not work with standalone DataRobot Notebooks. the notebook must be converted to a codespace first.

## Install the CLI plugin

1. Install the DataRobot CLI if it isn't already available. SeeGetting started with the DataRobot CLI. macOS / LinuxWindows (PowerShell)curlhttps://cli.datarobot.com/install|shirmhttps://cli.datarobot.com/winstall|iex
2. Install the codespace plugin. drplugininstallcodespace The plugin manifest name iscodespace.dr pluginanddr pluginsare aliases; DataRobot CLI examples use the singular form.

## 認証

Point the CLI at your DataRobot host and sign in.

**Multi-tenant SaaS:**
```
dr auth login 
```

**セルフマネージド:**
```
dr auth set-url https://<your-datarobot-host>
dr auth login 
```


On Windows, if your DataRobot host uses a private certificate authority, pass `--export-windows-certs` before `auth`. This flag is available only in Windows installations of the CLI:

```
dr --export-windows-certs auth login 
```

Global CLI flags must appear before the subcommand. For more authentication options, see [Authentication management](https://docs.datarobot.com/ja/docs/agentic-ai/cli/commands/auth.html.md).

## Start the SSH tunnel

The codespace ID is the last segment of the codespace URL:

```
https://<datarobot-host>/usecases/<use-case-id>/notebooks/<codespace-id> 
```

For example, in `https://app.datarobot.com/usecases/64594cf462348c3004202c52/notebooks/6a34200b438c6e4a4518b049`, the codespace ID is `6a34200b438c6e4a4518b049`.

From a local terminal, start the tunnel. Leave this process running for the rest of the session.

To connect to a specific codespace, pass its ID. If that session is stopped or completed, the CLI starts it and waits until it is ready:

```
dr codespace ssh 6a34200b438c6e4a4518b049 
```

To connect to a codespace that is already running without copying an ID from the URL, omit the ID:

```
dr codespace ssh 
```

The command writes a host alias to your SSH config ( `~/.ssh/config` on macOS and Linux, or `%USERPROFILE%\.ssh\config` on Windows). The alias is `drcs-` followed by the last eight characters of the codespace ID. In the example above, the host is `drcs-4518b049`.

While the CLI process is running, it keeps the codespace session from shutting down due to inactivity.

## Connect from VS Code

1. In VS Code, open the Command Palette and select Remote-SSH: Connect to Host .
2. Choose the drcs-<last-eight-characters-of-the-codespace-id> host (for example, drcs-4518b049 ).
3. When the remote window opens, choose Open Folder and select /home/notebooks/storage .

Edit files and use a remote terminal against the codespace file system.

## Isolated networks

If the remote environment cannot download the VS Code server from the public internet, download the server on your local machine instead. In VS Code, set the Remote-SSH setting `remote.SSH.localServerDownload` to `always`.

If you reach DataRobot through an HTTP forward proxy, set the `HTTPS_PROXY` environment variable in the terminal where you run the CLI, then start the tunnel from that same terminal.

## 注意事項

- Select the Python 3.13 environment image. Other images do not expose SSH.
- Only the persistent storage/ directory is available over SSH.
- The CLI starts a stopped or completed session when you pass a codespace ID. It does not list or stop codespaces.
- Connecting to more than one codespace at a time is not supported.
- Windows Subsystem for Linux is not supported.

## トラブルシューティング

| 問題 | 確認事項 |
| --- | --- |
| Remote-SSH cannot find the host | Leave dr codespace ssh running so the CLI can write the SSH config entry. The host name is drcs- plus the last eight characters of the codespace ID, not the full ID. |
| Connection fails immediately | Confirm the codespace uses the Python 3.13 environment image. If you omitted the ID, confirm a session is already running, or pass the codespace ID from the URL. |
| TLS / certificate errors on Windows | Sign in with dr --export-windows-certs auth login. This flag is available only on Windows. |
| VS Code server download fails | Set remote.SSH.localServerDownload to always so the client copies the server onto the remote host. |
| Requests to DataRobot fail behind a proxy | Set HTTPS_PROXY in the terminal that runs the CLI. |
| Session shuts down while you are connected | Keep the dr codespace ssh process running in the foreground. |

## 次のステップ

- Codespace sessions : Create files, manage Git, and configure the codespace before you connect from a local editor.
- Environment management : Select the Python 3.13 image and configure resources for the codespace.
- Getting started with the DataRobot CLI : Install, update, and authenticate the CLI.
