Skip to main content

Installation Methods

The Nexus Repository distribution archives combine the application and required resources in an archive file. When testing Nexus Repository on a local workstation, the files may be extracted and run in any environment that supports a Java runtime.

For production environments, see the platform-specific sections.

Are You Ready to Deploy?

Many decisions must be considered before deploying Nexus Repository. New installations are configured to start with an embedded H2 database with components stored in the local file system. Using the start script from the command line is not resilient to server crashes. While this may be fine for testing, they are not ideal for production deployments.

Review the Planning Your Deployment documentation before proceeding.

Unpack the Archive

Unpack the archive with the following command:

tar xvzf

For production deployments, we do not recommend that Nexus Repository is run from a user's home directory, a common practice is to use /opt.

See Directories for a complete description of all files and folders in the archive.

Running Nexus Repository

The archive includes a script to use to start the application. This script accepts the following commands:

start, stop, run, restart, force-reload, status

To start the Nexus Repository:

./nexus start

Logging is outputted to the application log file.

To stop the Nexus Repository running in the background:

./nexus stop

The application may run with logging displayed in the current shell for testing with the run command:

./nexus run

Starting with the run command leaves the application running in the current shell. The application can be stopped using CTRL+C in the console.

Microsoft Windows Environments

The zip archive can be unpacked using the Windows compression utility or a third-party utility such as 7zip. Nexus Repository is not installed in the Program Files directory.

You may install Nexus Repository in the AppData\Local directory of a specific user's home directory or use a folder in the system root. (e.g., C:\nexus ). Make sure the system user has full access to the application and directories.

Use the executable nexus.exe found inside the bin directory:

nexus.exe /start

Use the nexus.exe executable in a service with the following commands:

start, stop, run, restart, force-reload, status

Helm Chart

Sonatype provides a Helm Chart to use for on-premises, AWS, and Azure resiliency and high availability deployment (HA) options.

See Resiliency and High Availability for details about resilient and HA deployments

Docker

Docker automates the deployment of applications inside virtualized Linux containers. You can create a container that supports the installation of Nexus Repository.

To install Nexus Repository with a Docker image, follow the steps at the Sonatype Docker Hub.

CloudFormation Templates on AWS

If you plan to deploy Nexus Repository to AWS, we also make available CloudFormation templates.

OpenShift Operator

An OpenShift operator is available for Nexus Repository deployments. This deployment requires that Nexus Repository use an external PostgreSQL database. The operator also supports deploying in high availability (active/active) mode.

See Using the OpenShift Operator.