Code-server is a popular open-source project that allows you to run a web-based version of Visual Studio Code. It is a perfect solution for developers who prefer to work in a web-based environment. In this tutorial, we will walk you through the steps to install code-server on Manjaro.
Before you begin, make sure that your Manjaro system is up-to-date. You can do this by running the following command in the Terminal:
sudo pacman -Syu
The first step is to install the required dependencies for code-server. You can do this by running the following command in the Terminal:
sudo pacman -S nodejs npm
Next, you need to download and install code-server from the GitHub repository. You can do this by running the following commands in the Terminal:
mkdir ~/code-server
cd ~/code-server
wget https://github.com/coder/code-server/releases/download/v3.9.0/code-server-3.9.0-linux-amd64.tar.gz
tar -xzvf code-server-3.9.0-linux-amd64.tar.gz
To run code-server as a daemon, you need to create a systemd service. You can do this by creating a new file called code-server.service
in the /etc/systemd/system
directory:
sudo nano /etc/systemd/system/code-server.service
Then, paste the following lines into the file:
[Unit]
Description=code-server
After=network.target
[Service]
Type=simple
User=%i
ExecStart=/home/%i/code-server/code-server
Restart=always
[Install]
WantedBy=multi-user.target
Save and close the file.
After creating the systemd service, you need to enable and start it. You can do this by running the following commands in the Terminal:
sudo systemctl enable --now code-server.service
sudo systemctl status code-server.service
You should see the status of the service as active
.
Finally, you can open your web browser and enter the following URL to access code-server:
http://localhost:8080
Log in with your user account credentials, and you should be able to use your favorite editor in your web browser.
In this tutorial, you learned how to install code-server on Manjaro. As you can see, the process is straightforward and easy to follow. Enjoy using code-server for your web development projects!
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!