Skip to main content

code-server

Installation

yay -S code-server

see also: Install - code-server v4.0.2 docs

Configuration

Allows code-server to listen on port 443

sudo setcap cap_net_bind_service=+ep /usr/lib/code-server/lib/node

config file

~/.config/code-server/config.yaml
bind-addr: 0.0.0.0:443
auth: password
password: db0d7ea5d107538586421279
cert: /home/yuanji/.local/share/code-server/cert.pem
cert-key: /home/yuanji/.local/share/code-server/key.pem

install extension

code-server --install-extension vscodevim.vim

Enable/Start Service

sudo systemctl enable --now [email protected]$USER

HTTPS

see acme.sh for more details.

acme.sh --issue -d code.gimo.me --dns dns_cf

acme.sh --install-cert -d code.gimo.me \
--key-file /home/yuanji/.local/share/code-server/key.pem \
--fullchain-file /home/yuanji/.local/share/code-server/cert.pem \
--reloadcmd "sudo systemctl restart [email protected]"