DEV Community


Posted on

Code-server additional settings

Things that i forgot in the video.

Here is the link to the vide.

A quick thing to mention

I forgot to tell you one important thing. You can access your code-server from any
browser without even ssh'ing into your remote server.

See the image below.

You need to change the bind-addr in your config file which is located at

  • Path: ~/.config/code-server/config.yaml
auth: password
cert: false
Enter fullscreen mode Exit fullscreen mode

The indicates that you can access using your localhost as weel as the public
IP Address of your remote machine.
So basically, it means you can use either localhost:8000 (With port forwarding) or (without port forwarding).

Case with localhost or

It basically says that the traffic is only accessible from your local machine.

Case with

It basically says that the traffic is accessible from your local machine as well as
public ip address.

I want to access with only.

That's a good question, you can achieve it from one of the following ways.

Using port 80

When we enter the address of a website, our web browser tries to conect to port 80 by default, that means and are the same.

Instead of, you can use then run it

⚠️ Make sure to stop other services (if any) which are running on port 80.

Using Reverse Proxy with NginX (Preferred)

Many times you might be using you port 80 for your website hosting (if any).
In those cases we can add a CNAME record from our domain's DNS management console.
Which is pointing to @ or your public ip address and value will be a string example
code. Then we can create a nginx config file where we will listen at port 80 from the
url and use the reverse proxy to direct the traffic from port 8000 to
the port 80 with only.

If you want a video on it, please make sure to tell me.

Top comments (2)

vivekascoder profile image

Hmm, but you can also use certbot, that will provide SSL certificate for free, you can configure it with you nginx conf, and you'll have a SSL protected site.

vivekascoder profile image

Anytime, for more content youcan follow my channel. Haha