Skip to content

Commit 7dee2ce

Browse files
ops4lifeclaude
andcommitted
docs: document default password retrieval and custom password usage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 291e588 commit 7dee2ce

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,29 @@ docker run -it -p 8080:8080 ops4life/code-server:latest
2323

2424
Then open [http://localhost:8080](http://localhost:8080) in your browser.
2525

26+
### Default password
27+
28+
On first run, a config file is written to `/root/.config/code-server/config.yaml` inside the container with an auto-generated password. To retrieve it:
29+
30+
```bash
31+
docker exec <container_id> cat /root/.config/code-server/config.yaml
32+
```
33+
34+
The output will contain the password:
35+
36+
```yaml
37+
bind-addr: 0.0.0.0:8080
38+
auth: password
39+
password: <auto-generated>
40+
cert: false
41+
```
42+
43+
To set a custom password, pass the `PASSWORD` environment variable:
44+
45+
```bash
46+
docker run -it -p 8080:8080 -e PASSWORD=yourpassword ops4life/code-server:latest
47+
```
48+
2649
## Local build
2750

2851
```bash

0 commit comments

Comments
 (0)