GoLand 2024.1 Help

Work inside remote project

A remote project gets opened in JetBrains Client as it would be opened in your local GoLand IDE. You can develop it like any other local project: edit code, run applications, debug, and deploy.

Remote project

If you want to find more about the Remote Development processes and architecture in general, refer to Remote development overview.

Add an SDK to the opened project

When you first open a project, GoLand displays a notification suggesting to add the project SDK.

  1. Open the remote session.

  2. In the main menu, go to File | Project Structure.

  3. In the Project Structure dialog, select Project, and from the available options, configure the project's SDK.

  4. Click OK to save the changes. GoLand downloads the configured SDK to the remote server. The next time you open your project, the downloaded SDK will be used automatically in the remote session.

Add VM options

You can adjust VM options for the remote project, especially if you want to increase the -Xmx memory size when working with a larger project. You need to perform those actions and save your changes on the remote server.

  1. In the main menu, go to Help | Edit Custom VM Options (On Host).

  2. Edit the goland64.vmoptions file.

    For example, change the -Xmx2048 option to -Xmx3072.

    For more information on VM options, refer to Advanced configuration.

  3. Restart your IDE on the remote server to see the changes.

  4. You may increase memory settings manually if your remote project doesn't start properly.

Sign in to the GitHub on the remote backend

  1. Press Ctrl+Alt+S to open settings and then select Version Control | GitHub.

  2. Click Add Account, select the authorization method and sign in to your GitHub account.

    the GitHub settings

Close the Remote Development session

  • Click the Close button to close the remote session window.

    You are returned to the JetBrains Gateway welcome screen where you can use the Recent SSH projects page to reconnect to your remote session or stop the running instance.

Create multiple connections

You can create multiple connections to the same remote host and the same version of the IDE. You can also have connections with different IDE versions and remote hosts.

  1. Connect and open a remote session.

  2. Since JetBrains Gateway is constantly active once you have connected to the remote server, you can click its icon to open the JetBrains Gateway welcome screen and configure other connections.

    If you connect to the same IDE version, then JetBrains Client will be opened as an instance of the same process. If you connect to a different remote host or IDE version, a different remote session will be launched.

Install plugins

You can install plugins that you need on the remote server. Note that plugins are installed per project. Each time you create a remote connection for a new project, you need to install the desired plugin.

Based on the scenario that you use for downloading GoLand on the remote server, you either install the plugin via the command line or use the UI of a remote project for your installation.

Install a plugin via the command line

If you manually configure GoLand on the remote server, use the following steps to add plugins:

  1. From JetBrains Marketplace page, find a page of the required plugin, select the Versions tab, and click any version to copy pluginId (short name such as org.rust.lang) of the plugin you want to install.

  2. Open the remote server, go to the GoLand instance where your project resides, and for which you want to download and install a third-party plugin.

    By default, the downloaded GoLand instances are located in the following directory:

    ~/.cache/JetBrains/RemoteDev/dist
  3. Add the following command:

    bin/remote-dev-server.sh installPlugins PROJECT_PATH pluginId

    (where PROJECT_PATH is a path to your remote project and pluginId is an ID you got from JetBrains Marketplace page.)

    After the installation, unpack the downloaded plugin's archive.

    By default, the installed plugin is placed into the following folder on the backend:

    ~/.cache/JetBrains/RemoteDev-IU/PROJECT_PATH/plugins/
  4. Continue with launching JetBrains Gateway and opening the remote project with the remotely installed plugin.

Install a plugin via UI

If you use JetBrains Gateway to download GoLand to a remote server, use the following steps to install plugins.

  1. Open a remote project in JetBrains Client.

  2. Press Ctrl+Alt+S to open settings and then select Plugins On Host.

  3. Download the needed plugin the same way as you would in a regular GoLand project.

    The Plugins settings dialog

    For more information about regular plugin installation, refer to Plugins.

  4. After you download and enable the plugin, click OK to save the changes.

    The plugin is installed remotely. However, keep in mind that the plugin is installed per project.

