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

A
Anmol Sethi 已提交
3
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
4

A
Anmol Sethi 已提交
5
- **Code everywhere:** Code on your Chromebook, tablet, and laptop with a
6 7 8 9 10 11 12 13
  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)

A
Anmol Sethi 已提交
14
## Getting Started
15

A
Anmol Sethi 已提交
16
For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
17 18

### Debian, Ubuntu
19

20
```bash
A
Anmol Sethi 已提交
21
curl -OL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb
A
Anmol Sethi 已提交
22
sudo dpkg -i code-server_3.3.1_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
```

A
Anmol Sethi 已提交
27
### Fedora, CentOS, Red Hat, SUSE
K
Kyle Carberry 已提交
28

29
```bash
A
Anmol Sethi 已提交
30 31
curl -OL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm
sudo rpm -i code-server-3.3.1-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

A
Anmol Sethi 已提交
36
### Arch Linux
C
Colin Adler 已提交
37 38

```bash
A
Anmol Sethi 已提交
39
# Installs code-server from the AUR using yay.
C
Colin Adler 已提交
40
yay -S code-server
A
Anmol Sethi 已提交
41 42
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
C
Colin Adler 已提交
43 44 45
```

```bash
A
Anmol Sethi 已提交
46 47 48
# Installs code-server from the AUR with plain makepkg.
git clone https://aur.archlinux.org/code-server.git
cd code-server
C
Colin Adler 已提交
49
makepkg -si
A
Anmol Sethi 已提交
50 51
systemctl --user enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
C
Colin Adler 已提交
52 53
```

54
### yarn, npm
55

56
We recommend installing with `yarn` or `npm` if we don't have a precompiled release for your machine's
57
platform or architecture or your glibc < v2.19.
A
Anmol Sethi 已提交
58

59
**note:** Installing via `yarn` or `npm` builds native modules on install and so requires C dependencies.
60
See [./doc/npm.md](./doc/npm.md) for installing these dependencies.
61

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

64
```bash
65 66
yarn global add code-server
# Or: npm install -g code-server
67
code-server
A
Anmol Sethi 已提交
68
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
69
```
70

71
### macOS
72

73 74
```bash
brew install code-server
75
brew services start code-server
76 77
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
78

79 80 81
### Docker

```bash
A
Anmol Sethi 已提交
82 83 84 85
# 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.
86 87 88 89
docker run -it -p 127.0.0.1:8080:8080 \
  -v "$PWD:/home/coder/project" \
  -u "$(id -u):$(id -g)" \
  codercom/code-server:latest
90 91
```

A
Anmol Sethi 已提交
92
### Static Releases
93

A
Anmol Sethi 已提交
94
We publish self contained `.tar.gz` archives for every release on [github](https://github.com/cdr/code-server/releases).
95
They bundle the node binary and node_modules.
96

A
Anmol Sethi 已提交
97 98 99
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`.
100

A
Anmol Sethi 已提交
101
Add the code-server `bin` directory to your `$PATH` to easily execute `code-server` without the full path every time.
102

103
Here is an example script for installing and using a static `code-server` release on Linux:
104 105

```bash
A
Anmol Sethi 已提交
106
curl -L https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-linux-amd64.tar.gz \
107
  | sudo tar -C /usr/local -xz
A
Anmol Sethi 已提交
108 109
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"
110
code-server
A
v3.3.0  
Anmol Sethi 已提交
111
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
112
```
A
Asher 已提交
113

A
Anmol Sethi 已提交
114
## FAQ
A
Asher 已提交
115

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

O
Onilton Maciel 已提交
118 119 120 121
## Contributing

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

K
Kyle Carberry 已提交
122
## Enterprise
123

A
v3.3.0  
Anmol Sethi 已提交
124
Visit [our website](https://coder.com) for more information about our
A
Anmol Sethi 已提交
125
enterprise offerings.