License Management
License Management
Enterprise features are available to Nexus Repository Cloud deployments and self-hosted deployments with a Nexus Repository Professional (Pro) license.
Methods to Install a License
Adding or removing a license requires the nx-license privileges. In general, we recommend uninstalling old licenses before installing the new license to reduce the risk of leaving behind incorrect data in the deployment.
Which methods to use depends on your deployment model. License management differs between cloud-instance and self-hosted deployments.
Nexus Repository Cloud
Licenses are installed through the user interface.
Single Self-Hosted Instance
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 the 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 recommended 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 navigating to Settings → 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.
License Expiration Notifications
Nexus Repository sends notifications when the product license is approaching expiration. The notification timing is configured using the License Expiry Notification capability. Notifications are set to the number of days before license expiry to send notifications. A list of emails is required to send the message.
See Capabilities
Notifications are also updated in the user interface as the license expiration date approaches. A Status Check indicator will warn when the license is to expire soon.
See Status Checks
Nexus Repository Cloud Usage Metrics
The repository usage metrics are displayed in the Usage section, located under Settings in the left-hand menu. This view allows you to monitor your repository data egress and storage trends over time.
Historical Usage
This report provides a view of your repository usage by month.
Total Egress
The total amount of data transferred out of Nexus Repository Cloud during the month. Egress includes data leaving the cloud storage service when users download components, as well as data served by the Nexus Repository user interface and APIs. These values are used to calculate your usage-based costs.
Egress % Change
The rate of change in total egress compared to the previous month.
Peak Storage
The total amount of storage used by components in the instance within a given month, including any components deleted during that same period.
% Change Storage
The rate of change in peak storage compared to the previous month.
Repository Historical Usage Metrics
The repository historical usage metrics are displayed on the usage tab of the license page. This view displays your repository usage trends over the past 12 months.
See Usage Metrics
Note
This report does not begin gathering data until after upgrading to the Nexus Repository release 3.80.0 or later. After the upgrade, only a single month is displayed. Additional results are aggregated from that point on.
Month
The period of the provided metrics.
Peak Components
Peak components is the total count of unique components stored in the instance within a given month, including any components deleted during that same period.
Components % Change
The rate of change in peak components from the previous month.
Total Requests
Requests are HTTP interactions to format-specific endpoints of the Nexus Repository. These include actions like downloading, uploading, or searching components.
Requests % Change
The rate of change in total requests from the previous month.
Total Egress
Egress is based on application-level tracking and may differ from actual network transfer measured by your cloud provider. Our testing indicates a buffer of around 15% more traffic when estimating the total amount of egress seen in cloud environments.
Peak Storage
The total amount of storage used by components in the instance within a given month, including any components deleted during that same period.
See our End User License Agreement for details.
Install a License in the User Interface
To install a license use the following steps:
- Navigate to Settings → System → Licensing in the user interface
- Select Choose File under install license, select the License File and Upload License
- Select
I Acceptthe terms stated in the End User License Agreement - Restart 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.licThe 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
Overriding the License File Location
The default location of the license file stored on disk may be modified by changing the Java user preferences.
See Configuring the Runtime Environment
Monitoring Recent Connections
You may approximate the number of unique logins using a log parser on the request.log files. The IP address and authenticated user ID associated with each request appears in columns 1 and 3 of the log line.
See our knowledge base article for more information.
Copying an Installed License
An installed license may be moved from one Nexus Repository instance to another instance as the license is stored in the Java user preferences directory for the user that owns the server process. These instructions only apply to Linux and MacOS environments and do not apply to Windows.
Locate the product license in the home directory of the user running Nexus Repository at this location:
~/.java/.userPrefs/com/sonatype/nexus/professional/prefs.xml