1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Code Serverのインストール (Ubuntu 22.04)

Posted at

Code Serverとは?

サーバーで使えるVSCodeみたいなものです

SSHなどで手元のVSCodeからサーバーにアクセスして操作する方が多いと思いますが、管理者権限が必要ななディレクトリの処理ができず、面倒なこともあります。

Webブラウザからアクセスするだけで、そのサーバー上の開発をVSCodeライクで出来るのでめちゃくちゃ便利です

環境

Ubuntu 22.04

インストール

Code Serverのインストール

sudo apt update
sudo apt upgrade
curl -fsSL https://code-server.dev/install.sh | sh
sudo systemctl enable --now code-server@$USER

設定

Code Serverの起動確認

sudo systemctl start code-server@${USER}

パスワードとポートの設定

標準は8080だが、今回は8090にしている

vim ~/.config/code-server/config.yaml

bind-addr: 192.168.xxx.xxx:8090 #サーバーのIPとポートの設定
auth: password
password: xxxxx   #任意のパスワードに
cert: false

サービスの再起動

sudo systemctl restart code-server@${USER}

動作確認

ローカルのWebブラウザから入力したIPアドレスを入力
その後パスワードを聞かれるので入力
少し設定すればVS Codeに似た画面に

image.png

感想

最近はGitHub Copilotに慣れてしまっているため、Server側で動かしていることを忘れてて、コード生成されないことに戸惑うこともあった。

慣れは怖いです

短い記事で申し訳ありません

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?