Every time Nexus Repository 3 is restarted it asks to have the license installed

If Nexus Repository is requesting for license to be installed every time it is restarted, then it is probably because the OS user that Nexus Repository is started as has no home directory defined. 

The license details is stored in java preference store. In Linux this would be $USER_HOME/.java/.userPrefs/com/sonatype/nexus/professional/prefs.xml.

There are two options to resolve the issue:

Option 1) Create a home directory for the Nexus Repository process user (ensure that Nexus process user can write to the home directory).

Option 2) Add a property java.util.prefs.userRoot to the file $NEXUS_HOME/bin/nexus.vmoptions  to define the location to store the java preference store (ensure that the directory exists, and the Nexus process user can write to this directory).

To do this, edit the $installdir/bin/nexus.vmoptions file and add a line like this:


The specified directory needs to exist already and be owned by the user running Nexus Repository. It won't be created automatically.

Nexus Repository should then be restarted. The license will need to be installed, which will then be stored in the java preference store. This should then prevent license install request on subsequent restarts.

Have more questions? Submit a request


Article is closed for comments.