VS Code Remote - GitMasterNikanjam/C_WiKi GitHub Wiki

What is .vscode-server on Linux?

When you use VS Code Remote features (like Remote-SSH, WSL, or Containers), VS Code does not run fully on your local machine.

Instead:

  • Your local VS Code = UI only
  • A VS Code Server runs on the remote Linux machine

That server lives here (by default):

~/.vscode-server/

Inside it you’ll see things like:

.vscode-server/
β”œβ”€β”€ bin/
β”‚   └── <commit-id>/        # VS Code server binaries
β”œβ”€β”€ extensions/             # Remote extensions
β”œβ”€β”€ data/
└── machineid

Each <commit-id> corresponds to the exact VS Code version on your local machine.


Why VS Code downloads it automatically

When you connect via Remote-SSH:

  1. VS Code checks the local VS Code commit ID

  2. It tries to download a matching vscode-server-linux-x64.tar.gz

  3. It extracts it into:

    ~/.vscode-server/bin/<commit-id>/

If the remote machine has no internet, this download failsβ€”hence the need for offline install.


How to download & install VS Code Server offline

Step 1: Find your local VS Code commit ID

On your local machine:

code --version

Example output:

1.86.2
903fc45b6b5b9c5a87f6f9e6d8a0f4a1d2e3c456
x64

πŸ‘‰ The second line is the commit ID Save it somewhere.


Step 2: Download the VS Code Server tarball (on a machine with internet)

Use this exact pattern:

https://update.code.visualstudio.com/commit:<COMMIT_ID>/server-linux-x64/stable

Example:

wget https://update.code.visualstudio.com/commit:903fc45b6b5b9c5a87f6f9e6d8a0f4a1d2e3c456/server-linux-x64/stable \
     -O vscode-server-linux-x64.tar.gz

Step 3: Copy it to the offline Linux machine

Use scp, USB, or whatever transfer method you have:

scp vscode-server-linux-x64.tar.gz user@remote:/home/user/

Step 4: Install it manually on the remote Linux machine

On the remote machine:

mkdir -p ~/.vscode-server/bin/<COMMIT_ID>

Extract:

tar -xzf vscode-server-linux-x64.tar.gz \
    -C ~/.vscode-server/bin/<COMMIT_ID> \
    --strip-components=1

Set permissions (important):

chmod -R 755 ~/.vscode-server

Step 5: Prevent VS Code from trying to re-download (optional but useful)

Create this file:

touch ~/.vscode-server/bin/<COMMIT_ID>/server.sh

Usually not required, but helps in some restricted setups.


Step 6: Connect again from VS Code

Now reconnect using Remote-SSH.

If everything matches:

  • βœ… No download attempt
  • βœ… VS Code reuses the existing server
  • βœ… Connection succeeds offline

Common issues & fixes

❌ β€œFailed to download VS Code Server”

  • Commit ID mismatch β†’ local VS Code version must match server version

❌ Permission denied

chmod -R 755 ~/.vscode-server

❌ ARM vs x64

Make sure you downloaded the correct architecture:

  • server-linux-x64
  • server-linux-arm64

Check with:

uname -m

Quick summary

  • .vscode-server = backend VS Code running on remote Linux

  • Must match your local VS Code commit

  • Offline install = download tarball β†’ extract into:

    ~/.vscode-server/bin/<commit-id>/
⚠️ **GitHub.com Fallback** ⚠️