Repository Management with Nexus
6.1. Customizing Server Configuration

In a production installation of Nexus, you’ll probably want to customize the administrative password to something other than "admin123", and you might want to override the default directories that Nexus uses to store repository data. To do this, log in as the administrative user and click on Server under Administration in the left-hand navigation menu as visible in Figure 6.1, “Administration Menu in the Left Hand Panel”.
The server configuration screens subsections are documented in the following.
Nexus sends email to users who need to recover user names and password, notifications for staging and a number of other uses. In order for these notifications to work, you’ll need to configure the SMTP server settings in this dialog.
This section of the form takes an SMTP Hostname and Port as well as Username and Password. In addition you can enable SSL and/or TLS for the connection to the SMTP server. The System Email parameter defines the email address used in the From: header of an email from Nexus. Typically this would be configured as a "Do-Not-Reply" email address or a mailbox or mailing list monitored by the administrators of the Nexus server.
Once you have configured the parameters you can use the Test SMTP settings button to confirm the configured parameters and the successful connection to the server. You will be asked to provide an email address that should receive a test email message and successful sending will be confirmed in another pop up message.
The HTTP Request Settings allow you to configure the identifier which Nexus uses when it is making an HTTP request. You may want to change this if Nexus needs to use an HTTP Proxy, and the Proxy will only work if the User Agent is set to a specific value.
You can also add extra parameters to place on a GET request to a remote repository. You could use this to add identifying information to requests.
The amount of time Nexus will wait for a request to succeed when interacting with an external, remote repository can be configured with the Request Timeout and Request Retry Attempts settings.
You can choose to enable or disable security, enable or disable anonymous access, and set the username and password for anonymous access. If you choose to enable security, you are telling Nexus to enforce role-based access control to enforce read and write access to repositories.
The anonymous username and password is used to integrate with other realms that may need a special username for anonymous access. In other words, the username and password here is what we attempt to authorize when someone makes an anonymous request. You would change the anonymous username to "guest" if you wanted to integrate Nexus with Microsoft’s Active Directory.
Nexus can be configured to automatically file exception and error reports with the Nexus project in the Sonatype issue tracker. Activating this setting in your own Nexus installation helps to improve Nexus as the development team will receive automatic error reports if your Nexus instance experiences an error or a failure. The Nexus Server configuration’s Automated Error Reporting Settings section is shown in Figure 6.5, “Administration Error Reporting Settings”. This section accepts a JIRA username and password, and allows you to configure Nexus to use the default HTTP Proxy Settings when Nexus attempts to file an error report with the Sonatype issue tracker.
To sign up for an account on the Sonatype JIRA instance, go to http://issues.sonatype.org. Once you see the web site shown in Figure 6.6, “Sonatype Issue Tracker”, click on the "Signup" link below the Login form.
Fill out the sign-up form shown in Figure 6.7, “Signing Up for a Sonatype Issue Tracker Account”, and choose a username and password. This is the username and password you should use in the Automated Error Reporting Settings section of the Server configuration shown in Figure 6.5, “Administration Error Reporting Settings”.
This section allows you to change the Base URL for your Nexus installation. It is used when generating links in emails and RSS feeds. The Sonatype Nexus repository is available on http://respository.sonatype.org, and it makes use of this Base URL field to ensure that links in emails and RSS feeds point to the correct URL. If you are hosting Nexus behind a proxy server and you want to make sure that Nexus always uses the specified Base URL, check the "Force Base URL" checkbox. If the Force Base URL is not checked, Nexus will craft URLs in HTTP responses based on the request URL, but it will use the Base URL when it is generating emails.
- TIP
- This settings are especially important if Nexus is proxied by an external proxy server using a different protocol like https rather than plain http known to Nexus or a different hostname like repository.somecompany.com instead of an IP number only.
If you Nexus instance needs to reach public repositories like the Central Repository via a proxy server, you can configure one or multiple servers in this settings section.
There are a number of HTTP Proxy settings for Nexus installations which need to be configured to use an HTTP Proxy. You can specify a host, port, and a number of authentication options which might be required by your proxy server.
Tip
This is a critical, initial step for Nexus deployment in many enterprise deployments of Nexus, since these environments are typically secured via a HTTP proxy server.
Nexus Professional uses a PGP Key Server to retrieve PGP keys when validating artifact signatures. To add a new Key Server URL, enter the URL in the Key Server URL field and click on the Add button. To remove a Key Server URL, click on the URL you wish to remove from the list and click on the Remove button. Key Servers are consulted in the order that they are listed in the Key Server URLs list, to reorder your Key Server URLs, click and drag a URL in the Key Server URLs list.
Nexus can notify you of new versions of Nexus via the Nexus interface. To enable this feature, check the Enable checkbox in the New Version Notification section of the Nexus server settings as shown in Figure 6.12, “Administration New Version Availability”.
