﻿# Nexus Hosted NuGet repository

Both Nexus OSS and Nexus Pro offer three types of NuGet repository, Hosted, Group, and Proxy.  This guide will cover creating a Hosted NuGet repository and adding it as an External Feed in Octopus Deploy.

:::div{.info}

This guide was written using Nexus OSS version 3.37.0-01
:::

## Configuring a Hosted NuGet repository

From the Nexus web portal, click on the **gear icon** to get to the **Administration** screen.

:::figure
![Administration gear Icon](/docs/img/packaging-applications/package-repositories/guides/images/nexus-nuget-administration.png)
:::

Click on **Repositories**

:::figure
![Repositories](/docs/img/packaging-applications/package-repositories/guides/images/nexus-repositories.png)
:::

Click **Create repository**

:::figure
![Create repository](/docs/img/packaging-applications/package-repositories/guides/images/nexus-create-repository.png)
:::

Choose **nuget (hosted)** from the list of repositories to create

:::figure
![NuGet (hosted)](/docs/img/packaging-applications/package-repositories/guides/nuget-repositories/images/nexus-nuget-repository.png)
:::

Give the repository a name and change any applicable configuration options.  Click **Create repository** when you are done.

:::figure
![Create repository](/docs/img/packaging-applications/package-repositories/guides/nuget-repositories/images/nexus-create-nuget-repository.png)
:::

When the repository has been created, click on the entry in the list to bring up the repository properties.

:::figure
![MyNexusNugetRepo](/docs/img/packaging-applications/package-repositories/guides/nuget-repositories/images/nexus-mynexusnugetrepo.png)
:::

Copy the URL property, that is what you will use when adding it as an external feed

:::figure
![Repository URL](/docs/img/packaging-applications/package-repositories/guides/nuget-repositories/images/nexus-nuget-url.png)
:::

Optionally upload a NuGet package to the repository so you can verify search functionality when added as an external feed.

## Adding an Nexus NuGet repository as an Octopus External Feed
Create a new Octopus Feed by navigating to **Deploy ➜ Manage ➜ External Feeds** and select the `NuGet Feed` Feed type. 

Give the feed a name and in the URL field, paste the URL you copied earlier.  It should look similar to this format:

`https://your.nexus.url/repository/[repository name]`

![Nexus NuGet feed](/docs/img/packaging-applications/package-repositories/guides/nuget-repositories/images/nexus-nuget-feed.png)
