Mailcow (Dockerized) Admin Password Reset
If you have installed Mailcow (dockerized) on your server and don’t know your admin login password anymore, you don’t have to worry about your data. You can easily reset the admin password yourself.
Log in to the server via SSH
To reset the password, you must log in to the server via SSH using Putty or similar. Use the root access for this.
Change to the Mailcow directory
Now you need to change to the directory where you installed Mailcow. By default this is /opt/mailcow-dockerized.
cd /opt/mailcow-dockerized
Reset password
Next you can use the script that comes with Mailcow to reset the admin password.
./helper-scripts/mailcow-reset-admin.sh
Run the script. You will be asked if you really want to reset the password. Acknowledge the question with a “Y” or “yes” followed by [Enter].
After that you will see the new password.
root@14640-21671:/opt/mailcow-dockerized# ./helper-scripts/mailcow-reset-admin.sh Checking MySQL service... OK Are you sure you want to reset the mailcow administrator account? [y/N] yes Working, please wait... Reset credentials: --- Username: admin Password: T2Kj9TtM1ZhngAWD TFA: none
The password was reset
Your password has now been changed to “T2Kj9TtM1ZhngAWD”. You can now log in to Mailcow. Please note that this only changes the administrator password and not your password for SoGo or IMAP/SMTP logins.