How to Set Up Cline for VS Code Remote Development
Setting up the Cline extension for Visual Studio Code Remote SSH and WSL environments allows you to run your autonomous AI assistant directly inside remote hosts. This guide explains how to install the extension in remote sessions, configure local models, and manage custom rules across environments. Learn to connect remote Cline instances to Fastio workspaces for versioned, searchable cloud storage.
Remote Execution and the Extension Host Architecture
According to the 2024 Stack Overflow Developer Survey, over 16 percent of professional developers build their projects inside the Windows Subsystem for Linux (WSL). When you combine this with remote virtual machines connected via SSH and cloud-based development environments, a large portion of software engineering now happens off local host operating systems. However, traditional AI coding extensions are designed to run locally, creating immediate bottlenecks when developers attempt to run them across remote boundaries.
VS Code solves this by splitting the editor into two components. The local user interface runs on your machine, while the extension host runs on the remote server or WSL instance. This architecture means workspace extensions, including autonomous agents, run directly in the remote environment rather than on your local computer. Cline must run inside this remote extension host to read files, run tests, and execute shell commands inside your remote workspace.
This architecture prevents the local computer from slowing down during heavy execution, but it introduces data management challenges. By default, all file edits, terminal transcripts, and code changes are stored on your remote server's filesystem. If you switch devices, or if you work with a team, your agent's files and operational history remain locked to that single environment. Traditional options like Git folders, S3 buckets, or consumer cloud folders present problems. Git branches require manual commits and merges, S3 buckets require complex credentials and lack a user interface, and consumer folders do not support semantic search.
To solve this, developers connect remote agents to shared cloud environments. A persistent cloud workspace acts as a central repository where humans and AI agents share files, database schemas, and workflows. Instead of keeping files on local disks, you can direct your agent to output its code, documentation, and test reports to a persistent workspace. This keeps your agent's files accessible across devices and allows teammates to review results. Developers can start syncing their workspaces with a 14-day free trial of Fastio on the pricing page.
Cline VS Code Remote Setup: How to Install in SSH and WSL
To configure Cline in a remote environment, you must install the extension directly inside the active remote session. Even if you have Cline installed on your local operating system, it will not be available in a remote window until you install it on the remote extension host.
Follow these steps to connect and install the extension:
- Open VS Code and connect to your remote host or WSL instance. You can confirm the connection by checking the green status bar indicator in the bottom-left corner of the window.
- Click the Extensions icon on the Activity Bar or press Command+Shift+X on macOS or Control+Shift+X on Windows to open the Extensions view.
- Search for "Cline" in the search box.
- Locate the extension (identifier: saoudrizwan.claude-dev) and click the button labeled "Install in SSH" or "Install in WSL".
- Wait for the process to complete, then verify that the Cline robot icon appears in the remote window's Activity Bar.
Once installed, the remote extension host creates an isolated filesystem space for the agent. This space is located inside the remote home folder under the .vscode-server/extensions/ directory. Cline inherits the shell environment of the remote host. For example, if you connect to an Ubuntu server via SSH, the agent will execute commands using bash or zsh on that server.
The remote server uses its own environment variables and path settings. If your remote project requires custom build tools or runtimes, you must configure them in the remote environment's configuration files, such as ~/.bashrc or ~/.zshrc. Cline will read these configurations when starting terminal sessions.
If you prefer running commands from the system terminal, you can install the CLI version of Cline on the remote machine. Installing the CLI version of Cline requires Nodejs version 20 or higher to manage project files and execute terminal scripts. You can check the remote Nodejs version by running node -v in the remote terminal before initiating the global CLI installation.
Steps to Sync Custom System Rules Across Remote Hosts
A common gap in standard setup guides is the assumption that settings and custom instructions sync automatically. While VS Code Settings Sync synchronizes your main editor settings and extension lists, it does not synchronize local files like your global custom rules directory.
When Cline runs inside a remote extension host, it searches for global rules inside the remote user's home folder, not your local machine. If you have rules saved in ~/Documents/Cline/Rules/ on your local Mac, they will not apply inside a remote SSH session. The remote agent looks for rules inside /home/user/Documents/Cline/Rules/ on the remote Linux host.
To manage custom instructions across local and remote environments, developers use two primary strategies:
Workspace-specific rules: Storing rules in a .clinerules folder at the project root. Because this folder lives inside your repository, the rules are accessible on the remote server when the project is opened. Workspace-specific rules configured inside a .clinerules folder at the project root sync automatically via git. This is the recommended approach for development teams.
Symbolic links: If you rely on global rules, you can create a symbolic link on the remote machine. This link points the remote rules folder to a directory that is synchronized using another method, such as a dotfiles repository.
For example, to configure a symbolic link on a remote Linux server, run the following command in the remote terminal:
ln -s /path/to/synced/rules /home/user/Documents/Cline/Rules
Using workspace-specific rules ensures that your instructions remain version-controlled alongside your code. This configuration prevents the agent from making errors when executing tasks across different development servers.
Additionally, you can define guidelines inside the workspace rules to control how the agent interacts with remote files. Instructing the agent to run tests after modifying files prevents broken code from being committed to the shared repository.
Persist Cline remote workspaces in the cloud
A persistent cloud workspace with an MCP-ready endpoint for your Cline remote files, featuring auto-indexing, semantic search, and version history. Starts with a 14-day free trial.
Guide to Connecting Remote Cline to Fastio Workspaces
To enable collaboration and persistent storage, you can connect your remote Cline agent to a Fastio workspace. Fastio provides persistent storage and shared workspaces built for agentic workflows. By exposing a Model Context Protocol (MCP) server, it acts as a secure storage layer that both humans and agents can access.
To connect Cline on the remote host, you must edit the cline_mcp_settings.json file. You can open this file by clicking the MCP Servers icon in the Cline panel and selecting the configure option. Add Fastio to the mcpServers configuration block using the native Streamable HTTP transport:
{
"mcpServers": {
"fastio-storage": {
"type": "streamableHttp",
"url": "https://mcp.fast.io/mcp/key",
"headers": {
"Authorization": "Bearer your_api_token_here"
},
"disabled": false,
"autoApprove": []
}
}
}
If your network blocks HTTP streaming, you can fall back to the legacy SSE endpoint. Fastio provides a Model Context Protocol (MCP) server, which is detailed on the Fastio agent storage options.
Connecting to a shared cloud workspace provides key advantages:
Intelligence Mode: Fastio automatically indexes all files written by the agent. This enables semantic search and citation-backed RAG chat over the workspace files.
Hybrid Search: The agent can run search queries that combine exact full-text matching with semantic meaning retrieval. This allows it to locate code blocks and documentation files quickly.
Version History: Every file written to the workspace maintains a detailed history. If the agent writes a bug or deletes a file during an autonomous run, you can restore previous versions.
Collaboration: Humans can view files and collaborate in real time using the web UI, while agents interact via the Fastio API or MCP. Teammates can co-edit requirements, design docs, and tasks using Collaborative Notes, which features real-time co-editing with live multiplayer cursors.
By offloading file indexing and search queries to the cloud workspace, you reduce the processing load on your remote development server. This configuration is beneficial when working on small virtual machines with limited CPU and memory resources. Developers can learn more about configuring these parameters by checking the Fastio agent storage options or reading the onboarding instructions.
How to Manage Collaborative Handoffs and Data Extraction
Once your remote development tasks are complete, you must share results with clients or colleagues. Fastio provides the coordination layer where agent output becomes team output, placing humans and AI agents on the same active canvas.
To turn unstructured agent files into a structured database, teams use Metadata Views. This feature allows you to define columns in plain English. The AI designs a typed schema using Text, Integer, Decimal, Boolean, URL, JSON, or Date & Time field types, matches files in the workspace, and populates a spreadsheet. Metadata Views support 7 field types: Text, Integer, Decimal, Boolean, URL, JSON, Date & Time, as detailed on the Metadata Views product page. Both humans and agents can query these views to track progress.
If you need to share files with external QA teams, you can build branded shares that support custom logos, expiration parameters, and password access. These shares allow team members to review code bundles and documentation without needing full access to the development environment.
When your project is complete, you can hand off the workspace. The agent-developer flow allows you to sign up free, build the workspace, and transfer the organization to a human who joins and starts the trial. Fastio pricing plans include Starter at $29/mo, Business at $99/mo, and Growth at $299/mo, each starting with a 14-day free trial. This workflow ensures a smooth transition from automated development to production management.
Frequently Asked Questions
Does Cline work with VS Code Remote SSH?
Yes, Cline works with VS Code Remote SSH. You must install the extension on the remote SSH host after establishing a connection. Once installed, Cline executes commands and manages files directly on the remote server.
How do I install Cline on WSL?
To install Cline on WSL, open a VS Code window connected to your WSL distribution. Access the Extensions view, search for 'Cline', and click 'Install in WSL'. The extension will run inside the Linux environment.
Why do my global Cline rules fail to load in remote sessions?
Global rules do not sync automatically between local and remote hosts. Cline runs on the remote host's extension host and searches for files locally on that machine. You must manually copy the rules or use workspace-level `.clinerules` in the project root.
Related Resources
Persist Cline remote workspaces in the cloud
A persistent cloud workspace with an MCP-ready endpoint for your Cline remote files, featuring auto-indexing, semantic search, and version history. Starts with a 14-day free trial.