Upgrade Nexus Repository
Upgrading the self-hosted Nexus Repository is necessary for new features, bug fixes, performance improvements, and other security patches. Regularly updating to the latest release is recommended.
Note
Upgrading beyond Nexus Repository 3.70.x brings key architectural changes for continued support and stability:
OrientDB End-of-Life: Versions past 3.70.x no longer support OrientDB as the embedded database. You must migrate your data to either H2 or PostgreSQL before upgrading to version 3.71.0 or later.
H2 Database Upgrade: The internal H2 database was upgraded to a newer major version which requires the data to be exported and reimported into the newer version.
Java Version: Nexus Repository 3.87.0+ includes a bundled Java 21 runtime. You normally do not need to upgrade system Java unless Nexus is configured to use an external JVM
(`APP_JAVA_HOME` / `INSTALL4J_JAVA_HOME_OVERRIDE`)or you depend on system JVM customizations.
Pre-Upgrade Checklist
Review the Release Notes
The release notes list compatibility or breaking changes. Changes to the architecture of Nexus Repository require users to review the new required configuration.
Download the Latest Binary
Download the latest installer archive for your platform from the Downloads page.
Extract the newest downloaded distribution archive using the standard approach. Archive distribution offers the familiar process of downloading and simply extracting the installation archive. There is no graphical or automated process and all commands are done inside a terminal console.
Content Replication
Pause content replication on the target instance while performing the upgrade to allow for a clean, predictable timeline for when replication is down. Re-start replication once you've upgraded both instances to the same version.
Compare the nexus.vmoptions File
Compare the
bin/nexus.vmoptionsfile with your existing version. This file contains settings such as the temp file location and JVM memory setting.Jetty HTTPS Access
Check that the
etc/jetty/jetty-https.xmlSSL keystore location is available for the new installation and configured according to our recommendations.Review Custom Configuration
If you manually adjusted any other install files under
./etcyou need to perform a different comparison between the old files and the new files and apply your changes when applicable to the new version.
Note
Nexus Repository 3.87.x and later use a bundled Java 21 runtime. The default Java truststore from previous installations is not reused. If you rely on certificates added to the previous Java truststore (for example, for proxy repositories, LDAP, or SAML), those certificates must be reconfigured or made available to the new runtime.
Perform the Upgrade
Backup the Nexus Repository
Before performing the upgrade, it is mandatory to take a PostgreSQL database backup or ensure that PITR is configured and verified as they are used during the upgrade. The data directory is updated with changes needed to the configuration and indexing. Downgrading a Nexus Repository version is not supported and results in failure as you must restore the instance from a backup.
See Prepare a Backup
Review the Pre-Upgrade Checklist
Ideally, configuration is maintained in the external database and the data directory
Stop Nexus Repository
Stop your existing instance using your operating system service. Wait for it to stop completely.
Update your Service Scripts
Start the new installation using the scripts under
./binor adjust your operating system service to use these scripts.See Run as a Service
Restart Nexus Repository
Review the log files for issues and sign in to confirm Nexus Repository is working as expected.
Post Upgrade Validation
Validating your self-hosted Nexus Repository upgrade is crucial for maintaining your development pipeline. We recommend automating these steps using a test CI build that performs each of the following steps.
Verify repositories are online and accessible
Log in to the Nexus Repository UI as an Administrator.
Navigate to Administration → Repository → Repositories.
Examine the
Statuscolumn to confirm that the status for repositories displayOnline.Other status may indicates an issue relating to storage mounting or configuration errors.
Confirm uploads and downloads successful
Testing Uploads: Test new uploads to hosted repositories using the UI upload and through client tools that publish artifacts. Uploads return an
HTTP 200/201status code when successful. Verify that the new artifact are found in the repository when browsing in the UI.Testing Downloads: Attempt to download the hosted artifacts through the UI using client tools by running a build pointing at both the hosted repository and the repository group where the hosted repository is found. Test requesting new artifacts through proxy repositories. Verify that the component was download from Nexus Repository and that the new component is found in the UI.
Testing the Artifact: For critical artifacts, compare the file size or checksum (SHA1/SHA256) against pre-upgrade values to confirm data integrity.
Test that users and service accounts authenticate
Confirm your primary administrator account (and any necessary backup accounts) can log in successfully via the UI.
When using external security realms, attempt to log in with a non-administrator user whose credentials are managed by the external system. This validates the migration of the security realm configuration. Confirm that the user has the correct access to repositories they are authorized to access.
Test that service accounts may perform the tasks required during their build.
Review logs for errors or warnings post-startup
Access the Nexus Repository logs in the data directory.
$NEXUS_DATA/log/nexus.log
Review the messages immediately following the successful service start represented by the first few thousand lines of activity.
Review the logs for messages including the terms
FATAL,ERROR, orWARNthat directly relate to data store corruption, migration failures, or critical service components failing to start.Look for messages indicating a successful startup including: "Started Jetty Server" and "Started Sonatype Nexus Repository."
Confirm blobstore verify without discrepancies
Log in to the UI as an administrator and navigate to Administration → System → Blob Stores.
Confirm that every listed blob store has a State equal to
Started. Other states indicating a problem with mounting or accessing the storage volume.Navigate to Administration → System → Tasks and run the "
Verify blob store integrity" task against production blob stores. The task summary and logs should explicitly show that the check passed without discrepancies, meaning every artifact file on disk is properly tracked by the Nexus Repository database.
