Code-Server Install (Debian)

Aus MattWiki

This article shows, how to manually install Coder's Code-Server, a web-based version of Visual Studio Code, to a Debian operating system.

Source

Code-Server on GitHub: https://github.com/coder/code-server

Manual Install

This instructions are based on Coder's original documentation located here:

https://coder.com/docs/code-server/latest/install#debian-ubuntu

curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_$VERSION_amd64.deb
sudo dpkg -i code-server_$VERSION_amd64.deb
sudo systemctl enable --now code-server@$USER
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml

For this to work you have to specify the version which curl should download. You can find the available versions in the releases section of the GitHub repository: https://github.com/coder/code-server/releases

Look for the download links of the assets section.

Lets assume that the version you wish to install is 4.0.0 and the user for which code server should be installed is Bob then the script above should look as follows:

curl -fOL https://github.com/coder/code-server/releases/download/v4.0.0/code-server_4.0.0_amd64.deb
sudo dpkg -i code-server_4.0.0_amd64.deb
sudo systemctl enable --now code-server@$bob
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml

curl downloads the file to the ~/.cache/code-server directory (of your home directory).

Uninstall

Find out which version is currently installed:

dpkg -l code-server

Uninstall

dpkg -r code-server         # Leave config files
dpkg -P code-server         # Purge and delete all config files