What is the purpose of this utility? All developers know that one of the main goals is portability of development or code revision.
The essence of the utility is that you can edit the code directly on your server, you just need to specify the server IP/domain and the VS Code port, which is specified in the configurator. Then you enter the password and immediately get the root IDE of your server.
Run VS Code on any computer anywhere and access it through your browser.
- Program on any device with a development environment
- Use cloud servers to speed up tests, compilations, downloads, etc.
- Save battery life when you’re on the go; all intensive tasks are performed on your server
You will need a machine on which you can run the code-server. You can use an existing physical machine or a virtual machine
As a minimum we recommend:
- 1 GB of RAM
- 2 processor cores
You can use any Linux distribution, but our documentation assumes you are using Debian / Ubuntu
The easiest way to install code-server is to use this installation script for Linux, macOS and FreeBSD.
To install, run:
curl -fsSL https://code-server.dev/install.sh | sh
You can change the installation process by enabling one or more of the following flags:
--dry-run: repeat the installation process commands without running them --method: select the installation method --method=detect: detect the package manager, but revert to --method=standalone --method=standalone: install the standalone release archive in ~/.local. --prefix=/usr/local: set up a standalone release archive for the whole system. --version=X.X.X: install version X.X.X instead of the latest version. --help: see the usage documentation. --edge: install the latest version of Edge (i.e. the pre-release version)
When this is done, the installation script will print instructions on how to start and run code-server.
After installing the VS Code server, you need to start it by running the command:
sudo systemctl enable --now code-server@$USER
To access the VS Code server you need to setup the configuration file (it’s pretty simple and intuitive) located at: ~/.config/code-server/config.yaml
- bind-addr: ip:port
- auth: password
- password: your_password
- cert: false
Where bind-addr is your IP address or domain, after the : sign you have to specify the suitable port to connect to. Where password – you specify your password to connect.
Then you need to save the file and restart the service:
sudo systemctl restart code-server@USER
Now you can connect via specified bind-addr, enter specified password and use VS Code Server.