Setting an unencrypted admin password via CFConfig

I’m not sure if I should comment here or the ticket because it is tangentially related. What about the LUCEE_ADMIN_PASSWORD env variable? Having LUCEE_ADMIN_PASSWORD set in an .env file doesn’t get picked up (just tried it), presumably because of the same reason the LUCEE_INSPECT_TEMPLATE doesn’t - hierarchy. I don’t want the password saved in plain text anywhere, obviously, so where is the best place to have the password set?

It looks like the .CFConfig.json sets a hspw which is a hashed password. Do I leave that in source control? Or do I use something like "hspw":"{env:LUCEE_ADMIN_PASSWORD}" but have to keep the hashed value in the .env variable? (So then no one will know what it actually is if they need it?)

I’m probably being dumb here, ha. Just wondering the best way to go about the Lucee Admin password.

You can set an unencrypted password in CFConfig.json via adminPassword

Or just drop a password.txt in lucee-server/context

Docs updated

Thanks for the info. Maybe I’m doing something wrong, but I just tested it out, and it seems the key is pw, not adminPassword. The pair to hspw I suppose?

Works:
"pw": "blehblah"

Shows password field but always gives “No access, password is invalid” error:
"adminPassword": "blehblah"
"password": "blehblah"

No Password set yet!!:
"adminPasswordDefault": "blehblah"
"defaultAdminPassword": "blehblah"

I can also confirm that doing "pw": "{env:LUCEE_ADMIN_PASSWORD}" and then setting an env variable of the same name also works.

ah I think I must of misread the code, there’s a fair bit in there, i’ll update docs

Thanks for the help on this! It’s exactly what we were looking for.