Hashed password not being asked for

Good morning, There is a 99% chance that I have just set this up wrong, however I have not been able to find any youtube videos or previous posts clarifying where I am going wrong. I created the docker-compose.yml file
---
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- PASSWORD=password #optional
- HASHED_PASSWORD= #optional
- SUDO_PASSWORD=password #optional
- SUDO_PASSWORD_HASH= #optional
- #PROXY_DOMAIN=code-server.my.domain #optional
- DEFAULT_WORKSPACE=/config/workspace #optional
volumes:
- ./appdata/config:/config
ports:
- 40002:8443
restart: unless-stopped
---
services:
code-server:
image: lscr.io/linuxserver/code-server:latest
container_name: code-server
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- PASSWORD=password #optional
- HASHED_PASSWORD= #optional
- SUDO_PASSWORD=password #optional
- SUDO_PASSWORD_HASH= #optional
- #PROXY_DOMAIN=code-server.my.domain #optional
- DEFAULT_WORKSPACE=/config/workspace #optional
volumes:
- ./appdata/config:/config
ports:
- 40002:8443
restart: unless-stopped
as well as edit the config.yaml with the hashed password:
bind-addr: 127.0.0.1:40002
auth: password
password: "$$6$$8fDldV5B7.uxqYAX$$Yd2Bknt/cSl8fzMZY/F/5bsZ8yAb6RuAEGO81AceycRNPLPTAzP0yGRNzYOqEhYyz18.iqJQ25CMCtzx7sC2F1"
cert: false
bind-addr: 127.0.0.1:40002
auth: password
password: "$$6$$8fDldV5B7.uxqYAX$$Yd2Bknt/cSl8fzMZY/F/5bsZ8yAb6RuAEGO81AceycRNPLPTAzP0yGRNzYOqEhYyz18.iqJQ25CMCtzx7sC2F1"
cert: false
However when I run sudo docker compose restart and sign out of the browser, the only password that will work is the default one. I read that the hashed one should override the default.
2 Replies
Codercord
Codercord6mo ago
<#1253674759636647936>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
.fuzzybutt
.fuzzybuttOP6mo ago
Also not sure if there is a more reliable way to make a hash. I am using mkpasswd - sh256crypt but each time I get a different hash so not sure if that really matters or not or how to make it consistent.
Want results from more Discord servers?
Add your server