install_visual_studio_code_on_a_server_to_use_it_via_web-browser

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
install_visual_studio_code_on_a_server_to_use_it_via_web-browser [11.11.2020 05:35] – created Pascal Suterinstall_visual_studio_code_on_a_server_to_use_it_via_web-browser [13.11.2020 09:41] (current) Pascal Suter
Line 1: Line 1:
 ====== install Visual Studio Code on a Server to use it via web-browser ====== ====== install Visual Studio Code on a Server to use it via web-browser ======
-the easiest way is to use a [[https://github.com/cdr/code-server/blob/master/install.sh|script]] from coder.com which also provides a simple password authentication.  + 
-   +the easiest way is to use a [[https://github.com/cdr/code-server/blob/master/install.sh|script]] from coder.com which also provides a simple password authentication. 
-before you begin though, think about security! the coder.com setup will write a password into a config file in your home directory in clear text. with this password, anyone can login to your visual studio and in there, whoever is logged in prettymuch has full control over your user on the server, as one can start a terminal, edit and create files etc. I would not run this on a production server. Instead i am using this in a docker container that i use to fiddle around with php scripts and other things **locally on my notebook**  + 
-   +before you begin though, think about security! the coder.com setup will write a password into a config file in your home directory in clear text. with this password, anyone can login to your visual studio and in there, whoever is logged in prettymuch has full control over your user on the server, as one can start a terminal, edit and create files etc. I would not run this on a production server. Instead i am using this in a docker container that i use to fiddle around with php scripts and other things **locally on my notebook** 
-run the following commands with an unprivileged user who has sudo rights to execute ''dpkg''. you can remove those rights from the user again after the installation is complete. + 
 +run the following commands with an unprivileged user who has sudo rights to execute ''dpkg''. you can remove those rights from the user again after the installation is complete. 
      
   curl -fsSL https://code-server.dev/install.sh | sh   curl -fsSL https://code-server.dev/install.sh | sh
-   + 
-you can now start code-server  +you can now start code-server 
-  code-server  + 
-or you can start it as a service as well: +  code-server 
 + 
 +or you can start it as a service as well: 
   sudo systemctl enable --now code-server@$USER   sudo systemctl enable --now code-server@$USER
  
 check out ''code-server --help'' to see what else you can configure / do with it. for example you can install some extensions right from the command line (if you want to script the installation in a Dockerfile for example) check out ''code-server --help'' to see what else you can configure / do with it. for example you can install some extensions right from the command line (if you want to script the installation in a Dockerfile for example)
 +
   code-server --install-extension "Sophisticode.php-formatter"   code-server --install-extension "Sophisticode.php-formatter"
   code-server --install-extension "bmewburn.vscode-intelephense-client"   code-server --install-extension "bmewburn.vscode-intelephense-client"
 +  code-server --install-extension "bradgashler.htmltagwrap"
 +
 +Alternatively one could also use an editor that was designed to run as a web-service from the get-go with this kind of deployment in focus. Like for example [[http://demo.icecoder.net|ICEcoder]]
  
  
  • install_visual_studio_code_on_a_server_to_use_it_via_web-browser.1605069358.txt.gz
  • Last modified: 11.11.2020 05:35
  • by Pascal Suter