DEV Community

Cover image for How to run VS Code on the server!

How to run VS Code on the server!

Babak on March 11, 2019

VS Code is my favorite editor for web development. The integrated terminal, the great plugin ecosystem, debugger, and excellent TypeScript support ...
Collapse
 
ronjonarod profile image
Alex Rodriguez

So for the SSH Tunneling/ Port Forwarding section is there a reason why you did the 0.0.0.0? Because if you use that instead of just leaving that off (i.e.

ssh -N -L 3000:localhost:3000 login@your-server \
  2> /dev/null

(or doing localhost) then that means, if you don't have a firewall on your machine that is actively blocking port 3000, anyone will be access that port that is one the same network as you. Since you are just referencing accessing localhost in the article I think it would make more since to just drop the 0.0.0.0 so you don't expose unnecessary ports from your machine (or in this case from the remote machine).

really cool post though, thank you 😁

Collapse
 
joeschr profile image
JoeSchr • Edited

have you tried running other docker container in parallel? I tried doing that a few weeks ago but on coder.com but support told me they are not there yet...

for my use case to make sense developing remotely I would really need to be able to run other docker containere

Collapse
 
picocreator profile image
Eugene Cheah

This is exactly what I wanted for a long time - been trying to hack some HTML5 screen sharing tools to achieve the same objective.

Naturally this would be 1000x better.

winning

Collapse
 
darkain profile image
Vincent Milum Jr

I contribute to about 20 different repositories. Curious, how would this setup handle that? Would I need a new instance of this per repository, or could vscode access multiple machines like it can locally? Also, is this limited to docker/Linux? I run windows and FreeBSD in my environment, curious to know how this would Translate, too.

Collapse
 
ronjonarod profile image
Alex Rodriguez

in theory you should be able to access different repo's, but you should also be able to use something like this plugin: marketplace.visualstudio.com/items... to aid in repo switching if needed.

also, it looks like they package all the dependencies in a docker container so if you wanted to run it somewhere else, you would have to make sure all the deps are installed on the target machine. aside from that you should be able to run it in a vm (or vagrant box) with relative ease on windows/freebsd. looks like freebsd is trying to get it working: wiki.freebsd.org/Docker , and for windows you should be able to use docker desktop.

Collapse
 
daviddesmet profile image
David De Smet

Really interesting concept.
I want to try it out but sadly, I'm not receiving the verification code by SMS :(