Deleting the admin account, after first registration failed and app rebuild

Hello, I tried installing Discourse on a VPS using these instructions.

I tried adding the admin account in Step 9, and get to the part where a confirmation e-mail is supposed to be sent. This step failed due to some misconfiguration of the mail service I use (Brevo), which I have corrected.

I rebuild, which succeeds. However, when I try to create the admin account again, it won’t let me, saying username ‘must be unique’. I assume this is due to the first time it was created, but failed in the email confirmation step.

How should I go about solving this issue?

1 Like

Hi, welcome! :wave:

Did you try going back to the /finish-installation/confirm-email URL and then clicking on “Resend Activation Email” to see if it will work?

Hello, this worked. I can’t believe I hadn’t thought of this :facepalm: I was able to verify that my corrections to the SMPT worked, since I can now recieve the email.

That being said, I would really like to delete the unsuccessfully registered admin account first if possible, since I also change the admin email to a different one.

1 Like

If you can access the old email, I would change the email in the user’s preference; this seems easier. What do you think?

Ok, so I’ll edit the app.yml to the old email, rebuild, confirm email (I haven’t clicked the confirmation email yet, just tested resending it per my previous post), and just change the email from old to the new one once I have access to the admin panel. Is this roughly what you are suggesting?

Unless I misunderstand, you have nothing to change in app.yml.

If you got the confirmation email (now the settings are fixed), click on it.
Then, go to the user’s preference, and change its email to the new one you want.

The reason I thought I needed to change app.yml is because if I logged in with the old email, it wouldn’t have admin privileges, since app.yml contains the new one. So I was thinking I need to first change app.yml to the old email, then rebuild.