How to Install Visual Studio Code Server

Code Server allow you to run Microsoft Visual Studio Code in the browser. Code Server runs on a remote web server, you can access it by going to special url. This allow business to move development environment to cloud, deploy new developer environment on cloud or on premise server quickly with automation tools. Developers can access their secure work environment from any device that have a web browser and internet connection. This is helpful when employees work remotely so all code/files stay on the cloud instead of developers local computer.

Install Code Server

You can download latest version of Code Server from

To install Code Server 3.5.0, run

cd /usr/local/src
tar xvf code-server-3.5.0-linux-amd64.tar.gz
mv code-server-3.5.0-linux-amd64 /usr/local

To start code server, run

/usr/local/code-server-3.5.0-linux-amd64/bin/code-server --bind-addr

Visual Studio Code Server

This will make code server listen to port 10090 on all IP address configured on the server.

You can access the code server at


You can find password to login in file ~/.config/code-server/config.yaml

Visual Studio Code Server

If you don’t want to auto start code server on server boot, you can run the command in tmux or screen.

Enable SSL for Code Server

You can get Free SSL certficate using LetsEncrypt.

Once you got SSL certficate for your domain, you need to do the following. This this example, i use domain and user “boby”.

Copy SSL to users directory, so code server can access it.

mkdir -p /home/boby/.config/code-server
cp /etc/letsencrypt/live/  /etc/letsencrypt/live/ /home/boby/.config/code-server
chown -R boby:boby /home/boby/.config

Create Systemd service file to autostart code server

create file

vi /lib/systemd/system/code-server.service



ExecStart=/usr/local/code-server-3.5.0-linux-amd64/bin/code-server --bind-addr --cert /home/boby/.config/code-server/fullchain.pem  --cert-key  /home/boby/.config/code-server/privkey.pem


Start Code Server

To start code server, run a user root

systemctl start code-server

To get Password to login to code server, run

root@lab:~# cat /home/boby/.config/code-server/config.yaml 
auth: password
password: dd39e18a466d89b6579169ae
cert: false

If you want to change password, you can edit the file and restart code server with

systemctl restart code-server

Update SSL

LetsEncrypt SSL expire every 90 days and renew the SSL certificate every month. We will copy over the SSL certficate using a cronjob and restart code server every week.

create file

vi /usr/local/bin/code-server-update-ssl

Add following


cp /etc/letsencrypt/live/  /etc/letsencrypt/live/ /home/boby/.config/code-server
chown boby:boby /home/boby/.config/code-server/fullchain.pem
chown boby:boby /home/boby/.config/code-server/privkey.pem
systemctl restart code-server

Make it executable

chmod 755 /usr/local/bin/code-server-update-ssl

Create cron job

crontab -e


@weekly /usr/local/bin/code-server-update-ssl > /dev/null 2>&1
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *