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.
Make docker container using following command
$ docker volume create --name nexus-data
$ docker run -d -p 8081:8081 --name nexus -v nexus-data:/nexus-data sonatype/nexus3
Then you will find admin.password file in /nexus-data folder.
Run following command to see default password!
$ docker exec -it nexus /bin/bash
bash-4.4$ cat /nexus-data/admin.password
For more detailed comment, check following url
https://hub.docker.com/r/sonatype/nexus3/#user-content-persistent-data
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With