Skip to content

aielo/vscodaemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vscodaemon

vscodaemon provides daemon-service features to code-server.

This enables code-server to:

  • Run in background
  • Respond to start, stop, restart and status as a system service
  • Be configured (e.g. application user, port) on installation
  • Be re-configured (e.g. port, work directory) any time

Quick install

wget -qO- https://raw.githubusercontent.com/aielo/vscodaemon/master/vscodaemon.sh | bash -s install

Note: this installs vscodaemon with default settings, i.e., code-server port and password remain unchanged. Remember to either use the available options or setup your ~/.code-server file later.

The [un]install script

It can be used to either install or uninstall both vscodaemon and code-server.

./vscodaemon.sh (install|uninstall) [OPTIONS]

Install options

The following parameters can be used during installation:

Option Option (full) Description Default
-g --group OS USER group USER
-i --install-dir code-server version /opt/code-server
-p --password Password for VS Code web access USER
-P --port HTTP port for VS Code web access 8443
-s --grant-sudo sudo permissions to user NO
-u --user OS USER coder
-v --version code-server version Lastest version
-w --work-dir Working (start) directory USER's home

Note: other code-server parameters are not currently supported.

The daemon

Daemon supports start, stop, restart and status operations.

service code-server restart

Environment files and variables

The install location is set to /etc/environment as CODESERVER.

vscodaemon uses this and other two files to retrieve environment variables:

File Created by Created at
/etc/environment OS Existing
CODESERVER/env Install script Install
/home/USER/.code-server User (manual) Post-install

Variables supported are listed below:

Name Description Default
GROUP OS USER group USER
USER OS USER USER
PASSWD Password for VS Code web access USER
PORT HTTP port for VS Code web access 8443
WDIR Starting (working) directory /home/USER

Supported distros

vscodaemon was successfully tested on:

  • Ubuntu 18.04 LTS (Bionic Beaver)
  • Ubuntu 16.04 LTS (Xenial Xerus)
  • Debian 9 (stretch)

About

VS Code daemon for your remote dev environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages