Skip to content

Instantly share code, notes, and snippets.

@BruceWind
Last active August 23, 2021 02:26
Show Gist options
  • Save BruceWind/dd75f9da918482dda978f5d6234025ad to your computer and use it in GitHub Desktop.
Save BruceWind/dd75f9da918482dda978f5d6234025ad to your computer and use it in GitHub Desktop.
It is a tutorial about setup a code-server.

It is a tutorial about setup a code-server for your remote coding.

First, run these commands on your terminal.

sudo apt  install npm -y
sudo npm install -g n
sudo curl -fsSL https://code-server.dev/install.sh | sh

Second execute code-server to init config.yaml file.

Last, modify nano ./.config/code-server/config.yaml to set ip : 0.0.0.0 and password:

bind-addr: 0.0.0.0:8080
auth: password
password: 123456
cert: false

Currently, you can open http://ip:8080 to open vscode in webbrowser.

In addtion, I create a autostart config file to make it autostart when computer startup on Ubuntu. If you want to do the same thing, look at what I did:

write these lines into ~/.config/autostart/code-server.desktop

[Desktop Entry]
Name=code-server
Exec=nohup code-server > /dev/null
StartupNotify=true
Terminal=false
Type=Application
X-GNOME-Autostart-Delay=15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment