License Management
Access to enterprise features for Nexus Repository requires a Professional (Pro) license. Visit Sonatype website for details on pricing and how to purchase a license.
Methods to Install a License
Adding or removing a license requires the nx-license
privileges. In general, we recommend uninstall old licenses before installing the new license to reduce risk of leaving behind incorrect data in the deployment.
Which methods to use depends on your deployment model. License management differs between single-instance and clustered deployments.
Single-Instance Deployment
Any method for installing a license is suitable, however the user interface is the fastest method when first getting started.
Containerized Environment
We recommend using the REST API when removing or updating a license in a containerized or OpenShift environment. Using the system configuration method to update the configuration files in container is challenging and may lead to inconsistency in upgrading your deployment.
Clustered Deployments
Every instance in a cluster must have a valid license. Administrators may update the license for the whole cluster by installing a new license on any single node. The new license is stored in the database for seven days during which nodes use the license expiration date to compare their license with the database. The other nodes update their license automatically when a newer license is detected.
Update your license according to the recommend method found for your deployment model.
Administrators must update their cluster configuration files with the new license to use when starting new nodes.
Before the 3.74.0 release, updating the license through the user interface only installs the license on the single node. We recommend using the IP address of each node to make API requests.
License Management in the User Interface
View the installed license in Nexus Repository by navigate to Administration → System → Licensing in the user interface. This page shows a summary of the license terms, the licensed Sonatype solutions, and the contact details of the account owner.
In this view you may install or update the license.
Install a License in the User Interface
To install a license use the following steps:
Navigate to Administration → System → Licensing in the user interface
Select Choose File under install license, select the License File and Upload License
Select
I Accept
the terms stated in the End User License AgreementRestart Nexus Repository for the license to take effect
After restart, the licensing panel displays the features associated with your license.
Install a License with the REST API
Use the Licensing API to automate installing or uninstalling the license file on running instances.
See Licensing API
Install the License with System Properties
You may install a license using a system property the first time Nexus Repository is initialized. Once a license is installed, this property is ignored. Removing the license file property does not uninstall the license.
Create a new file in the data directory with the following path:
/sonatype-work/nexus3/etc/nexus.properties
Add the following property:
nexus.licenseFile=/absolute/path/to/license.lic
The license file is provided through an email to the account manager from Sonatype. This file must be stored in a location readable by the operating system user running the Nexus Repository process.
Start Nexus Repository
Troubleshooting
The Nexus Repository logs a message on setting the license using the system property.
2017-10-23 14:40:19,654-0500 INFO [jetty-main-1] *SYSTEM com.sonatype.nexus.licensing.ext.internal.NexusLicenseInstaller - Installing license from property nexus.licenseFile=/absolute/path/to/license.lic
When a license already exists this property is ignored.
2017-10-23 14:40:19,654-0500 INFO [jetty-main-1] *SYSTEM com.sonatype.nexus.licensing.ext.internal.NexusLicenseInstaller - Ignoring property nexus.licenseFile=/absolute/path/to/license.lic. A license is already installed.
Expired Licenses
When your license expires, Nexus Repository is disabled except to install a new license or generate a support zip. The Sonatype account team provides the license as a .lic
file in an email sent to the primary stakeholders.
To update an expired license, uninstall the license using the Licensing API. Follow the instructions for your deployment model to install a new license.
See Licensing API