Skip to content

Remote Development Using SSH

The SSH-based Remote Development functionality enables you to directly use your local PC to access and manage files on remote hosts.

With this functionality, you can fully utilize all of Trae's features, including code completion, navigation, debugging, and AI assistant, to manage remote files, without needing to store the source code from remote hosts on your local PC.

Specifically, when you connect your local PC to the remote host through Trae, the system automatically installs the Trae server on the remote host's operating system. The Trae server operates independently from the existing Trae client on the remote host and includes all necessary background services, ensuring a consistent development experience that matches your local development environment.

Architecture

The SSH remote development setup follows this architecture:

  • Local PC: Runs Trae Client with UI Extensions
  • Remote Host: Runs Trae Server with Workspace Extension, AI Backend, Source Code, Terminal, and Debugger
  • Connection: Secure SSH Tunnel between local PC and remote host

Prerequisites

Make sure that your system meets the following requirements:

Local PC Requirements

  • Make sure that an OpenSSH-compatible SSH client is installed
  • Operating system can be either macOS or Windows

Remote Host Requirements

Currently, only the Linux operating system is supported. The recommended system versions and configurations are:

  • Operating System (Distribution): Debian 10+, Ubuntu 20.04+
  • System Configuration: At least 1 GB of RAM, with a combination of 2 GB and a 2-core CPU being preferable
  • Processor: x64

Important Notes:

  • Operating systems below the required versions (such as Debian 8, Ubuntu 16, and more) will prevent you from using AI features, including Inline Chat, Side Chat, Builder mode, auto-completion, and AI-generated Git commit messages. There may also be compatibility issues with other features. If you encounter any problems of this kind, feel free to provide feedback at feedback@email.trae.ai.
  • Distributions from other vendors (such as CentOS and RHEL) and operating systems (such as Windows and macOS) will be gradually supported in the future. For additional support, please contact feedback@email.trae.ai.

Additional Requirements

  • Make sure that the remote server has an SSH server installed and is running
  • To ensure that the Trae Server functions properly, the remote host must have outbound HTTPS access (through port 443). This connection is primarily used for communication between Trae Server and external endpoints for service updates and extension support
  • Certain extensions may have additional requirements for better connectivity

Connect to a Remote Host

After connecting to the remote host from your local PC, you can develop content for the files on the remote host directly from your local PC.

Step 1: Add Remote Host

  1. Open the Remote Explorer and click the + button
  2. The Enter SSH Connection Command panel appears
  3. Fill in the SSH connection command and press the Enter key
  4. The remote host has been added. A relevant prompt appears at the bottom right and the address of the remote host appears in the SSH Targets list

Step 2: Connect to Host

  1. In the prompt at the bottom right, click the Connect button; or hover the cursor on the host address in the SSH Targets list and click the Connect to Host in New Window icon at the right
  2. The password input panel appears
  3. Fill in the password and press the Enter key

Note: It is recommended to use key-based authentication to enhance security. Passwords will not be saved in Trae and will need to be re-entered each time you want to connect to the remote host.

Step 3: Start Development

  1. Trae begins to connect to the remote host. Once connected, the address of the remote host appears at the bottom left
  2. Open the folders existing on the remote host and start remote development on your local PC

Disconnect from a Remote Host

You can disconnect from a remote host in two ways:

  1. Exit Trae directly: The next time you open it, you will be prompted to complete the remote connection first
  2. Use menu: In the top menu bar, select File > Close Remote Connection

Set Up or Delete a Connected Remote Host

Click the Configure icon in the Remote Explorer, and then configure or delete the remote host in the config file.

Quick Access Panel

You can open the Remote SSH quick access panel using shortcut Alt + Ctrl + O. On this panel, you can initiate the tasks of connecting to a remote host, opening the SSH configuration file, and more.

Additional Features

Manage Extensions for a Remote Host

Extensions can run separately on the local PC and the remote host:

  • Local extensions: Extensions that provide user interface-related functionalities typically run on the local PC
  • Remote extensions: Extensions for language support, debugging tools, and similar functionalities run on the remote host

In the Extension Store, you can view the list of installed extensions for both the local PC and the remote host, then you can manage them as needed.

Open a Terminal on a Remote Host

From the top menu bar, select Terminal > New Terminal to open a terminal running on the remote host, and then execute your commands.

Debugging on Remote Host

After connecting to the remote host, you can use Trae's debugging features, which are similar to local debugging. You need to select the launch configuration in the launch.json file and press F5 to start debugging. The application will be launched on the remote host, and the debugger will be attached to it.

Your Ultimate AI-Powered IDE Learning Guide