Table Of Contents:
What is code-server ?
I am sure that along your coding journey you heard at least one time about code-server witch it is great, but today I am gonna show an alternative solution to that that comes with a secure tunneling service, to eliminate the need of opened ports on the server side. Beside the web interface code-server allow you to connect your local instance of VScode to the remote environment. During the installation your GitHub account will be associated to the secure tunneling service this way only you can access that instance. The code-server can be run that its accessible only from the local network too.
Use cases:
- Behind a firewall where you don't want to change the rules.
- When ssh connections aren't allowed.
- For students like me.
Advantages:
- Hight security
- Support for all VSCode extensions
- Official support from Microsoft
- Easy to deploy and access from remote locations
- Support for AMD64 and ARM64.
Disadvantages:
- The code-server source-code it's not opened source.
- The service it is in a private preview and require to go throw a signup form
Setup:
- Installation:
- For linux and mac OS:
wget -O- https://aka.ms/install-vscode-server/setup.sh | sh
- For Windows(AMD64):
New-Item "$HOME\.vscode-server-launcher\bin" -ItemType "directory" -Force
Invoke-WebRequest "https://aka.ms/vscode-server-launcher/x86_64-pc-windows-msvc" -OutFile "$HOME\.vscode-server-launcher\bin\code-server.exe"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$HOME\.vscode-server-launcher\bin", "User")
- For Windows(ARM64):
New-Item "$HOME\.vscode-server-launcher\bin" -ItemType "directory" -Force
Invoke-WebRequest "https://aka.ms/vscode-server-launcher/aarch64-pc-windows-msvc" -OutFile "$HOME\.vscode-server-launcher\bin\code-server.exe"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$HOME\.vscode-server-launcher\bin", "User")
- Run the code-server:
code-server
Continue the required setup.
Alternative you can run it just for the local network with:
code-server serve-local --host 0.0.0.0 --port 8080
Summery:
Code-Server it's great service for those of you that are familiar with the VSCode and want to have access to their tools and extensions. It's a nice to have service on your development machine with out exposing you to any unnecessary risks, but lacks a service to run it on the start up or in background and its use cases are narrow.
Top comments (0)