Hi, I am new to Lucee… just wondering how to set server and web passwords if you using CommandBox to launch local development servers. My steps to have a Lucee Dev Server Running:
- cd to project root
- box server start
- navigate to locahost:port//lucee/admin/[ server | web ].cfm
#3 will ask to set up password.txt under /lucee-server/context/ and import file
My web searches lead to this page: Server Start - CFConfig Documentation but I am not sure if this is the answer.
@til You have to put the password.txt file on WEB-INF\lucee-server\context
directory. Please take below the path as a reference. And the password.txt file should have the password which you want to set for admin.
@cfmitrah thanks so much… I did not think to search the drive at all.
The much simpler option is to use a CommandBox module called CFConfig. It allows you to manage all sorts of configuration options automatically via JSON files or env variables. For example, just having a file called
.cfconfig.json in your web root when the server starts will import all your settings into the server, including passwords, datasources, mail servers, etc.
What I do locally to set a simple default password for EVERY server I start is documented here on this note from Pete.
Look under the “another way to go” section where you can install the
commandbox-dotenv module alongside
commandbox-cfconfig and then set a default password with these commands:
propertyFile set ~/.box.env cfconfig_adminPassword Password123!