Skip to content

Commit ff99a1d

Browse files
committedOct 23, 2019
Add security section to readme
See #1062.
1 parent 7f07b8f commit ff99a1d

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed
 

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ deploy:
6161

6262
- provider: script
6363
skip_cleanup: true
64-
script: docker build -f ./scripts/ci.dockerfile --build-arg -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . && docker push codercom/code-server:"$TAG" && docker push codercom/code-server:v2
64+
script: docker build -f ./scripts/ci.dockerfile -t codercom/code-server:"$TAG" -t codercom/code-server:v2 . && docker push codercom/code-server:"$TAG" && docker push codercom/code-server:v2
6565
on:
6666
repo: cdr/code-server
6767
branch: master

‎README.md

+27
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,33 @@ arguments when launching code-server with Docker. See
5656
- For self-hosting and other information see [doc/quickstart.md](doc/quickstart.md).
5757
- For hosting on cloud platforms see [doc/deploy.md](doc/deploy.md).
5858

59+
## Security
60+
61+
### Authentication
62+
To enable built-in password authentication use `code-server --auth password`. By
63+
default it will use a randomly generated password but you can set the
64+
`$PASSWORD` environment variable to use your own.
65+
66+
Do not expose `code-server` to the open internet without some form of
67+
authentication.
68+
69+
### Encrypting traffic with HTTPS
70+
If you aren't doing SSL termination elsewhere you can directly give
71+
`code-server` a certificate with `code-server --cert` followed by the path to
72+
your certificate. Additionally, you can use certificate keys with `--cert-key`
73+
followed by the path to your key. If you pass `--cert` without any path
74+
`code-server` will generate a self-signed certificate.
75+
76+
If `code-server` has been passed a certificate it will also respond to HTTPS
77+
requests and will redirect all HTTP requests to HTTPS. Otherwise it will respond
78+
only to HTTP requests.
79+
80+
You can use [Let's Encrypt](https://letsencrypt.org/) to get an SSL certificate
81+
for free.
82+
83+
Do not expose `code-server` to the open internet without SSL, whether built-in
84+
or through a proxy.
85+
5986
### Build
6087

6188
See

‎doc/quickstart.md

-9
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@
77
## Usage
88
Run `code-server --help` to view available options.
99

10-
### Encrypting traffic with HTTPS
11-
To encrypt the traffic between the browser and server use `code-server --cert`
12-
followed by the path to your certificate. Additionally, you can use certificate
13-
keys with `--cert-key` followed by the path to your key. If you pass `--cert`
14-
without any path code-server will generate a self-signed certificate.
15-
16-
You can use [Let's Encrypt](https://letsencrypt.org/) to get an SSL certificate
17-
for free.
18-
1910
### Nginx Reverse Proxy
2011
The trailing slashes are important.
2112

0 commit comments

Comments
 (0)
Please sign in to comment.