2020-02-19 08:07:01 +08:00
|
|
|
# code-server
|
2019-01-08 08:46:19 +08:00
|
|
|
|
2020-05-18 04:53:08 +08:00
|
|
|
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
|
2019-03-06 09:45:21 +08:00
|
|
|
|
2020-05-18 04:53:08 +08:00
|
|
|
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
|
2020-05-12 13:46:38 +08:00
|
|
|
consistent dev environment. Develop on a Linux machine and pick up from any
|
|
|
|
device with a web browser.
|
|
|
|
- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
|
|
|
|
Preserve battery life when you're on the go since all intensive tasks runs on your server.
|
|
|
|
Make use of a spare computer you have lying around and turn it into a full development environment.
|
|
|
|
|
|
|
|
![Example gif](./doc/assets/code-server.gif)
|
|
|
|
|
2020-05-18 08:47:33 +08:00
|
|
|
## Getting Started
|
2020-05-12 13:46:38 +08:00
|
|
|
|
2020-05-18 04:53:08 +08:00
|
|
|
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
|
2020-05-12 13:46:38 +08:00
|
|
|
|
|
|
|
### Debian, Ubuntu
|
2019-09-27 22:39:29 +08:00
|
|
|
|
2019-03-07 10:59:43 +08:00
|
|
|
```bash
|
2020-05-19 06:11:52 +08:00
|
|
|
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
|
|
|
|
sudo dpkg -i code-server_3.3.1_amd64.deb
|
2020-05-13 16:17:34 +08:00
|
|
|
systemctl --user enable --now code-server
|
2020-05-12 13:46:38 +08:00
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
2019-03-07 10:59:43 +08:00
|
|
|
```
|
|
|
|
|
2020-05-12 13:46:38 +08:00
|
|
|
### Fedora, Red Hat, SUSE
|
2019-03-05 02:31:27 +08:00
|
|
|
|
2020-05-12 13:46:38 +08:00
|
|
|
```bash
|
2020-05-19 06:11:52 +08:00
|
|
|
curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm
|
|
|
|
sudo yum install -y code-server-3.3.1-amd64.rpm
|
2020-05-13 16:17:34 +08:00
|
|
|
systemctl --user enable --now code-server
|
2020-05-12 13:46:38 +08:00
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
|
|
|
```
|
2020-03-03 05:13:39 +08:00
|
|
|
|
2020-05-20 13:16:41 +08:00
|
|
|
### Arch Linux
|
2020-05-20 11:41:28 +08:00
|
|
|
|
|
|
|
```bash
|
2020-05-20 13:16:41 +08:00
|
|
|
# Installs code-server from the AUR using yay.
|
2020-05-20 11:41:28 +08:00
|
|
|
yay -S code-server
|
2020-05-20 13:16:41 +08:00
|
|
|
systemctl --user enable --now code-server
|
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
2020-05-20 11:41:28 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
```bash
|
2020-05-20 13:16:41 +08:00
|
|
|
# Installs code-server from the AUR with plain makepkg.
|
|
|
|
git clone https://aur.archlinux.org/code-server.git
|
|
|
|
cd code-server
|
2020-05-20 11:41:28 +08:00
|
|
|
makepkg -si
|
2020-05-20 13:16:41 +08:00
|
|
|
systemctl --user enable --now code-server
|
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
2020-05-20 11:41:28 +08:00
|
|
|
```
|
|
|
|
|
2020-05-19 12:16:47 +08:00
|
|
|
### yarn, npm
|
2019-09-19 02:21:38 +08:00
|
|
|
|
2020-05-19 12:16:47 +08:00
|
|
|
We recommend installing with `yarn` or `npm` if we don't have a precompiled release for your machine's
|
2020-05-18 08:45:48 +08:00
|
|
|
platform or architecture or your glibc < v2.19.
|
2020-05-14 15:17:17 +08:00
|
|
|
|
2020-05-19 12:16:47 +08:00
|
|
|
**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies.
|
2020-05-13 17:06:11 +08:00
|
|
|
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.
|
2020-05-13 11:11:31 +08:00
|
|
|
|
2020-05-18 04:53:08 +08:00
|
|
|
You will need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633).
|
2020-05-15 09:37:58 +08:00
|
|
|
|
2020-05-12 13:46:38 +08:00
|
|
|
```bash
|
2020-05-19 12:16:47 +08:00
|
|
|
yarn global add code-server
|
|
|
|
# Or: npm install -g code-server
|
2020-05-12 13:46:38 +08:00
|
|
|
code-server
|
2020-05-13 07:33:34 +08:00
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
2020-05-12 13:46:38 +08:00
|
|
|
```
|
2019-09-19 02:21:38 +08:00
|
|
|
|
2020-05-12 13:46:38 +08:00
|
|
|
### macOS
|
2019-09-19 02:21:38 +08:00
|
|
|
|
2020-05-12 13:46:38 +08:00
|
|
|
```bash
|
|
|
|
brew install code-server
|
2020-05-15 09:57:10 +08:00
|
|
|
brew services start code-server
|
2020-05-12 13:46:38 +08:00
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
|
|
|
```
|
2019-09-27 22:39:29 +08:00
|
|
|
|
2020-05-12 13:46:38 +08:00
|
|
|
### Docker
|
|
|
|
|
|
|
|
```bash
|
2020-05-15 10:01:45 +08:00
|
|
|
# This will start a code-server container and expose it at http://127.0.0.1:8080.
|
|
|
|
# It will also mount your current directory into the container as `/home/coder/project`
|
|
|
|
# and forward your UID/GID so that all file system operations occur as your user outside
|
|
|
|
# the container.
|
2020-05-15 09:57:10 +08:00
|
|
|
docker run -it -p 127.0.0.1:8080:8080 \
|
|
|
|
-v "$PWD:/home/coder/project" \
|
|
|
|
-u "$(id -u):$(id -g)" \
|
|
|
|
codercom/code-server:latest
|
2020-05-12 13:46:38 +08:00
|
|
|
```
|
|
|
|
|
2020-05-18 08:25:33 +08:00
|
|
|
### Static Releases
|
2020-05-12 13:46:38 +08:00
|
|
|
|
2020-05-16 22:01:26 +08:00
|
|
|
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
|
2020-05-19 09:30:24 +08:00
|
|
|
They bundle the node binary and node_modules.
|
2020-05-12 13:46:38 +08:00
|
|
|
|
2020-05-18 04:53:08 +08:00
|
|
|
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases).
|
|
|
|
2. Unpack the release.
|
|
|
|
3. You can run code-server by executing `./bin/code-server`.
|
2019-09-27 22:39:29 +08:00
|
|
|
|
2020-05-18 04:53:08 +08:00
|
|
|
Add the code-server `bin` directory to your `$PATH` to easily execute `code-server` without the full path every time.
|
2020-05-12 13:46:38 +08:00
|
|
|
|
2020-05-18 04:59:09 +08:00
|
|
|
Here is an example script for installing and using a static `code-server` release on Linux:
|
2020-05-12 13:46:38 +08:00
|
|
|
|
|
|
|
```bash
|
2020-05-19 06:11:52 +08:00
|
|
|
curl -sSL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-linux-amd64.tar.gz \
|
2020-05-18 09:11:07 +08:00
|
|
|
| sudo tar -C /usr/local -xz
|
2020-05-19 06:11:52 +08:00
|
|
|
sudo mv /usr/local/code-server-3.3.1-linux-amd64 /usr/local/code-server-3.3.1
|
|
|
|
PATH="/usr/local/code-server-3.3.1/bin:$PATH"
|
2020-05-12 13:46:38 +08:00
|
|
|
code-server
|
2020-05-18 05:57:59 +08:00
|
|
|
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
|
2020-05-12 13:46:38 +08:00
|
|
|
```
|
2019-01-08 08:46:19 +08:00
|
|
|
|
2020-02-19 08:07:01 +08:00
|
|
|
## FAQ
|
2019-10-24 00:49:05 +08:00
|
|
|
|
2020-02-19 08:07:01 +08:00
|
|
|
See [./doc/FAQ.md](./doc/FAQ.md).
|
2019-01-08 08:46:19 +08:00
|
|
|
|
2020-03-20 05:53:31 +08:00
|
|
|
## Contributing
|
|
|
|
|
|
|
|
See [./doc/CONTRIBUTING.md](./doc/CONTRIBUTING.md).
|
|
|
|
|
2019-03-05 02:31:27 +08:00
|
|
|
## Enterprise
|
2019-09-27 22:39:29 +08:00
|
|
|
|
2020-05-18 05:57:59 +08:00
|
|
|
Visit [our website](https://coder.com) for more information about our
|
2020-02-19 08:07:01 +08:00
|
|
|
enterprise offerings.
|