Skip to content

Commit fd55139

Browse files
committed
Make flags additive and clean up docs
This means that you have to turn on features now instead of disabling them like auth and https. In addition: - Allow multiple options for auth (only password for now). - Combine the install docs since they had many commonalities and - generally simplified them (hopefully not too much). - Move all example configs into docs/examples.
1 parent 7b7f5b5 commit fd55139

24 files changed

Lines changed: 330 additions & 572 deletions

README.md

Lines changed: 24 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
# code-server
2-
[!["Open Issues"](https://img.shields.io/github/issues-raw/cdr/code-server.svg)](https://github.com/cdr/code-server/issues)
3-
[!["Latest Release"](https://img.shields.io/github/release/cdr/code-server.svg)](https://github.com/cdr/code-server/releases/latest)
4-
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cdr/code-server/blob/master/LICENSE)
5-
[![Discord](https://img.shields.io/discord/463752820026376202.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/zxSwN8Z)
1+
# code-server [!["Latest Release"](https://img.shields.io/github/release/cdr/code-server.svg)](https://github.com/cdr/code-server/releases/latest) [![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cdr/code-server/blob/master/LICENSE) [![Discord](https://img.shields.io/discord/463752820026376202.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/zxSwN8Z)
62

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

106
Try it out:
117
```bash
12-
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
8+
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
139
```
1410

1511
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
@@ -29,29 +25,20 @@ Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
2925
See docker oneliner mentioned above. Dockerfile is at
3026
[/Dockerfile](/Dockerfile).
3127

32-
### Binaries
33-
1. [Download a binary](https://github.com/cdr/code-server/releases) (Linux and
34-
OS X supported. Windows coming soon)
35-
2. Start the binary with the project directory as the first argument
36-
37-
```
38-
code-server <initial directory to open>
39-
```
40-
You will be prompted to enter the password shown in the CLI. `code-server`
41-
should now be running at https://localhost:8443.
42-
43-
`code-server` uses a self-signed SSL certificate that may prompt your
44-
browser to ask you some additional questions before you proceed. Please
45-
[read here](doc/self-hosted/index.md) for more information.
28+
To debug Golang using the
29+
[ms-vscode-go extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go),
30+
you need to add `--security-opt seccomp=unconfined` to your `docker run`
31+
arguments when launching code-server with Docker. See
32+
[#725](https://github.com/cdr/code-server/issues/725) for details.
4633

47-
For detailed instructions and troubleshooting, see the
48-
[self-hosted quick start guide](doc/self-hosted/index.md).
49-
50-
Quickstart guides for [Google Cloud](doc/admin/install/google_cloud.md),
51-
[AWS](doc/admin/install/aws.md), and
52-
[DigitalOcean](doc/admin/install/digitalocean.md).
34+
### Binaries
35+
1. [Download a binary](https://github.com/cdr/code-server/releases) (Linux and
36+
OS X supported. Windows coming soon).
37+
2. Unpack the downloaded file then run the binary.
38+
3. In your browser navigate to `localhost:8443`.
5339

54-
How to [secure your setup](/doc/security/ssl.md).
40+
- For self-hosting and other information see [doc/quickstart.md](doc/quickstart.md).
41+
- For hosting on cloud platforms see [doc/deploy.md](doc/deploy.md).
5542

5643
### Build
5744
- If you also plan on developing, set the `OUT` environment variable:
@@ -69,12 +56,9 @@ How to [secure your setup](/doc/security/ssl.md).
6956
code into a single binary.
7057

7158
## Known Issues
59+
- Uploading .vsix files doesn't work.
7260
- Creating custom VS Code extensions and debugging them doesn't work.
73-
- To debug Golang using
74-
[ms-vscode-go extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go),
75-
you need to add `--security-opt seccomp=unconfined` to your `docker run`
76-
arguments when launching code-server with Docker. See
77-
[#725](https://github.com/cdr/code-server/issues/725) for details.
61+
- Extension profiling and tips are currently disabled.
7862

7963
## Future
8064
- **Stay up to date!** Get notified about new releases of code-server.
@@ -86,17 +70,17 @@ How to [secure your setup](/doc/security/ssl.md).
8670
## Extensions
8771
At the moment we can't use the official VSCode Marketplace. We've created a
8872
custom extension marketplace focused around open-sourced extensions. However,
89-
if you have access to the `.vsix` file, you can manually install the extension.
73+
you can manually download the extension to your extensions directory. It's also
74+
possible to host your own marketplace by setting the `SERVICE_URL` and
75+
`ITEM_URL` environment variables.
9076

9177
## Telemetry
92-
Use the `--disable-telemetry` flag to completely disable telemetry.
93-
94-
We use the data collected to improve code-server.
78+
Use the `--disable-telemetry` flag to completely disable telemetry. We use the
79+
data collected to improve code-server.
9580

9681
## Contributing
97-
9882
### Development
99-
```fish
83+
```shell
10084
git clone https://github.com/microsoft/vscode
10185
cd vscode
10286
git checkout 1.36.1
@@ -107,7 +91,7 @@ yarn
10791
yarn watch
10892
# Wait for the initial compilation to complete (it will say "Finished compilation").
10993
# Run the next command in another shell.
110-
yarn start --allow-http --no-auth
94+
yarn start
11195
# Visit http://localhost:8443
11296
```
11397

@@ -130,7 +114,7 @@ Our changes include:
130114
- Rewrite assets used in the CSS (like icons) or as images to use the base URL.
131115
- Change the loader to use the base URL.
132116
- Change the web socket to use the base URL.
133-
- Set the favicon (using a relative path).
117+
- Set the favicon using a relative path.
134118
- Modify the file service to support writing from an asynchronous stream (for
135119
uploading files).
136120
- Add a file prefix to ignore for temporary files created during upload.

doc/admin/install/aws.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

doc/admin/install/digitalocean.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

doc/admin/install/google_cloud.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

doc/assets/aws_ubuntu.png

-43.9 KB
Binary file not shown.

doc/assets/chrome_warning.png

-30 KB
Binary file not shown.

doc/assets/cli.png

-137 KB
Binary file not shown.

doc/assets/logo-horizontal.png

-17.5 KB
Binary file not shown.
-58.1 KB
Binary file not shown.

doc/cros-install.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Installing code-server in your ChromiumOS/ChromeOS/CloudReady machine
2+
3+
This guide will show you how to install code-server into your CrOS machine.
4+
5+
## Using Crostini
6+
7+
One of the easier ways to run code-server is via
8+
[Crostini](https://www.aboutchromebooks.com/tag/project-crostini/), the Linux
9+
apps support feature in CrOS. Make sure you have enough RAM, HDD space and your
10+
CPU has VT-x/ AMD-V support. If your chromebook has this, then you are
11+
qualified to use Crostini.
12+
13+
If you are running R69, you might want to enable this on
14+
[Chrome Flags](chrome://flags/#enable-experimental-crostini-ui).
15+
If you run R72, however, this is already enabled for you.
16+
17+
After checking your prerequisites, follow the steps in [the self-host install guide](index.md)
18+
on installing code-server. Once done, make sure code-server works by running
19+
it. After running it, simply go to `penguin.linux.test:8443` to access
20+
code-server. Now you should be greeted with this screen. If you did,
21+
congratulations, you have installed code-server in your Chromebook!
22+
23+
![code-server on Chromebook](assets/cros.png)
24+
25+
Alternatively, if you ran code-server in another container and you need the IP
26+
for that specific container, simply go to Termina's shell via `crosh` and type
27+
`vsh termina`.
28+
29+
```bash
30+
Loading extra module: /usr/share/crosh/dev.d/50-crosh.sh
31+
Welcome to crosh, the Chrome OS developer shell.
32+
33+
If you got here by mistake, don't panic! Just close this tab and carry on.
34+
35+
Type 'help' for a list of commands.
36+
37+
If you want to customize the look/behavior, you can use the options page.
38+
Load it by using the Ctrl+Shift+P keyboard shortcut.
39+
40+
crosh> vsh termina
41+
(termina) chronos@localhost ~ $
42+
```
43+
While in termina, run `lxc list`. It should output the list of running containers.
44+
45+
```bash
46+
(termina) chronos@localhost ~ $ lxc list
47+
+---------|---------|-----------------------|------|------------|-----------+
48+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
49+
+---------|---------|-----------------------|------|------------|-----------+
50+
| penguin | RUNNING | 100.115.92.199 (eth0) | | PERSISTENT | 0 |
51+
+---------|---------|-----------------------|------|------------|-----------+
52+
(termina) chronos@localhost ~ $
53+
```
54+
55+
For this example, we show the default `penguin` container, which is exposed on
56+
`eth0` at 100.115.92.199. Simply enter the IP of the container where the
57+
code-server runs to Chrome.
58+
59+
## Using Crouton
60+
61+
[Crouton](https://github.com/dnschneid/crouton) is one of the old ways to get a
62+
running full Linux via `chroot` on a Chromebook. To use crouton, enable
63+
developer mode and go to `crosh`. This time, run `shell`, which should drop you
64+
to `bash`.
65+
66+
Make sure you downloaded `crouton`, if so, go ahead and run it under
67+
`~/Downloads`. After installing your chroot container via crouton, go ahead and
68+
enter `enter-chroot` to enter your container.
69+
70+
Follow the instructions set in [the self-host install guide](index.md) to
71+
install code-server. After that is done, run `code-server` and verify it works
72+
by going to `localhost:8443`.
73+
74+
> At this point in writing, `localhost` seems to work in this method. However,
75+
> the author is not sure if it applies still to newer Chromebooks.

0 commit comments

Comments
 (0)