How to Install VS Code-Server on AlmaLinux | Rocky Linux 8 – H2S Media

Install Code-Server on Almalinux 8 or Rocky Linux 8 server to run VS Code using Web browser with the help of command terminal and script.

Microsoft Visual Studio Code is a free editor for various different but popular programming languages. Code-Server is an open source platfrom that includues VS Code to run with a server-side process in the browser.  This platform uses is a web server that can be started from any location and then accessed via a browser. The editor then works on the server-side file system. Microsoft doesn’t allow access to its own marketplace, although most of the extensions found there are open source therefore, the user can install them directly from the web inteface of Code-Server, further, installation of extensions is also possible by directly importing VSIX package.

To start working with Code Server- we just only need to start its instaces installed either on cloud, desktop, laptop, server, container or virtual machine. Network access to it is of course also necessary.

Steps to install VS Code-Server on Almalinux 8 or Rocky Linux 8

The commands given here can be used on other Redhat based Linux systems such as CentOS, Oracle Linux… running locally or on cloud (AWS, GCP, DigitalOcean etc.).

1. Requirements

There is no unique requirement to install Code-Server, just the regular ones:

Almalinux | Rocky Linux |Redhat | CentOS server or desktop
A non-root user with sudo rights
1 GB of RAM coupled with 2 CPU cores

2. Run system update

As usual before starting any tutorial run the system update command to ensure all the installed packages are up to date. This will also reresh the system repository cache.

sudo dnf update -y

Also install Curl & nano tool

sudo dnf install curl nano -y

3. Install Code-server on AlmaLinux or Rocky 8

Instead of downloading Code-Server RPM package manbaully, let use the script that automciatlly fetch the required packages and after that installs the same. Hence, less manual work need to do.

curl -fsSL https://code-server.dev/install.sh | sh

Wait for few seconds, the script will setup everything including the systemd service for VS Code server.

Install vs code server rocky or Almalinux 8

4. Start Systemd VS Code-server service

Once the script completed the process, we have to start the service created by it for Code-Server. Witthout starting it we won’t be able to access this web-based VS code editor.

sudo systemctl start [email protected]$USER

In case those who want to start its service automatically with system boot, they also need to enable it; here is the command:

sudo systemctl enable [email protected]$USER

To check the status:

sudo systemctl status [email protected]$USER

5. Access VS Code Web Interface

By default, the VS code server will only allow to access its web interface using the localhost, hence, if you are using a CLI server or want to access VS code out side your home or office network then edit its YML file. It is a configuration file.

nano ~/.config/code-server/config.yaml

Change 127.0.0.0 to 0.0.0.0.

Access VS Code Server Web Interface

Save the file Ctrl+O, hit the Enter and then use Ctrl+X to exit.

Restart Code server service:

sudo systemctl restart [email protected]$USER

6. Allow ports in Firewall

The default port used by Code-Server is 8080, we need to open it in the system firewall to access VS Code remotely. Also, if you are planning to use some domain name over http/https, then open port 80 & 443 as well.

sudo firewall-cmd --add-port={8000,80,443}/tcp --permanent

To apply change refresh the firewall.

sudo firewall-cmd --reload

Now, open any web bowser and point it to the serevr IP-address along port 8080 where you have installed the Code-server Instance.

For example:

http://server-ip-addres:8080

Note: server-ip-addres replace wiht your actual address.

6. Login Code Server running on Almalinux | Rocky Linux 8

You would already have the login interface of Code Server. There you have to enter the password which you will get again in the YML confgiuration file:

nano ~/.config/code-server/config.yaml

Copy the password given in the file and enter to login.

VS code server login password

VS code server installation on Almalinux or Rocky Linux 8

7. How to upgrade

Well this VS code web platform has not been installed using the system repsitory, hence, it is not possible to update or upgrade Code-Server using the dnf update commnad. Therefore whenever you want to install the latest version, simply run the follwing script.

Don’t worry this will not remove user data resides in ~/.local/share/code-server

curl -fsSL https://code-server.dev/install.sh | sh

8. Use Let’s Encryot with Nginx

Well, if you are planning to use already exists sub-domain & Cloudflare then you don’t need Nginx or Let’s necrypt; simply point A record of your DNS to yoru Serevr ip-address.

Nevertheles, if you own DNS and Domain to use with Code-Server then install Nginx as a reverse proxy and then Let’s encrypt, here is the offcial Guide on it.

9. Uninstall or Remove Code-server

When you don’t require this VS code server on your system anymore then completely remove the same using the dnf package manager.

sudo dnf remove code-server

Delete data:

rm -rf ~/.local/share/code-server ~/.config/code-server rm -rf ~/.local/lib/code-server-*

Other Articles:

Install Code-Server for VS code on Ubuntu 22.04 or 20.04 LTS
2 Ways to install VS code on Debian 11 Bullseye Linux
4 Ways to install VS Code Editor on Ubuntu 22.04 | 20.04 LTS

