Forge Home


Puppet module for Sonatype Nexus


113 latest version

5.0 quality score

Version information

  • 2.0.0 (latest)
  • 1.9.2
  • 1.9.1
  • 1.9.0
  • 1.8.0
  • 1.7.5
  • 1.7.4
released Jan 18th 2022
This version is compatible with:
  • Puppet Enterprise 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
  • Puppet >= 6.0.0 < 8.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'pest-nexus', '2.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add pest-nexus
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install pest-nexus --version 2.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



pest/nexus — version 2.0.0 Jan 18th 2022

Sonatype Nexus Repository Manager Puppet module

Install and configure Sonatype Nexus.

This module was forked from hubspot/nexus.

Requirements of this module

  • puppet/archive
  • puppetlabs/stdlib


The following is a basic role class for building a nexus host. Adjust accordingly as needed.

NOTE: you must pass version to Class['nexus']. This is needed for the download link and determining the name of the nexus directory.

class role_nexus_server {
  # puppetlabs-java
  # NOTE: Nexus requires
  class{ 'java': }
  class{ 'nexus':
    version               => '3.37.3',
    revision              => '02',
    nexus_type            => 'unix',
  Class['java'] ->


Valid versions and revisions can be picked from the official page

Nginx proxy

The following is setup for using the puppet/puppet-nginx module. Nexus does not adequately support HTTP and HTTPS simultaneously. Below forces all connections to HTTPS. Be sure to login after the app is up and head to Administration -> Server. Change the base URL to "https" and check "Force Base URL". The application will be available at:


  class{ '::nginx': }

  file { '/etc/nginx/conf.d/default.conf':
    ensure => absent,
    require => Class['::nginx::package'],
    notify => Class['::nginx::service']

  nginx::resource::vhost { 'nexus':
    ensure            => present,
    www_root          => '/usr/share/nginx/html',
    rewrite_to_https  => true,
    ssl               => true,
    ssl_cert          => '/etc/pki/tls/certs/server.crt',
    ssl_key           => '/etc/pki/tls/private/server.key',

  nginx::resource::location { 'nexus':
    ensure    => present,
    location  => '/nexus',
    vhost     => 'nexus',
    proxy     => "http://${nexus_host}:${nexus_port}/nexus",
    ssl       => true,


  • Find a way to not require a version to be passed to Class['nexus']



Hubspot, Inc.