Skip to content

Commit dbcb01a

Browse files
committed
Revamp README.md with new installation options
1 parent 2e31e8f commit dbcb01a

File tree

2 files changed

+74
-26
lines changed

2 files changed

+74
-26
lines changed

README.md

+72-25
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,94 @@
11
# code-server
22

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.
54

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+
![Example gif](./doc/assets/code-server.gif)
13+
14+
## Getting started
15+
16+
For a proper setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
17+
18+
### Debian, Ubuntu
719

820
```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
1025
```
1126

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
1828

19-
![Example gif](/doc/assets/code-server.gif)
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+
```
2035

21-
## Getting Started
36+
### npm
2237

23-
### Requirements
38+
```bash
39+
npm install -g code-server
40+
code-server
41+
```
2442

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
3144

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+
```
3350

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+
```
3559

3660
### Digital Ocean
3761

3862
[![Create a Droplet](./doc/assets/droplet.svg)](https://marketplace.digitalocean.com/apps/code-server)
3963

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

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+
```
4592

4693
## FAQ
4794

ci/build/build-packages.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ release_nfpm() {
5252
local nfpm_config
5353
nfpm_config=$(envsubst < ./ci/build/nfpm.yaml)
5454

55-
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.deb"
55+
# The underscores are convention for .deb.
56+
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server_"$VERSION_$ARCH.deb"
5657
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.rpm"
5758
}
5859

0 commit comments

Comments
 (0)