Code-server is an open source web-based code editor that allows developers to edit and run code from a web-browser. It is popular for development environments where multiple developers are collaborating on the same project or for working on remote servers. This tutorial will show you how to install code-server on Elementary OS Latest.
Before we begin with the installation, make sure your system is up-to-date by running the following command:
sudo apt update && sudo apt upgrade
Code-server requires Node.js and npm to be installed on your system. They should be installed by default on Elementary OS, but to check if they are installed, run the following command:
node -v && npm -v
If you get a version number of both Node.js and npm, then they are already installed on your system. If not, you can install them using the following command:
sudo apt install nodejs npm
To install code-server, we will need to download the latest release from the GitHub repository. You can download the latest release by visiting the following link: https://github.com/coder/code-server/releases/latest
Once you have the URL for the latest release, use the following command to download the code-server package:
wget https://github.com/coder/code-server/releases/download/3.12.0/code-server-3.12.0-linux-amd64.tar.gz
Note: You will need to replace the URL with the latest release version.
Next, you need to extract the downloaded package using the following command:
tar -xvf code-server-3.12.0-linux-amd64.tar.gz
Again, you need to replace the package name with the name of the downloaded package.
To start code-server, you need to run the following command:
./code-server-3.12.0-linux-amd64/bin/code-server
This should start code-server on your local server on port 8080. You can access code-server through your web browser by typing in the IP address of your server followed by the port number. For example, if your server's IP is 192.168.1.100, you can access code-server by typing in the following URL:
http://192.168.1.100:8080
You will be prompted to enter a password to access code-server for the first time. Enter a strong password and click on the "Sign In" button to proceed.
Once you have successfully installed and started code-server, you can use it to edit and run code directly from your web browser. Code-server includes many popular programming languages, such as Node.js, Python, and Ruby. You can switch between languages using the bottom left corner of the screen.
Congratulations! You have successfully installed code-server on your Elementary OS Latest system. Enjoy using code-server to develop your applications!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!