dockernexusnexus3

Nexus `admin.password` file is missing in version 3.28.1


I've created a Nexus server using the official Docker image from Sonatype. My version is 3.28.1 and I can't find admin password or admin.password file in the usual place.

cat /opt/sonatype/sonatype-work/nexus3/admin.password

I've also tried default admin password admin123 and it did not work?

I could not find any release notes about this change and I would like to know where to find the admin password.

Thanks in advance.


Solution

  • Are you using the sonatype/nexus3 image? Then it should be in /nexus-data.

    If it's not there, then the only solution I've found was to remove all the contents of the /nexus-data directory and restart the container. That should initialize a new config, including a new admin password, which should now be available at /nexus-data/admin.password.