README.md 4.7 KB
Newer Older
K
Kyle Carberry 已提交
1
# code-server
A
Asher 已提交
2

K
Kyle Carberry 已提交
3 4
[!["Open Issues"](https://img.shields.io/github/issues-raw/cdr/code-server.svg)](https://github.com/cdr/code-server/issues)
[!["Latest Release"](https://img.shields.io/github/release/cdr/code-server.svg)](https://github.com/cdr/code-server/releases/latest)
5
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cdr/code-server/blob/master/LICENSE)
6
[![Discord](https://img.shields.io/discord/463752820026376202.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/zxSwN8Z)
A
Asher 已提交
7

8 9
`code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a
remote server, accessible through the browser.
10

11 12
Try it out:
```bash
A
Asher 已提交
13
docker run -it -p 127.0.0.1:8443:8443 -p 127.0.0.1:8444:8444 -v "$PWD:/home/coder/project" codercom/code-server --allow-http --no-auth
14 15
```

16
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
17
  - If you have a Windows or Mac workstation, more easily develop for Linux.
18 19
- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
- Preserve battery life when you're on the go.
20 21
  - All intensive computation runs on your server.
  - You're no longer running excess instances of Chrome.
K
Kyle Carberry 已提交
22 23 24 25 26

![Screenshot](/doc/assets/ide.png)

## Getting Started

K
Kyle Carberry 已提交
27 28
### Run over SSH

K
Kyle Carberry 已提交
29
Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
K
Kyle Carberry 已提交
30

31 32
### Docker

33 34
See docker oneliner mentioned above. Dockerfile is at
[/Dockerfile](/Dockerfile).
35 36

### Binaries
37

38 39
1.  [Download a binary](https://github.com/cdr/code-server/releases) (Linux and
    OS X supported. Windows coming soon)
K
Kyle Carberry 已提交
40 41
2.  Start the binary with the project directory as the first argument

42 43 44 45 46
```
code-server <initial directory to open>
```
You will be prompted to enter the password shown in the CLI. `code-server`
should now be running at https://localhost:8443.
A
Asher 已提交
47

48 49 50
`code-server` uses a self-signed SSL certificate that may prompt your
browser to ask you some additional questions before you proceed. Please
[read here](doc/self-hosted/index.md) for more information.
K
Kyle Carberry 已提交
51

52 53
For detailed instructions and troubleshooting, see the
[self-hosted quick start guide](doc/self-hosted/index.md).
K
Kyle Carberry 已提交
54

55 56 57
Quickstart guides for [Google Cloud](doc/admin/install/google_cloud.md),
[AWS](doc/admin/install/aws.md), and
[DigitalOcean](doc/admin/install/digitalocean.md).
A
Asher 已提交
58

K
Kyle Carberry 已提交
59 60
How to [secure your setup](/doc/security/ssl.md).

61
### Build
A
Asher 已提交
62 63 64
- If you also plan on developing, set the `OUT` environment variable:
  `export OUT=/path/to/some/directory`. Otherwise it will build in this
  directory which will cause issues because `yarn watch` will try to
A
Asher 已提交
65
  compile the build directory as well.
A
Asher 已提交
66
- For now `@coder/nbin` is a global dependency.
A
Asher 已提交
67 68 69 70 71
- Run `yarn build ${codeServerVersion} ${vscodeVersion} ${target} ${arch}` in
  this directory (for example: `yarn build development 1.35.0 linux x64`).
- You can run the built code with `node path/to/build/out/vs/server/main.js` or run
  `yarn binary` with the same arguments in the previous step to package the
  code into a single binary.
A
Asher 已提交
72

73
### Development
K
Kyle Carberry 已提交
74

A
Asher 已提交
75 76 77 78 79 80 81 82 83
```fish
git clone https://github.com/microsoft/vscode
cd vscode
git clone https://github.com/cdr/code-server src/vs/server
cd src/vs/server
yarn patch:apply
yarn
yarn watch
# Wait for the initial compilation to complete (it will say "Finished compilation").
A
Asher 已提交
84
yarn start --allow-http --no-auth
A
Asher 已提交
85 86
# Visit http://localhost:8443
```
A
Asher 已提交
87

88
## Known Issues
K
Kyle Carberry 已提交
89

90
- Creating custom VS Code extensions and debugging them doesn't work.
91 92 93 94 95
- To debug Golang using
  [ms-vscode-go extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go),
  you need to add `--security-opt seccomp=unconfined` to your `docker run`
  arguments when launching code-server with Docker. See
  [#725](https://github.com/cdr/code-server/issues/725) for details.
K
Kyle Carberry 已提交
96

97
## Future
98 99
- **Stay up to date!** Get notified about new releases of code-server.
  ![Screenshot](/doc/assets/release.gif)
K
Kyle Carberry 已提交
100
- Windows support.
M
Mike Hatch 已提交
101
- Electron and Chrome OS applications to bridge the gap between local<->remote.
K
Kyle Carberry 已提交
102 103
- Run VS Code unit tests against our builds to ensure features work as expected.

104
## Extensions
105

106 107 108
At the moment we can't use the official VSCode Marketplace. We've created a
custom extension marketplace focused around open-sourced extensions. However,
if you have access to the `.vsix` file, you can manually install the extension.
109

110 111
## Telemetry

112
Set the `telemetry.enableTelemetry` user setting to false to disable telemetry.
113 114 115

We use data collected to improve code-server.

K
Kyle Carberry 已提交
116
## Contributing
A
Asher 已提交
117

118
Development guides are coming soon.
A
Asher 已提交
119

K
Kyle Carberry 已提交
120
## License
A
Asher 已提交
121

K
Kyle Carberry 已提交
122
[MIT](LICENSE)
A
Asher 已提交
123

K
Kyle Carberry 已提交
124
## Enterprise
A
Asher 已提交
125

126 127
Visit [our enterprise page](https://coder.com/enterprise) for more information
about our enterprise offering.
A
Asher 已提交
128 129 130

## Commercialization

131 132
If you would like to commercialize code-server, please contact
contact@coder.com.