Skip to main content

Connect to a Workspace

Connect to a Workspace

After a workspace is successfully created, the workspace is reachable via the ssh host WORKSPACE_NAME.devsy. If you have selected an IDE to automatically open, Devsy will automatically try to open the IDE after a successful workspace creation or devsy up command.

info

You can change the default IDE to open globally via: devsy use ide vscode or devsy up my-workspace --ide vscode for an individual workspace.

VS Code Browser

Devsy is able to open VS Code in a browser in a workspace. It will use the open source project openvscode-server for installing a vscode server binary in the workspace and then tunnel a connection to that binary from the localhost. To open the workspace inside VS Code browser, you can run the following command:

devsy up my-workspace --ide openvscode

To select a different openvscode version, please run with:

devsy up my-workspace --ide openvscode --ide-option VERSION=v1.76.2

VS Code

Before connecting VS Code with Devsy, make sure you have installed the remote ssh extension and the code CLI. Then you can start the workspace directly in VS Code with:

devsy up my-workspace --ide vscode
SSH Fallback

If for whatever reason this does not work you can also use the regular SSH connection with WORKSPACE_NAME.devsy to connect VS Code with a workspace

JetBrains Suite (Goland, PyCharm, Intellij etc.)

Make sure you have JetBrains Gateway installed and a valid jetbrains subscription for your local IDE. The following JetBrains IDEs are supported:

  • CLion (clion)
  • Goland (goland)
  • PyCharm (pycharm)
  • Intellij (intellij)
  • PhpStorm (phpstorm)
  • WebStorm (webstorm)
  • Rider (rider)
  • RubyMine (rubymine)

Then start your workspace via:

devsy up my-workspace --ide goland

Which will install the goland server binary into the workspace and then open JetBrains Gateway to open this workspace.

After successful installation the Gateway SSH dialog will popup prefilled with the correct information, please click Check Connection and Continue, which will start your desired IDE inside the workspace.

To select a different IDE version, please run with:

devsy up my-workspace --ide goland --ide-option VERSION=2022.3.3
SSH Fallback

If for whatever reason this does not work you can also use the regular SSH connection with WORKSPACE_NAME.devsy to connect your JetBrains IDE with a workspace

Fleet Support

Fleet currently only works by manually adding an SSH connection with WORKSPACE_NAME.devsy

SSH

Upon workspace creation, Devsy will automatically modify the ~/.ssh/config to include an entry for WORKSPACE_NAME.devsy, which allows you to use the following command to connect to your workspace:

ssh WORKSPACE_NAME.devsy

This also allows you to connect any IDE that supports remote development through SSH via the given host WORKSPACE_NAME.devsy.

Devsy CLI

If you don't have ssh installed or cannot connect through any other IDE, you can use the following Devsy command to access a workspace:

devsy ssh my-workspace

Optionally you can also define a command to run:

devsy ssh my-workspace --command "echo Hello World"

IDE Commands

This section shows additional commands to configure Devsy's behavior when opening a workspace.

Configure IDE Options

You can specify certain options such as IDE version and download path if needed. You can list the available options for an IDE via:

devsy ide options openvscode

You will see available options and default values for them. To change an option, you can run:

devsy ide set-options openvscode -o VERSION=v1.76.2

Change Default IDE

To change the default IDE Devsy will use for connecting to a workspace, please run:

devsy ide use vscode

List supported IDEs

You can list all Devsy supported IDEs via:

devsy ide list