|
| 1 | +# IDEs |
| 2 | + |
| 3 | +The following desktop IDEs have been tested with Coder, though any IDE with SSH |
| 4 | +support should work: |
| 5 | + |
| 6 | +- VS Code (with [Remote - |
| 7 | + SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) |
| 8 | + extension) |
| 9 | +- JetBrains (with |
| 10 | + [Gateway](https://www.jetbrains.com/help/idea/remote-development-a.html#launch_gateway) |
| 11 | + installed) |
| 12 | + - IntelliJ IDEA |
| 13 | + - CLion |
| 14 | + - GoLand |
| 15 | + - PyCharm |
| 16 | + - Rider |
| 17 | + - RubyMine |
| 18 | + - WebStorm |
| 19 | + |
| 20 | +## SSH configuration |
| 21 | + |
| 22 | +> Before proceeding, run `coder login <accessURL>` if you haven't already to |
| 23 | +> authenticate the CLI with the web UI and your workspaces. |
| 24 | +
|
| 25 | +To access Coder via SSH, run the following in the terminal: |
| 26 | + |
| 27 | +```console |
| 28 | +coder config-ssh |
| 29 | +``` |
| 30 | + |
| 31 | +> Run `coder config-ssh --diff` if you'd like to see the changes that will be |
| 32 | +> made before proceeding. |
| 33 | +
|
| 34 | +Confirm that you want to continue by typing **yes** and pressing enter. If |
| 35 | +successful, you'll see the following message: |
| 36 | + |
| 37 | +```console |
| 38 | +You should now be able to ssh into your workspace. |
| 39 | +For example, try running: |
| 40 | + |
| 41 | +$ ssh coder.<workspaceName> |
| 42 | +``` |
| 43 | + |
| 44 | +Your workspace is now accessible via `ssh coder.<workspace_name>` (e.g., |
| 45 | +`ssh coder.myEnv` if your workspace is named `myEnv`). |
| 46 | + |
| 47 | +## VS Code Remote |
| 48 | + |
| 49 | +Once you've configured SSH, you can work on projects from your local copy of VS |
| 50 | +Code, connected to your Coder workspace for compute, etc. |
| 51 | + |
| 52 | +1. Open VS Code locally. |
| 53 | + |
| 54 | +1. Install the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) |
| 55 | + extension. |
| 56 | + |
| 57 | +1. In VS Code's left-hand nav bar, click **Remote Explorer** and right-click on |
| 58 | + a workspace to connect. |
| 59 | + |
| 60 | +## VS Code in the browser |
| 61 | + |
| 62 | +> You must have Docker Desktop running for this template to work. |
| 63 | +
|
| 64 | +Coder offers a [sample template that includes |
| 65 | +code-server](../examples/templates/docker-code-server/README.md). |
| 66 | + |
| 67 | +To use: |
| 68 | + |
| 69 | +1. Start Coder: |
| 70 | + |
| 71 | + ```console |
| 72 | + coder server --dev |
| 73 | + ``` |
| 74 | + |
| 75 | +1. Open a new terminal and run: |
| 76 | + |
| 77 | + ```console |
| 78 | + coder templates init |
| 79 | + ``` |
| 80 | + |
| 81 | +1. Select the **Develop code-server in Docker** option when prompted. |
| 82 | + |
| 83 | +1. Navigate into your new folder and create your sample template: |
| 84 | + |
| 85 | + ```console |
| 86 | + cd code-server-docker && coder templates create |
| 87 | + ``` |
| 88 | + |
| 89 | + Follow the prompts that appear in the terminal. |
| 90 | + |
| 91 | +1. Create your workspace: |
| 92 | + |
| 93 | + ```console |
| 94 | + coder create --template="docker-code-server" [workspace name] |
| 95 | + ``` |
| 96 | + |
| 97 | +1. Log into Coder's Web UI, and open your workspace. Then, |
| 98 | + click **code-server** to launch VS Code in a new browser window. |
| 99 | + |
| 100 | +## JetBrains Gateway with SSH |
| 101 | + |
| 102 | +If your image |
| 103 | +[includes a JetBrains IDE](../admin/workspace-management/installing-jetbrains.md) |
| 104 | +and you've [set up SSH access to Coder](./ssh.md), you can use JetBrains Gateway |
| 105 | +to run a local JetBrains IDE connected to your Coder workspace. |
| 106 | + |
| 107 | +> See the [Docker sample template](../examples/templates/docker/main.tf) for an |
| 108 | +> example of how to refer to images in your template. |
| 109 | +
|
| 110 | +Please note that: |
| 111 | + |
| 112 | +- Your Coder workspace must be running, and Gateway needs compute resources, so |
| 113 | + monitor your resource usage on the Coder dashboard and adjust accordingly. |
| 114 | +- If you use a premium JetBrains IDE (e.g., GoLand, IntelliJ IDEA Ultimate), you |
| 115 | + will still need a license to use it remotely with Coder. |
| 116 | + |
| 117 | +1. [Download and install JetBrains Toolbox](https://www.jetbrains.com/toolbox-app/). |
| 118 | + Locate JetBrains Gateway in the Toolbox list and click **Install**. |
| 119 | + |
| 120 | +1. Open JetBrains Gateway and click **Connect via SSH** within the **Run the IDE |
| 121 | + Remotely** section. |
| 122 | + |
| 123 | +1. Click the small **gear icon** to the right of the **Connection** field, then |
| 124 | + the **+** button on the next screen to create a new configuration. |
| 125 | + |
| 126 | +1. Enter your Coder workspace alias target in **Host** (e.g., |
| 127 | + `coder.<yourWorkspaceName>`), `22` in **Port**, `coder` in **User name**, and change |
| 128 | + **Authentication Type** to **OpenSSH config and authentication agent**. Leave |
| 129 | + the local port field blank. Click **Test Connection**. If the test is |
| 130 | + successful, click **Ok** at the bottom to proceed. |
| 131 | + |
| 132 | +1. With your created configuration in the **Connection** chosen in the drop-down |
| 133 | + field, click **Check Connection and Continue**. |
| 134 | + |
| 135 | +1. Select a JetBrains IDE from the **IDE version** drop-down (make sure that you |
| 136 | + choose the IDE included in your image), then click the folder icon and select the |
| 137 | + `/home/coder` directory in your Coder workspace. Click **Download and Start |
| 138 | + IDE** to proceed. |
| 139 | + |
| 140 | +1. During this installation step, Gateway downloads the IDE and a JetBrains |
| 141 | + client. This may take a couple of minutes. |
| 142 | + |
| 143 | +1. When your IDE download is complete, JetBrains will prompt you for your |
| 144 | + license. When done, you'll be able to use your IDE. |
0 commit comments