Repository Management with Nexus


16.2. NuGet Proxy Repositories

The NuGet Gallery is the central repository used by all package authors and consumers. To reduce duplicate downloads and improve download speeds for your developers and CI servers, you should proxy the NuGet Gallery with Nexus. If you use other external repositories, you should also proxy these.

To proxy an external NuGet repository, you simply create a new Proxy Repository as documented in Section 6.2, “Managing Repositories”. The Provider has to be set to NuGet. The Remote Storage Location has to be set to the URL of the remote repository you want to proxy. The URL for the main NuGet Gallery repository is

A complete configuration for proxying the NuGet Gallery is visible in Figure 16.1, “NuGet Proxy Repository Configuration for the NuGet Gallery”.


Figure 16.1. NuGet Proxy Repository Configuration for the NuGet Gallery

The repository configuration for a NuGet proxy repository has an additional tab titled NuGet as visible in Figure 16.2, “NuGet Gallery with Package Source URL”. It displays the Package Source URL that is URL where the repository is available as a NuGet repository.


Figure 16.2. NuGet Gallery with Package Source URL

By default, searches in NuGet repositories in Nexus will be passed through to the remote repositories, and the search results are merged with internal search results and included in an internally managed index. This merging has to make some assumptions to generate component counts.

The accuracy of searches for components available in a remote repository can benefit from an index download. In most use cases, this will not be necessary. If you need a completely accurate view of available components and counts, you can create a scheduled task to download the remote index. Create a new task with the task type Download NuGet Feed in the Scheduled Tasks administration section.

By default the task incrementally downloads information about the latest version of published packages. If you want details about all versions, you can select the Fetch all versions? checkbox.

The NuGet Gallery is, at this stage, over 1GB large and downloading the feed will therefore take a little while. In addition, the index will be rather large and having the complete index in your Nexus NuGet database negatively impacts search performance.


Prior to Nexus 2.9 the scheduled task to download the feed was created automatically, since it was required then. This is no longer necessary and most users should remove the task and carefully consider the implications of running the task.