-
Notifications
You must be signed in to change notification settings - Fork 6k
Added Password updates to the self hosted index.md #625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
55cad28
630f251
6ef0a33
ad0738d
567a183
2f02ade
d56c91a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,10 +50,22 @@ Options: | |
-p, --port <number> Port to bind on. (default: 8443) | ||
-N, --no-auth Start without requiring authentication. | ||
-H, --allow-http Allow http connections. | ||
-P, --password <value> Specify a password for authentication. | ||
-P, --password <value> DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentic | ||
ation. | ||
--disable-telemetry Disables ALL telemetry. | ||
--help output usage information | ||
``` | ||
|
||
### Password | ||
Since version 1.903-vsc1.33.1, code-server allows you to set an environment variable PASSWORD. | ||
|
||
``` | ||
export PASSWORD="yourpassword" | ||
./code-server --allow-http | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be a newline after this codeblock if there's one above it. |
||
If you're using docker, you can use the -e flag to pass environment variables to your container | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
`docker run -it -p 127.0.0.1:8443:8443 -e PASSWORD='yourpassword' -v "${PWD}:/home/coder/project" codercom/code-server --allow-http` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be a codeblock instead of just backticks since it's a long command. |
||
|
||
### Data Directory | ||
Use `code-server -d (path/to/directory)` or `code-server --data-dir=(path/to/directory)`, excluding the parentheses to specify the root folder that VS Code will start in. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version and PASSWORD should be in
backticks
.