Visual Studio Code Server: Access VS Code Remotely Without SSH

The Visual Studio Code Server is a powerful service that allows you to run VS Code on a remote development machine, whether it’s your desktop PC or a cloud-based virtual machine (VM). This innovative tool enables you to securely connect to that remote environment from anywhere using a local VS Code client, eliminating the traditional requirement for SSH access.

Understanding the VS Code Server

At its core, VS Code is designed to empower users by providing seamless access to the environments that maximize their productivity. The VS Code Remote Development extensions epitomize this philosophy, allowing you to work within Windows Subsystem for Linux (WSL), remote servers via SSH, and even development containers, all directly from your familiar VS Code interface. These extensions function by installing a server component on the remote environment, facilitating smooth interaction between your local VS Code instance and the remote source code and runtime environments.

Building upon this robust foundation, the standalone “VS Code Server” emerges as a distinct service. It incorporates the same underlying server technology utilized by the remote extensions but extends its capabilities with additional features. These enhancements include an interactive Command Line Interface (CLI) and streamlined mechanisms for establishing secure connections, particularly beneficial for accessing vscode.dev.

VS Code.dev connected to VS Code Server running on a remote machine, enabling browser-based coding.

Architecture of the VS Code Server

Our vision is to deliver a consistent and unified VS Code experience regardless of how you choose to use the editor. Whether you are working locally or remotely, on a desktop application or within a web browser, the core experience remains seamless.

Access to the VS Code Server is intrinsically built into the existing code CLI. This command-line interface is the gateway to establishing tunnels between your local VS Code client and your remote machine. Tunneling, in essence, creates a secure conduit for transmitting data between networks, ensuring the safety and integrity of your development environment.

VS Code Server architecture diagram showing the code CLI establishing a tunnel for secure remote development access.

The complete VS Code Server experience is composed of several key components working in concert:

  • VS Code Server: This is the backend engine that powers VS Code’s remote capabilities, handling the heavy lifting of remote development.
  • Remote – Tunnels extension: Automatically installed in your local VS Code client, this extension is responsible for managing and facilitating the connection to the remote machine running the VS Code Server.

Use Case Scenarios for VS Code Server

The VS Code Server unlocks a range of new and exciting ways to utilize VS Code, expanding its accessibility and flexibility:

  • Development in Restricted Environments: Ideal for scenarios where SSH access to a remote machine is limited or unavailable, or when you require web-based access to your development environment.
  • Access from Limited Devices: Enables development on machines that may not support the installation of the full VS Code desktop application, such as iPads, tablets, or Chromebooks. This broadens the devices you can use for coding.
  • Enhanced Client-Side Security: Leverage the inherent security advantages of client-side execution, where all code operations are confined within the browser’s secure sandbox environment.

Getting Started with VS Code Server

There are two primary methods to initiate tunneling and begin using the VS Code Server. Each approach is detailed in dedicated documentation to guide you through the setup process:

Exploring VS Code Server Features

Licensing and Command-Line Interface

Upon the initial execution of the VS Code Server, you will be presented with the software license terms. You can review the complete license for the VS Code Server at https://aka.ms/vscode-server-license.

* Visual Studio Code Server * * By using the software, you agree to * the Visual Studio Code Server License Terms (https://aka.ms/vsCode-server-license) and * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).

To discover the full range of commands available through the CLI, simply run code -h in your terminal. For commands specifically related to tunneling with the VS Code Server, use code tunnel -help:

Output of ‘code tunnel -help’ CLI command, showcasing available options for managing VS Code Server tunnels.

Extension Commands

Similar to the CLI, the VS Code Remote Tunnels extension offers a set of commands that you can explore directly within VS Code. Open the Command Palette (F1) and type Remote Tunnels to access and investigate these commands. Further information can be found in the Remote Tunnels documentation.

Telemetry and VS Code Server

If you prefer to disable telemetry data collection, you can include the --disable-telemetry flag when launching the VS Code Server: code tunnel --disable-telemetry. Alternatively, to specify a particular telemetry level, such as collecting only error reports, use the --telemetry-level flag followed by the desired level (e.g., code tunnel --telemetry-level error).

If telemetry is not explicitly disabled via the CLI, the VS Code Server will dynamically adapt to and respect the telemetry settings configured in your VS Code client (whether in vscode.dev or the desktop application) once a successful connection is established.

Frequently Asked Questions about VS Code Server

Is VS Code Server designed for concurrent multi-user access to a single remote instance?

No, each instance of the VS Code Server is intentionally designed for access by a single user at a time. It is not built for multi-user collaboration on the same remote server instance.

Can I self-host the VS Code Server as a service?

No, self-hosting the VS Code Server as a persistent service is explicitly prohibited under the VS Code Server license. It is intended for on-demand, user-initiated sessions.

Is there a comprehensive list of network endpoints used by the VS Code Server?

Yes, if you are operating within a network environment with restricted access, you may need to ensure that the VS Code Server has the necessary permissions to access specific endpoints. Detailed information about these endpoints can be found in the following articles: [Links to be inserted here based on original article if available].

Are there limitations on VS Code extensions when using VS Code Server?

Yes, certain types of extensions, specifically pure UI extensions, are not supported when using a web-based instance of VS Code connected via VS Code Server. For extension authors seeking deeper technical details, the Remote Development guide provides valuable insights.

Are there browser-specific limitations when using VS Code Server with vscode.dev?

Yes, when working within a browser-based VS Code environment, there are specific limitations and configuration considerations to be aware of. The VS Code for the Web documentation provides detailed information on browser-related aspects.

How do I ensure my VS Code Server remains up-to-date?

VS Code will proactively notify you within the application when you connect to your remote machine if a VS Code Server update is available. You can then conveniently initiate the update process directly through this notification.

I encountered an error message related to keyring storage. What steps should I take?

Settings Sync functionality relies on authentication against a dedicated Settings Sync server. The associated security credentials are securely stored on the server, which necessitates setting up a keyring. If a keyring is not configured, the VS Code Server will default to using an in-memory secret storage mechanism, which is only persistent for the duration of the server session.

This issue provides more context and troubleshooting guidance. If you continue to experience difficulties, please don’t hesitate to open a new issue in the VS Code Remote GitHub repo.

Where can I provide feedback or report issues related to VS Code Server?

For any issues or feedback regarding the VS Code Server, please submit an issue in the VS Code Remote GitHub repo. When reporting an issue, including verbose logging can be highly beneficial for debugging. You can enable verbose logging by launching the VS Code Server with the -v flag: code -v tunnel.

To specifically filter for issues related to VS Code Server, you can use the code-server label within the GitHub repository.

Last Updated: 02/06/2025

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *