|
2 | 2 |
|
3 | 3 | Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser. |
4 | 4 |
|
5 | | -- **Code everywhere:** 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. |
| 5 | + |
11 | 6 |
|
12 | | - |
| 7 | +## Highlights |
| 8 | + |
| 9 | +- **Code everywhere** |
| 10 | + - Code on your Chromebook, tablet, and laptop with a consistent development environment. |
| 11 | + - Develop on a Linux machine and pick up from any device with a web browser. |
| 12 | +- **Server-powered** |
| 13 | + - Take advantage of large cloud servers to speed up tests, compilations, downloads, and more. |
| 14 | + - Preserve battery life when you're on the go as all intensive tasks runs on your server. |
| 15 | + - Make use of a spare computer you have lying around and turn it into a full development environment. |
13 | 16 |
|
14 | 17 | ## Getting Started |
15 | 18 |
|
16 | 19 | For a full setup and walkthrough, please see [./doc/guide.md](./doc/guide.md). |
17 | 20 |
|
18 | | -### Debian, Ubuntu |
19 | | - |
20 | | -```bash |
21 | | -curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server_3.3.1_amd64.deb |
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 | | - |
27 | | -### Fedora, Red Hat, SUSE |
28 | | - |
29 | | -```bash |
30 | | -curl -sSOL https://github.com/cdr/code-server/releases/download/v3.3.1/code-server-3.3.1-amd64.rpm |
31 | | -sudo yum install -y code-server-3.3.1-amd64.rpm |
32 | | -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 | | -``` |
35 | | - |
36 | | -### Arch Linux |
37 | | - |
38 | | -```bash |
39 | | -# Installs code-server from the AUR using yay. |
40 | | -yay -S code-server |
41 | | -systemctl --user enable --now code-server |
42 | | -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
43 | | -``` |
44 | | - |
45 | | -```bash |
46 | | -# Installs code-server from the AUR with plain makepkg. |
47 | | -git clone https://aur.archlinux.org/code-server.git |
48 | | -cd code-server |
49 | | -makepkg -si |
50 | | -systemctl --user enable --now code-server |
51 | | -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
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. |
| 21 | +We have a [script](./install.sh) to install code-server for Linux and macOS. |
58 | 22 |
|
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. |
| 23 | +It tries to use the system package manager if possible. |
61 | 24 |
|
62 | | -You will need at least node v12 installed. See [#1633](https://github.com/cdr/code-server/issues/1633). |
| 25 | +First run to print out the install process: |
63 | 26 |
|
64 | 27 | ```bash |
65 | | -yarn global add code-server |
66 | | -# Or: npm install -g code-server |
67 | | -code-server |
68 | | -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
| 28 | +curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run |
69 | 29 | ``` |
70 | 30 |
|
71 | | -### macOS |
| 31 | +Now to actually install: |
72 | 32 |
|
73 | 33 | ```bash |
74 | | -brew install code-server |
75 | | -brew services start code-server |
76 | | -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
| 34 | +curl -fsSL https://code-server.dev/install.sh | sh |
77 | 35 | ``` |
78 | 36 |
|
79 | | -### Docker |
80 | | - |
81 | | -```bash |
82 | | -# This will start a code-server container and expose it at http://127.0.0.1:8080. |
83 | | -# It will also mount your current directory into the container as `/home/coder/project` |
84 | | -# and forward your UID/GID so that all file system operations occur as your user outside |
85 | | -# the container. |
86 | | -docker run -it -p 127.0.0.1:8080:8080 \ |
87 | | - -v "$PWD:/home/coder/project" \ |
88 | | - -u "$(id -u):$(id -g)" \ |
89 | | - codercom/code-server:latest |
90 | | -``` |
| 37 | +The install script will print out how to run and start using code-server. |
91 | 38 |
|
92 | | -### Static Releases |
| 39 | +If you believe an install script used with `curl | sh` is insecure, please give |
| 40 | +[this wonderful blogpost](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-verified-install) by |
| 41 | +[sandstorm.io](https://sandstorm.io) a read. |
93 | 42 |
|
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 | | - |
97 | | -1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases). |
98 | | -2. Unpack the release. |
99 | | -3. You can run code-server by executing `./bin/code-server`. |
100 | | - |
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 |
106 | | -curl -sSL 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 |
108 | | -sudo mv /usr/local/code-server-3.3.1-linux-amd64 /usr/local/code-server-3.3.1 |
109 | | -PATH="/usr/local/code-server-3.3.1/bin:$PATH" |
110 | | -code-server |
111 | | -# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml |
112 | | -``` |
| 43 | +Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md). |
113 | 44 |
|
114 | 45 | ## FAQ |
115 | 46 |
|
|
0 commit comments