|
1 | 1 | # code-server
|
2 | 2 |
|
3 |
| -`code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a |
4 |
| -remote server, accessible through the browser. |
| 3 | +Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it through the browser. |
5 | 4 |
|
6 |
| -Try it out: |
| 5 | +- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a |
| 6 | + consistent dev environment. Develop on a Linux machine and pick up from any |
| 7 | + device with a web browser. |
| 8 | +- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more. |
| 9 | + Preserve battery life when you're on the go since all intensive tasks runs on your server. |
| 10 | + Make use of a spare computer you have lying around and turn it into a full development environment. |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +## Getting started |
| 15 | + |
| 16 | +For a proper setup and walkthrough, please see [./doc/guide.md](./doc/guide.md). |
| 17 | + |
| 18 | +### Debian, Ubuntu |
7 | 19 |
|
8 | 20 | ```bash
|
9 |
| -docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest |
| 21 | +curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server_3.3.0_amd64.deb |
| 22 | +sudo dpkg -i code-server_3.3.0_amd64.deb |
| 23 | +sudo systemctl --user enable --now code-server |
| 24 | +# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
10 | 25 | ```
|
11 | 26 |
|
12 |
| -- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a |
13 |
| - consistent dev environment. Develop on a Linux machine and pick up from any |
14 |
| - device with a web browser. |
15 |
| -- **Server-powered:** Take advantage of large cloud servers to speed up tests, |
16 |
| - compilations, downloads, and more. Preserve battery life when you're on the go |
17 |
| - since all intensive computation runs on your server. |
| 27 | +### Fedora, Red Hat, SUSE |
18 | 28 |
|
19 |
| - |
| 29 | +```bash |
| 30 | +curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm |
| 31 | +sudo dnf install code-server-3.3.0-amd64.rpm |
| 32 | +sudo systemctl --user enable --now code-server |
| 33 | +# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
| 34 | +``` |
20 | 35 |
|
21 |
| -## Getting Started |
| 36 | +### npm |
22 | 37 |
|
23 |
| -### Requirements |
| 38 | +```bash |
| 39 | +npm install -g code-server |
| 40 | +code-server |
| 41 | +``` |
24 | 42 |
|
25 |
| -- 64-bit host. |
26 |
| -- At least 1GB of RAM. |
27 |
| -- 2 cores or more are recommended (1 core works but not optimally). |
28 |
| -- Secure connection over HTTPS or localhost (required for service workers and |
29 |
| - clipboard support). |
30 |
| -- For Linux: GLIBC 2.17 or later and GLIBCXX 3.4.15 or later. |
| 43 | +### macOS |
31 | 44 |
|
32 |
| -### Run over SSH |
| 45 | +```bash |
| 46 | +brew install code-server |
| 47 | +brew services start code-server |
| 48 | +# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
| 49 | +``` |
33 | 50 |
|
34 |
| -Use [sshcode](https://github.com/codercom/sshcode) for a simple setup. |
| 51 | +### SSH |
| 52 | + |
| 53 | +You can use [sshcode](https://github.com/codercom/sshcode) to start and use code-server on any Linux machine over SSH. |
| 54 | + |
| 55 | +```bash |
| 56 | + |
| 57 | +# Downloads and installs code-server on dev.coder.com and opens it in a new browser window. |
| 58 | +``` |
35 | 59 |
|
36 | 60 | ### Digital Ocean
|
37 | 61 |
|
38 | 62 | [](https://marketplace.digitalocean.com/apps/code-server)
|
39 | 63 |
|
40 |
| -### Releases |
| 64 | +### Docker |
| 65 | + |
| 66 | +```bash |
| 67 | +docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest |
| 68 | +``` |
| 69 | + |
| 70 | +This will start a code-server container and expose it at http://127.0.0.1:8080. It will also mount |
| 71 | +your current directory into the container as `/home/coder/project` and forward your UID/GID so that |
| 72 | +all file system operations occur as your user outside the container. |
| 73 | + |
| 74 | +### Self contained releases |
| 75 | + |
| 76 | +We publish self contained archives for every release on [github](https://github.com/cdr/code-server/releases). |
| 77 | +They bundle the node binary and node_modules. |
| 78 | + |
| 79 | +1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases) |
| 80 | +2. Unpack the release |
| 81 | +3. You can run code-server by executing `bin/code-server` |
41 | 82 |
|
42 |
| -1. [Download a release](https://github.com/cdr/code-server/releases). (Linux and macOS supported. Windows support planned.) |
43 |
| -2. Unpack the downloaded release then run the included `code-server` script. |
44 |
| -3. In your browser navigate to `localhost:8080`. |
| 83 | +Add the code-server `bin` directory to your `$PATH` to easily execute it without the full path every time. |
| 84 | + |
| 85 | +Here is an example script for installing and using a self-contained code-server release on Linux: |
| 86 | + |
| 87 | +```bash |
| 88 | +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 /opt -xz |
| 89 | +PATH="$PATH:/opt/code-server-3.3.0-linux-amd64/bin" |
| 90 | +code-server |
| 91 | +``` |
45 | 92 |
|
46 | 93 | ## FAQ
|
47 | 94 |
|
|
0 commit comments