How to install vscode-server offline on a server for vscode version 1.82.0?

2.9k Views Asked by At

In previous versions, it was sufficient to install the remote-ssh extension and then download the vscode-server-linux-x64.tar.gz file, extract it, and copy it to the server directory ~/.vscode-server/bin/${COMMIT}/. However, it seems that this method is no longer effective for newer versions. Does anyone know the method for offline installation of the new version on a server?

After upgrading to version 1.82.0 of VS Code on Windows, I tried to access an SSH server project directory that I had previously opened.

Upon clicking on the "Details" button in the progress dialog in the bottom right corner, and then navigating to the "Output" tab in the terminal pane, I discovered that the following output was printed: "waiting for vscode-cli-${COMMIT}.tar.gz.done and vscode-server.tar.gz exist".

I downloaded the linux-x64 version of vscode-cli from https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64, and the downloaded file was named "vscode-cli-alpine_x64_cli.tar.gz". although it is also possible to download it from the vscode official website. On the download page, there are different installation packages available for Linux, such as .deb, .rpm, etc. At the bottom of the page, it is also possible to find a "CLI" version available for download.

Then downloaded the vscode-server-linux-x64.tar.gz from https://update.code.visualstudio.com/commit:${COMMIT}/server-linux-x64/stable, and the downloaded file was named "vscode-server-linux-x64.tar.gz".

If the process times out before the message "waiting for vscode-cli-${COMMIT}.tar.gz.done and vscode-server.tar.gz exist" appears, you will need to reopen the SSH project and wait for the message to appear again before proceeding. Once the message appears, execute the command "cp vscode-cli-alpine_x64_cli.tar.gz ~/.vscode-server/vscode-cli-${COMMIT}.tar.gz.done" on the server. This will generate a new file named "code-${COMMIT}" in the directory "~/.vscode-server/".

Afterwards, execute the command "mkdir -p ~/.vscode-server/cli/servers/Stable-${COMMIT}/server" to create a directory, then "tar xf vscode-server-linux-x64.tar.gz" to extract the contents of the archive and obtain a directory named "vscode-server-linux-x64". Use the command "mv vscode-server-linux-x64 ~/.vscode-server/cli/servers/Stable-${COMMIT}/server" to move the directory to the correct location. Finally, restart VS Code to complete the process.

As mentioned earlier, "${COMMIT}" refers to the current commit ID of VS Code, which can be found by clicking on "Help" -> "About" -> "Commit" in the top menu. When performing the actual operation, you need to replace "${COMMIT}" with the corresponding commit ID. For example, the commit ID for version 1.82.0 is actually 8b617bd08fd9e3fc94d14adb8d358b56e3f72314.

1

There are 1 best solutions below

0
On

Pls try reinstall older version.

I encounderd with the same problem. I was orignally using vscode 1.81.0 on mac, 1.81.0 on ubantu. However, it might be brew that upgrade my vscode to 1.82.2 and now I can't log into my server. It all happens over one night. I reinstall the 1.81.0 and it works.

I am a big fan of microsoft, it provides interesting tricks with all its products, making my work and life harder. Hope the founder can be micro and soft.