VS Code Anywhere – Your Own VS Code Server

Code in your browser

Muhammad Arsalan
The Startup
3 min readJul 17, 2020

--

“ Its not that we use technology, its that we live it.” — Godfrey Reggio

This guide aims to help you setup a remote VS Code server that you can access anywhere on any device through the browser.

So I’ve always wanted to code on my iPad, and with the release of iPad OS I was finally closer to my dream ; after finding the workaround below I’ve been addicted!

Table of Contents :

  1. Why VS Code
  2. What tools are needed
  3. How to get your server running

Why VS Code ?

Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling, like IntelliSense code completion and debugging. It has support for all popular languages such has JavaScript, Python and PHP including an Enormous library of add ons for Git, Docker and other platforms.

VS Code is available on Windows, Mac, and also in your browser after you finish reading!

Technologies Needed

We will need the following technologies to accomplish out task :

  1. code-server : this will cook up the actual VS Code environment.
  2. ngrok : this will help us access our VS Code server anywhere on the internet.
  3. Mac/Linux Machine : this machine will act as our host server.

Ok, now that the formalities are out of the way lets get cookin!

Installation Guide

For MacOS :

Install Code Server

We can install code server either using Homebrew or Curl :

in the Terminal type :

Homebrew : brew cask install code-server

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

Install Ngrok

We can install ngrok using homebrew or manually :

Homebrew : brew cask install ngrok

to install manually visit : https://ngrok.com

Starting Code Server and Ngrok :

in the Terminal type :

code-server

this will start VS Code at : http://localhost:8080

then type :

ngrok http 8080

this will expose your port 8080 to the internet, and it will also give you a url at which you can access your VS Code environment.

For Linux :

Install Code Server

In the Terminal type :

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

Install Ngrok

  1. Download ngrok
  2. Unzip
  3. ./ngrok authtoken <your token>

you can follow the docs also : ngrok.com

Starting Code Server and Ngrok :

in the Terminal type :

code-server

this will start VS Code at : http://localhost:8080

then type :

./ngrok http 8080

this will expose your port 8080 to the internet, and it will also give you a url at which you can access your VS Code environment.

You can also setup encryption and security for your server, just type :

code-server -help

Happy Coding !

--

--

Muhammad Arsalan
The Startup

Innovation Sherpa | Techie | Institute of Business Administration | I want to make the world more literate in technology and spread a positive impact !