Backend control center

When you work with your remote project, you can check the status of the remote server. That means you can check the CPU load, disk, and memory consumption on your backend. You can also add heap size and restart the remote backend right from JetBrains Client.

You can also see a list of ports forwarded in your project.

After opening your remote project, the name of your backend, memory and latency indicators are displayed on the main toolbar.

main toolbar

Work with the control center window

  1. In JetBrains Client, on the main toolbar, click the name of the remote server to open the backend control window.

    Backend Status Details
  2. On the Performance tab, check the status of CPU load, memory consumptions, and the disk space.

    • Ping: this is a time indicator that shows how much time it takes to transfer data between JetBrains Client and the remote server using RD protocol.

    • CPU Load: this is an indicator of how many processes are executed by CPU.

    • Memory (RAM): this is an indicator that shows the RAM state of the remote server. If the memory limit is reached, you need to access your remote server and increase RAM or terminate processes that consume it.

    • Disk: this is an indicator of how much disk space is used by the remote server.

  3. Click the Ports tab to see the status, number and the name of the forwarded ports.

  4. Click the Output tab to see the last 2500 symbols of the log file from the remote server.

    This information helps you to see the end of log file and potential errors or issues that might have occurred.

    the Output tab
  5. If you want to increase the heap memory size, click the Settings tab and in the Maximum heap size field, add the needed amount of memory and click Save and Restart to apply the changes. Alternatively, you can click Save if you don't want to restart the backend immediately.

    the Settings tab

If you encounter a problem working in JetBrains Client, you can open a main tool window of the backend IDE and try to fix your problem there.

Access the backend IDE UI

  1. In JetBrains Client, on the main toolbar, click the name of the remote server to open the Backend control window.

  2. In the window that opens, click More options and select Show Main Window.

    The main window of the backend IDE gets projected. Now you can use it to access remote settings and configure various remote options if you couldn't do that in JetBrains Client.

Manage credential storage mechanisms on a remote backend

You can configure how to manage your passwords on the remote server and override the default configuration.

By default, the KeePass manager is used for storing password information on the backend as you can see in the backend password settings.

You can create a file to store the information about available and the default authentication storage mechanisms and use it to override the ones provided by the system.

For example, the KEEPASS mechanism keeps everything on the hard disk, which is a bit of a downside. However, if you want to save credentials (database credentials, GitHub tokens, and so on) between the IDE restarts, the KEEPASS mechanism should be your choice.

On the other hand, the IN_MEMORY mechanism lets you keep everything inside the memory of the running IDE, and clears everything on the IDE restart. Nothing gets saved on the hard disk, which is safer.

Set up a file to store the credential storage mechanisms for all backends

  1. Create the CredentialStore directory and the following settingName files:

    • defaultProvider: for the default password storage mechanism. The file will contain one value from (MEMORY_ONLY, KEYCHAIN, KEEPASS)

    • availableProviders: for the available password storage mechanisms. The file will contain comma-separated values from (MEMORY_ONLY, KEYCHAIN, KEEPASS)

    You can create the files on your local OS and copy them to the remote server or create such files directly on the remote server.

  2. Add the created files to the remote server. If you created the files on your local system, then you can use the following command in the terminal to copy the files to the needed location on your remote server:

    scp source/filename [username]@[host]: destination

    The location of the files on the remote backend is as follows:

    • $HOME/.config/JetBrains/CredentialStore/settingName (for the user-specific settings)

    • /etc/xdg/JetBrains/CredentialStore/settingName (for the system-wide settings)

  3. After you've added the files to the remote server, the password settings will display only the default and the available password storage providers.

Access remote password settings

  1. Open main window and click File | Settings.

  2. Select Appearance   Behavior | Passwords.

  3. The Passwords settings page displays the default mechanisms to store your credentials, which you can use to configure the settings.

  4. Click OK to save the changes.

Last modified: 11 February 2024