README.md 3.5 KB
Newer Older
A
Anmol Sethi 已提交
1
# code-server
A
Asher 已提交
2

3
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it through the browser.
4

5 6 7 8 9 10 11 12 13 14 15 16 17 18
- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a
  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)

## Getting started

For a proper setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).

### Debian, Ubuntu
19

20
```bash
21 22
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server_3.3.0_amd64.deb
sudo dpkg -i code-server_3.3.0_amd64.deb
23
systemctl --user enable --now code-server
24
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
25 26
```

27
### Fedora, Red Hat, SUSE
K
Kyle Carberry 已提交
28

29 30
```bash
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm
31
sudo yum install -y code-server-3.3.0-amd64.rpm
32
systemctl --user enable --now code-server
33 34
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
A
Asher 已提交
35

36
### npm
37

A
Anmol Sethi 已提交
38 39 40
We recommend installing from `npm` if we don't have a precompiled release for your machine's
platform or architecture.

41 42
**note:** Installing via `npm` requires certain dependencies for the native module builds.
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.
43

A
Anmol Sethi 已提交
44 45
You also need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633).

46 47 48
```bash
npm install -g code-server
code-server
A
Anmol Sethi 已提交
49
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
50
```
51

52
### macOS
53

54 55
```bash
brew install code-server
56
brew services start code-server
57 58
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
59

60 61 62
### Docker

```bash
A
Anmol Sethi 已提交
63 64 65 66
# 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.
67 68 69 70
docker run -it -p 127.0.0.1:8080:8080 \
  -v "$PWD:/home/coder/project" \
  -u "$(id -u):$(id -g)" \
  codercom/code-server:latest
71 72 73 74
```

### Self contained releases

A
Anmol Sethi 已提交
75
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
76
They bundle the node binary and compiled native modules.
77 78 79 80

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`
81

82 83 84 85 86
Add the code-server `bin` directory to your `$PATH` to easily execute it without the full path every time.

Here is an example script for installing and using a self-contained code-server release on Linux:

```bash
87 88 89
curl -sSL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-linux-amd64.tar.gz | sudo tar -C /usr/local -xz
sudo mv /usr/local/code-server-3.3.0-linux-amd64 /usr/local/code-server
PATH="$PATH:/usr/local/code-server/bin"
90 91
code-server
```
A
Asher 已提交
92

A
Anmol Sethi 已提交
93
## FAQ
A
Asher 已提交
94

A
Anmol Sethi 已提交
95
See [./doc/FAQ.md](./doc/FAQ.md).
A
Asher 已提交
96

O
Onilton Maciel 已提交
97 98 99 100
## Contributing

See [./doc/CONTRIBUTING.md](./doc/CONTRIBUTING.md).

K
Kyle Carberry 已提交
101
## Enterprise
102

A
Asher 已提交
103
Visit [our enterprise page](https://coder.com) for more information about our
A
Anmol Sethi 已提交
104
enterprise offerings.