How to setup admin user in config.json in nodebb


  • For build promotions we have to auto create the admin account from Jenkins or some environment variable
    can we use config.json to setup admin account

    please guide us, How can we use the below command.
    ./nodebb setup [options] [config]

    We refer the below link but not successed:
    https://community.nodebb.org/topic/14068/setting-up-nodebb-for-ci-cd-pipeline

  • NodeBB

    You should be able to pass in initial options as a json string

    node app --setup=\"{\\\"url\\\":\\\"http://127.0.0.1:4567\\\",\\\"secret\\\":\\\"abcdef\\\",\\\"database\\\":\\\"mongo\\\",\\\"mongo:host\\\":\\\"127.0.0.1\\\",\\\"mongo:port\\\":27017,\\\"mongo:username\\\":\\\"\\\",\\\"mongo:password\\\":\\\"\\\",\\\"mongo:database\\\":0,\\\"admin:username\\\":\\\"admin\\\",\\\"admin:email\\\":\\\"test@example.org\\\",\\\"admin:password\\\":\\\"123456\\\",\\\"admin:password:confirm\\\":\\\"123456\\\"}\"

    Not sure if ./nodebb setup also takes a json string for initial values @pitaj?

  • Global Moderator

    @baris it's also an option on ./nodebb setup. Look at ./nodebb help setup for options.

Suggested Topics

| |