Source of this news: https://www.how2shout.com/linux/how-to-install-vs-code-server-on-almalinux-rocky-linux-8/

Related posts:

‘If I don’t do it, who’s headed to help them? ’: Maryland workforce works to ensure equity wearing C...
These efforts are given a hand to by the fact that four during the eight Vaccine Hunters — Peterson, Maisie Lynch, Kathleen Bartels, Courtney Mason, Dina Ciccone, Tanya Aguilar, Becky Taylor and ...
How to get My Proxy Server Deal - TechStory - Techstory
A proxy internet protokol provides a valuable boost for internet security and solitude. Most people use a proxy webserver to hide their actual Internet protocol address and safeguard their area. ...
ProxyShell Attacks Pummel Unpatched Substitute Servers - Threatpost
The menad?er of your personal data ıs going to be Threatpost, Inc., 500 Unicorn Park, Woburn, MA 01801. Detailed information on the accomplishment of personal data can be found in the most impor...
5 Reasons Your Company Should Use Proxy Servers - CMSWire
The average person probably has only a vague understanding of the purpose of a proxy server. If you’re like most people, you probably associate proxy servers with unblocking Netflix content from ...
What Is Web Scraping? - TechBullion
Everyone has heard of web scraping at some point or another, the process of collecting information from the internet. Scraping could be anything, from copying and pasting a piece of text t...
Cuba’s blackout reveals authoritarian's limited control of the web - Quartz
The Cuban government briefly shut off the entire country’s internet on June 11 in an effort to disrupt historic nationwide protests that were being coordinated and live-streamed using the island’s na...
Glenmark Life Sciences IPO Fell 45. 08 Times With Day 3 - BloombergQuint
The Rs 1, 514-crore initial public offering of all Glenmark Life Sciences Ltd. ’s witnessed strong buyer interest on the third on top of that final day of firms. The issue most likely was sub...
April Week 1 - iProgrammer
This weekly digest is an extended version of the newsletter emailed to subscribers every Wednesday. As well as listing the week's news items, it also includes the week's Book Review, additions to Boo...
Pavement Backdoor Linked to China-Linked Spy Group 'Grayfly' - Threatpost
And the administrator of your personal details will be Threatpost, Inc., five Unicorn Park, Woburn, MOVING AVERAGE 01801. Detailed information on one of the processing of personal data is in the...
The Proxy Fight for Iranian Democracy - CircleID
If you put 65 million people in a locked room, they're going to find all the exits pretty quickly, and maybe make a few of their own. In the case of Iran's crippled-but-still-connected Internet, that...
This narrative explaining why technician stocks are getting hammered guidebook TechCrunch
This morning the tech-heavy Nasdaq Composite index is off 2 . 34% just after falling yesterday. Shares akin to Tesla are off in excess of what 6% today, now hooked in a bear-market correction a...
How To Download YouTube Videos Without Losing Quality? - iLounge
There are times when you may want to download a YouTube video for offline viewing. Maybe you’re going on a long trip and want to watch your favorite videos without using up all of your data. Or maybe...
OWASP Names a New Top Vulnerability for First Time in Years | eSecurityPlanet - eSecurity Planet
OWASP security researchers have updated the organization’s list of the ten most dangerous vulnerabilities – and the list has a new number one threat for the first time since 2007.The last update was ...
5 Best Free Proxy Browser for 2021: A Review - EIN News
INDIA, January 6, 2021 /EINPresswire.com/ -- The best anonymous browsers and privacy tools will help safeguard your data against unauthorized collection and use by third-parties. This is increasingly...
What is a Proxy Server? - Server Watch
Proxy servers remain the powerful middlemen for securely passing internet communications between web clients and service providers in an evolving network.Proxy servers can increase internet connectiv...
Twitter Announces First Quarter 2022 Results - Benzinga - Benzinga
SAN FRANCISCO, April 28, 2022 /PRNewswire/ -- Twitter, Inc. TWTR today announced financial results for its first quarter 2022.First Quarter 2022 Operational and Financial Highlights Except as ot...
Educate Yourself To Improve Your Online Privacy - Youth Incorporated - youthincmag.com
Photo by Ed Webster from Pexels The internet is vast, and it connects millions of devices. Regardless of who you are and what you do, using a private proxy is beneficial. In recent years, private pro...
High Court Orders Big UK ISPs to Block 19 More Piracy Websites - ISPreview.co.uk
The High Court in London has, following a case raised by the Motion Picture Association of Europe (MPA), issued a new injunction that forces most of the major UK broadband ISPs (e.g. BT, Sky Broadban...

IP Rotating Proxy Onsale

SPECIAL LIMITED TIME OFFER

00
Months
00
Days
00
Hours
00
Minutes
00
Seconds
First month free with coupon code FREE30