Modify the default administrator email address
NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.
During the deployment of Discourse, the administrator email used by default is email@example.com. As the administrator user, you most likely want to change it to your personal email address.
Changing the default administrator email requires an email verification from the current firstname.lastname@example.org email address, which is not possible from the Discourse settings panel. To do so, you need to perform some queries in the PostgreSQL database.
Follow the steps below in order to change the default administrator email in Discourse:
Load the Bitnami console (Windows, Linux or macOS installers) or log in to the virtual machine console (OS X VM).
Enter the Rails console. Depending on your installation type, run the commands below:
Approach A (Bitnami installations using system packages):
$ cd installdir/discourse $ RAILS_ENV=production bundle exec rails c
Approach B (Self-contained Bitnami installations):
$ cd installdir/apps/discourse/htdocs/ $ sudo RAILS_ENV=production bundle exec rails c
A new prompt should appear, as shown below:
At the prompt, run the following commands to change the email address of the default user account to a new email address. Replace the EMAIL_ADDRESS placeholder in the commands below with your desired email address:
u = User.find_by_username("user") u.email = "YOUR_NEW_EMAIL_ADDRESS" u.email_tokens.create(email: u.email) u.activate u.save!
The default administrator email address will be changed. You can verify the changes in your application admin panel: