Server: The server you want to install VSCode Server on.
Background: Host is connected to internet, with VSCode and extensions (Remote - SSH, Remote - Containers, etc.) installed. Server is not connected to internet, but can be accessed by Host through SSH.
If your vscode binary is in env:PATH, you can get the version and commit-id by running the following command:
1
code --version
Or if not, open vscode, click Help => About, find the version and commit-id in the pop-up window:
1.2. If Your VSCode Version is Less than 1.19 (e.g, 1.18.1)#
Download vscode-server-linux-x64 with the following link and send it to the server:
1
2
3
4
5
6
# If Linuxwget https://update.code.visualstudio.com/commit:<commit-id>/server-linux-x64/stable
# Or Windowscurl -O https://update.code.visualstudio.com/commit:<commit-id>/server-linux-x64/stable
# Send "./stable" from host to "~" on server and rename it to "~/vscode-server.tar.gz"scp -P <port> ./stable <username>@<server-ip>:~/vscode-server.tar.gz
On the Server:
1
2
3
4
5
6
# Create directory "~/.vscode-server/bin"mkdir -p ~/.vscode-server/bin
# Extract "~/vscode-server.tar.gz" to "~/.vscode-server/bin"cd ~/.vscode-server/bin/ && tar -xzf ~/vscode-server.tar.gz
# Rename the extracted directory to "~/.vscode-server/bin/<commit-id>"mv ./vscode-server-linux-x64 ./<commit-id>
Go back to host and connect to your server again, and everything should be okay.
Download vscode-server-linux-x64 with the following link and send it to the server:
1
2
3
4
5
6
# If Linuxwget https://update.code.visualstudio.com/commit:<commit-id>/server-linux-x64/stable
# Or Windowscurl -O https://update.code.visualstudio.com/commit:<commit-id>/server-linux-x64/stable
# Send "./stable" from host to "~" on server and rename it to "~/vscode-server.tar.gz"scp -P <port> ./stable <username>@<server-ip>:~/vscode-server.tar.gz
Download vscode-cli with the following link and send it to the server:
1
2
3
4
5
6
# If Linuxwget https://update.code.visualstudio.com/commit:<commit-id>/cli-alpine-x64/stable
# Or Windowscurl -O https://update.code.visualstudio.com/commit:<commit-id>/cli-alpine-x64/stable
# Send "./stable" from host to "~" on server and rename it to "~/vscode-cli.tar.gz"scp -P <port> ./stable <username>@<server-ip>:~/vscode-cli.tar.gz
On the Server:
1
2
3
4
5
6
7
8
9
10
# Create directory "~/.vscode-server/cli/servers/Stable-<commit-id>"mkdir -p ~/.vscode-server/cli/servers/Stable-<commit-id>
# Extract "~/vscode-cli.tar.gz" to "~/.vscode-server"cd ~/.vscode-server && tar -xzf ~/vscode-cli.tar.gz
# Rename the extracted binary to "~/.vscode-server/code-<commit-id>"mv ./code ./code-<commit-id>
# Extract "~/vscode-server.tar.gz" to "~/.vscode-server/cli/servers/Stable-<commit-id>"cd ~/.vscode-server/cli/servers/Stable-<commit-id> && tar -xzf ~/vscode-server.tar.gz
# Rename ".../vscode-server-linux-x64" to ".../server"mv ./vscode-server-linux-x64 ./server
Go back to host and connect to your server again, and everything should be okay.