eilalan
eilalan

Reputation: 689

Code server (Visual Studio Code) on Google Cloud Engine - ERR_CONNECTION_REFUSED

I want to set up a google cloud engine machine with VSCode installed. I have followed this installation:https://fireship.io/lessons/vscode-cloud-coder-tensorflow/ 1. ubuntu 20 LTS 2. wget https://github.com/codercom/code-server/releases/download/{version}/code-server-{version}-linux-x64.tar.gz 3. tar -xvzf code-server-{version}-linux-x64.tar.gz 4. cd code-server-{version}-linux-x64 5. sudo ./code-server -p 80

output is: server-code call

The firewall rules are: Firewall rules

when I browse to http://EXTERNAL_IP:80 ERR_CONNECTION_REFUSED

What is the missing to makke sure that the port is open and accessible on the server side?

Thanks, eilalan

Upvotes: 5

Views: 1437

Answers (1)

jellene
jellene

Reputation: 409

I finally found a way for me. According to an answer here: Error > Could not connect to Cloud Shell on port 8080 > While connecting the Visual Code using code-server

You need to run code-server under --host 0.0.0.0

i.e. $ PASSWORD=password PORT=8443 code-server --host 0.0.0.0

Upvotes: 4

Related Questions