JetBrains IDEs - Coder Docs (2024)

Home

/

User Guides

/

Access Workspaces

/

JetBrains IDEs

We support JetBrains IDEs usingGateway. The followingIDEs are supported for remote development:

  • IntelliJ IDEA
  • CLion
  • GoLand
  • PyCharm
  • Rider
  • RubyMine
  • WebStorm
  • JetBrains Fleet

JetBrains Gateway

JetBrains Gateway is a compact desktop app that allows you to work remotely witha JetBrains IDE without even downloading one. Visit theJetBrains website tolearn more about Gateway.

Gateway can connect to a Coder workspace by using Coder's Gateway plugin ormanually setting up an SSH connection.

How to use the plugin

If you experience problems, pleasecreate a GitHub issue or share inour Discord channel.

  1. Install Gatewayand open the application.

  2. Under Install More Providers, find the Coder icon and click Installto install the Coder plugin.

  3. After Gateway installs the plugin, it will appear in the Run the IDERemotely section.

    Click Connect to Coder to launch the plugin:

    JetBrains IDEs - Coder Docs (1)

  4. Enter your Coder deployment'sAccess Url and click Connect.

    Gateway opens your Coder deployment's cli-auth page with a session token.Click the copy button, paste the session token in the Gateway SessionToken window, then click OK:

    JetBrains IDEs - Coder Docs (2)

  5. To create a new workspace:

    Click the + icon to open a browser and go to the templates page inyour Coder deployment to create a workspace.

  6. If a workspace already exists but is stopped, select the workspace from thelist, then click the green arrow to start the workspace.

  7. When the workspace status is Running, click Select IDE and Project:

    JetBrains IDEs - Coder Docs (3)

  8. Select the JetBrains IDE for your project and the project directory thenclick Start IDE and connect:

    JetBrains IDEs - Coder Docs (4)

    Gateway connects using the IDE you selected:

    JetBrains IDEs - Coder Docs (5)

    Note the JetBrains IDE is remotely installed into~/.cache/JetBrains/RemoteDev/dist

Update a Coder plugin version

  1. Click the gear icon at the bottom left of the Gateway home screen and then"Settings"

  2. In the Marketplace tab within Plugins, enter Coder and if a newer pluginrelease is available, click Update then OK:

    JetBrains IDEs - Coder Docs (6)

Configuring the Gateway plugin to use internal certificates

When attempting to connect to a Coder deployment that uses internally signedcertificates, you may receive the following error in Gateway:

Failed to configure connection to https://coder.internal.enterprise/: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

To resolve this issue, you will need to add Coder's certificate to the Javatrust store present on your local machine. Here is the default location of thetrust store for each OS:

# Linux<Gateway installation directory>/jbr/lib/security/cacerts# macOS<Gateway installation directory>/jbr/lib/security/cacerts/Library/Application Support/JetBrains/Toolbox/apps/JetBrainsGateway/ch-0/<app-id>/JetBrains Gateway.app/Contents/jbr/Contents/Home/lib/security/cacerts # Path for Toolbox installation# WindowsC:\Program Files (x86)\<Gateway installation directory>\jre\lib\security\cacerts%USERPROFILE%\AppData\Local\JetBrains\Toolbox\bin\jre\lib\security\cacerts # Path for Toolbox installation

To add the certificate to the keystore, you can use the keytool utility thatships with Java:

keytool -import -alias coder -file <certificate> -keystore /path/to/trust/store

You can use keytool that ships with the JetBrains Gateway installation.Windows example:

& 'C:\Program Files\JetBrains\JetBrains Gateway <version>/jbr/bin/keytool.exe' 'C:\Program Files\JetBrains\JetBrains Gateway <version>/jre/lib/security/cacerts' -import -alias coder -file <cert># command for Toolbox installation& '%USERPROFILE%\AppData\Local\JetBrains\Toolbox\apps\Gateway\ch-0\<VERSION>\jbr\bin\keytool.exe' '%USERPROFILE%\AppData\Local\JetBrains\Toolbox\bin\jre\lib\security\cacerts' -import -alias coder -file <cert>

macOS example:

keytool -import -alias coder -file cacert.pem -keystore /Applications/JetBrains\ Gateway.app/Contents/jbr/Contents/Home/lib/security/cacerts

Manually Configuring A JetBrains Gateway Connection

This is in lieu of using Coder's Gateway plugin which automatically performsthese steps.

  1. Install Gateway.

  2. Configure the coder CLI.

  3. Open Gateway, make sure SSH is selected under Remote Development.

  4. Click New Connection:

    JetBrains IDEs - Coder Docs (7)

  5. In the resulting dialog, click the gear icon to the right of Connection:

    JetBrains IDEs - Coder Docs (8)

  6. Click + to add a new SSH connection:

    JetBrains IDEs - Coder Docs (9)

  7. For the Host, enter coder.<workspace name>

  8. For the Port, enter 22 (this is ignored by Coder)

  9. For the Username, enter your workspace username.

  10. For the Authentication Type, select OpenSSH config and authenticationagent.

  11. Make sure the checkbox for Parse config file ~/.ssh/config is checked.

  12. Click Test Connection to validate these settings.

  13. Click OK:

    JetBrains IDEs - Coder Docs (10)

  14. Select the connection you just added:

    JetBrains IDEs - Coder Docs (11)

  15. Click Check Connection and Continue:

    JetBrains IDEs - Coder Docs (12)

  16. Select the JetBrains IDE for your project and the project directory. SSH intoyour server to create a directory or check out code if you haven't already.

    JetBrains IDEs - Coder Docs (13)

    Note the JetBrains IDE is remotely installed into~/. cache/JetBrains/RemoteDev/dist

  17. Click Download and Start IDE to connect.

    JetBrains IDEs - Coder Docs (14)

