The simple way

Make sure either:

  • The env var DISCOURSE_DEVELOPER_EMAILS is set to a comma delimited list of admin emails.

(OR)

  • If using config/discourse.conf that developer_emails is set to a comma delimited list of admin emails.

For example:

DISCOU[email protected],[email protected] rails s

Will automatically set the accounts of [email protected] and [email protected] to admins after they create accounts.

The hard way

You can also use the Rails console to set yourself as an administrator:

./launcher enter my_app
# rake admin:create
Email:  [email protected]
Password:  
Repeat password:  

Ensuring account is active!

Account created successfully with username myemail
Do you want to grant Admin privileges to this account? (Y/n)  Y

Your account now has Admin privileges!

Source: https://meta.discourse.org/t/how-to-create-an-administrator-account-after-install/14046