.. author:: tobimori <tobias@moeritz.cc>
.. tag:: lang-nodejs
.. tag:: web
.. tag:: ide
.. tag:: collaborative-editing
.. tag_list::
code-server is VS Code running on a remote server, in this guide your Uberspace, accessible through the browser. VS Code is a modern code editor with integrated Git support, a code debugger, smart autocompletion, and customisable and extensible features. This means that you can use various devices running different operating systems, and always have a consistent development environment on hand.
Note
For this guide you should be familiar with the basic concepts of
code-server is released under the MIT License.
Setup your Domain:
Create a new folder for code-server & its data in your home directory and switch into it.
[isabell@stardust ~]$ mkdir ~/code-server-data && mkdir ~/code-server && cd ~/code-server
[isabell@stardust code-server]$
Then download the latest release for x86_64. Make sure to replace the x.x.x
with the current version in all following snippets.
[isabell@stardust code-server]$ wget https://github.com/cdr/code-server/releases/download/x.x.x/code-server-x.x.x-linux-x86_64.tar.gz
[...]
‘code-server-x.x.x-linux-x86_64.tar.gz’ saved
[isabell@stardust code-server]$
Then extract the files in the current folder with tar
. Don't forget --strip-components=1
to remove the code-server-x.x.x-linux-x86_64
prefix from the path.
[isabell@stardust code-server]$ tar -xzf code-server-x.x.x-linux-amd64.tar.gz --strip-components=1
[isabell@stardust code-server]$
You can now delete the archive:
[isabell@stardust code-server]$ rm code-server-x.x.x-linux-amd64.tar.gz
[isabell@stardust code-server]$
Note
Be aware that almost all configuration of code-server happens via command line arguments and so in this file. You can see all available command line arguments when running code-server with the --help
argument. For example, you can disable telemetry by adding --disable-telemetry
.
Create ~/etc/services.d/code-server.ini
with the following content.
Make sure to <password> with your password.
[program:code-server]
command=%(ENV_HOME)s/code-server/bin/code-server --host 0.0.0.0 --port 8080 --user-data-dir %(ENV_HOME)s/code-server-data
environment=PASSWORD=<password>
autorestart=true
autostart=true
If it's not in state RUNNING
, check your configuration.
Note
code-server is running on port 8080 in the default configuration. If you want or need to use another port, you can change that in the :manual:`supervisord <daemons-supervisord>` daemon file we created above.
Browse to your uberspace domain isabell.uber.space
or any domain you have set up and configured the web backend with. The password for logging into vscode server is in ~/.config/code-server/config.yaml
.
[isabell@stardust code-server]$ cat ~/.config/code-server/config.yaml
bind-addr: 127.0.0.1:8080
auth: password
password: d48s222d625f0g527e410sfd
cert: false
Stop your code-server instance first.
[isabell@stardust ~]$ supervisorctl stop code-server
code-server: stopped
[isabell@stardust ~]$
Switch into code-server's folder we created when installing code-server.
[isabell@stardust ~]$ cd ~/code-server
[isabell@stardust code-server]$
Then download the latest release for amd64. Make sure to replace the x.x.x
with the current version in all following snippets.
[isabell@stardust code-server]$ wget https://github.com/cdr/code-server/releases/download/x.x.x/code-server-x.x.x-linux-amd64.tar.gz
[...]
‘code-server-x.x.x-linux-amd64.tar.gz’ saved
[isabell@stardust code-server]$
Then extract the files in the current folder with tar
. Don't forget --strip-components=1
to remove the code-server-x.x.x-linux-amd64
prefix from the path.
[isabell@stardust code-server]$ tar -xzf code-server-x.x.x-linux-amd64.tar.gz --strip-components=1
[isabell@stardust code-server]$
You can now delete the archive and start code-server again:
[isabell@stardust code-server]$ rm code-server-x.x.x-linux-amd64.tar.gz
[isabell@stardust code-server]$ supervisorctl start code-server
code-server: started
[isabell@stardust code-server]$
Tested with code-server 4.8.3 on Uberspace 7.14.0.
.. author_list::