Using an existing JetBrains installation in the workspace

If you would like to use an existing JetBrains IDE in a Coder workspace (or youare air-gapped, and cannot reach jetbrains.com), run the following script in theJetBrains IDE directory to point the default Gateway directory to the IDEdirectory. This step must be done before configuring Gateway.

cd /opt/idea/bin./remote-dev-server.sh registerBackendLocationForGateway

Gateway only works with paid versions of JetBrains IDEs so the script will notbe located in the bin directory of JetBrains Community editions.

Here is the JetBrains articleexplaining this IDE specification.

JetBrains Gateway in an offline environment

In networks that restrict access to the internet, you will need to leverage theJetBrains Client Installer to download and save the IDE clients locally. Pleasesee theJetBrains documentation for more information.

Configuration Steps

The Coder team built a POC of the JetBrains Gateway Offline Mode solution. Hereare the steps we took (and "gotchas"):

1. Deploy the server and install the Client Downloader

We deployed a simple Ubuntu VM and installed the JetBrains Client Downloaderbinary. Note that the server must be a Linux-based distribution.

wget https://download.jetbrains.com/idea/code-with-me/backend/jetbrains-clients-downloader-linux-x86_64-1867.tar.gz && \tar -xzvf jetbrains-clients-downloader-linux-x86_64-1867.tar.gz

2. Install backends and clients

JetBrains Gateway requires both a backend to be installed on the remote host(your Coder workspace) and a client to be installed on your local machine. Youcan host both on the server in this example.

See here for the fullJetBrains product list and builds.Below is the full list of supported --platforms-filter values:

windows-x64, windows-aarch64, linux-x64, linux-aarch64, osx-x64, osx-aarch64

To install both backends and clients, you will need to run two commands.

Backends

mkdir ~/backends./jetbrains-clients-downloader-linux-x86_64-1867/bin/jetbrains-clients-downloader --products-filter <product-code> --build-filter <build-number> --platforms-filter linux-x64,windows-x64,osx-x64 --download-backends ~/backends

Clients

This is the same command as above, with the --download-backends flag removed.

mkdir ~/clients./jetbrains-clients-downloader-linux-x86_64-1867/bin/jetbrains-clients-downloader --products-filter <product-code> --build-filter <build-number> --platforms-filter linux-x64,windows-x64,osx-x64 ~/clients

We now have both clients and backends installed.

3. Install a web server

You will need to run a web server in order to serve requests to the backend andclient files. We installed nginx and setup an FQDN and routed all requests to/. See below:

server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location / { root /home/ubuntu; }}

Then, configure your DNS entry to point to the IP address of the server. For thepurposes of the POC, we did not configure TLS, although that is a supportedoption.

4. Add Client Files

You will need to add the following files on your local machine in order forGateway to pull the backend and client from the server.

$ cat productsInfoUrl # a path to products.json that was generated by the backend's downloader (it could be http://, https://, or file://)https://internal.site/backends/<PRODUCT_CODE>/products.json$ cat clientDownloadUrl # a path for clients that you got from the clients' downloader (it could be http://, https://, or file://)https://internal.site/clients/$ cat jreDownloadUrl # a path for JBR that you got from the clients' downloader (it could be http://, https://, or file://)https://internal.site/jre/$ cat pgpPublicKeyUrl # a URL to the KEYS file that was downloaded with the clients builds.https://internal.site/KEYS

The location of these files will depend upon your local operating system:

macOS

# User-specific settings/Users/UserName/Library/Application Support/JetBrains/RemoteDev# System-wide settings/Library/Application Support/JetBrains/RemoteDev/

Linux

# User-specific settings$HOME/.config/JetBrains/RemoteDev# System-wide settings/etc/xdg/JetBrains/RemoteDev/

Windows

# User-specific settingsHKEY_CURRENT_USER registry# System-wide settingsHKEY_LOCAL_MACHINE registry

Additionally, create a string for each setting with its appropriate value inSOFTWARE\JetBrains\RemoteDev:

JetBrains IDEs - Coder Docs (15)

5. Setup SSH connection with JetBrains Gateway

With the server now configured, you can now configure your local machine to useGateway. Here is the documentation tosetup SSH config via the Coder CLI.On the Gateway side, follow our guide here until step 16.

Instead of downloading from jetbrains.com, we will point Gateway to our serverendpoint. Select Installation options... and select Use download link. Notethat the URL must explicitly reference the archive file:

JetBrains IDEs - Coder Docs (16)

Click Download IDE and Connect. Gateway should now download the backend andclients from the server into your remote workspace and local machine,respectively.

JetBrains Fleet

JetBrains Fleet is a code editor and lightweight IDE designed to support variousprogramming languages and development environments.

See JetBrains' website to learn about Fleet

Fleet can connect to a Coder workspace by following these steps.

  1. Install Fleet
  2. Install Coder CLI
    curl -L https://coder.com/install.sh | sh
  3. Login and configure Coder SSH.
    coder login coder.example.comcoder config-ssh
  4. Connect via SSH with the Host set to coder.workspace-name

    JetBrains IDEs - Coder Docs (17)

If you experience problems, pleasecreate a GitHub issue or share inour Discord channel.

See an opportunity to improve our docs?

Make an edit.

JetBrains IDEs - Coder Docs (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Zonia Mosciski DO

Last Updated:

Views: 5392

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Zonia Mosciski DO

Birthday: 1996-05-16

Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257

Phone: +2613987384138

Job: Chief Retail Officer

Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing

Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.