Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 509
huzeyfe Avatar asked Apr 27 '26 02:04

huzeyfe


2 Answers

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

like image 185
s.c Avatar answered Apr 30 '26 11:04

s.c


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.

like image 36
Frans Avatar answered Apr 30 '26 12:04

Frans



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!