Ubuntu安装code-server
原创小于 1 分钟
Ubuntu安装code-server
参考资料
环境说明
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
安装脚本
# 下载
curl -fOL https://github.com/coder/code-server/releases/download/v4.95.3/code-server_4.95.3_amd64.deb
# 安装
dpkg -i code-server_4.95.3_amd64.deb
# 启动
systemctl enable --now code-server@root
# 查看状态
systemctl status code-server@root
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
https支持
# 生成自签名证书
openssl req -newkey rsa:2048 -nodes -keyout code-server.key -x509 -out code-server.crt
# 配置证书
nano ~/.config/code-server/config.yaml
### 修改cert 增加 cert-key
cert: code-server.crt
cert-key: code-server.key
###
重启访问
systemctl restart code-server@root
https://127.0.0.1:8080