---
title: "Chocolatey Feeds in ProGet"
nav-title: "Chocolatey (Windows/Machine)"
order: 5
---

[Chocolatey](https://chocolatey.org/) is a package manager for Windows. Similar to Linux tools like apt or yum, but designed specifically for Windows, Chocolatey is designed as a decentralized framework for quickly installing applications and tools you need.

Proget lets you create ["Feeds"](/docs/proget/feeds/feed-overview) that can be used to proxy packages from Chocolatey.org, or host your own internal packages. 

## Integrating Chocolatey with ProGet

Before installing Chocolatey packages from ProGet, you will need to add ProGet as a source using the `choco source add` command. We recommend giving the source the same name as your feed:

```bash
$ choco source add -n="«feed-name»" -s="https://«proget-server»/feeds/«feed-name»" --priority=1 
```

To make sure that your client only installs Chocolatey Packages from ProGet, we recommend removing any default sources already configured using the `choco source remove` command:

```bash
$ choco source remove -n="chocolatey"
```

### Testing Client Configuration

You can use the `choco source list` to make sure that your client is properly connected to ProGet:

```bash
$ choco source list
```

## Installing Packages

To install Chocolatey packages from ProGet, you can use the `choco install` command:

```bash
$ choco install «package-name» --version «version-name» --source «feed-name»
```

Using `«feed-name»` as a source assumes this is the name you assigned it when configuring ProGet as a source as a prerequisite. 

## Authenticating to a Chocolatey Feed

By default, Chocolatey feeds in ProGet do not require authentication and can be viewed anonymously. However, you can set a feed to require authentication to access. This will be required to push Chocolatey packages to ProGet.  

:::(info) (Authenticating with an API Key)
Rather than use your ProGet username and password, we strongly recommend using an API key for this, with `api` as the username, and then API Key as the password. You can read more about creating one on our [API Key](/docs/proget/api/apikeys) page. 
:::

When creating an API Key, fill in the fields by selecting "Feed (use certain feeds)" as the "Key type" and selecting the Chocolatey feed to authenticate to. Make sure that the required permission boxes are checked, and then select "Create API Key".

![](/resources/docs/proget-chocolatey-apikey.png){height="" width="50%"}

Then when adding ProGet as a source using `choco source add`, include the API key as a parameter:

```bash
$ choco source add -n="«feed-name»" -s="https://«proget-server»/feeds/«feed-name»" --user=api --password=«api-key»
```

## Creating and Pushing Packages

There are several ways to create Chocolatey packages like the Chocolatey CLI or manually create `.nuspec` files, following the guidelines in the [Chocolatey documentation](https://docs.chocolatey.org/en-us/create/).

Many users find the simplest method for publishing packages is by using [pgutil](/docs/proget/api/pgutil). While this does require some [minor configuration](/docs/proget/api/pgutil#sources) beforehand, it allows you to more easily specify different feeds.

:::(info) (Example:)
To upload the package `My.Package.1.0.0.nupkg` stored at `C:\chocolatey-packages\MyPackage\` to your `internal-chocolatey` feed you would enter:

```bash
$ pgutil packages upload --feed=internal-chocolatey --input-file=C:\chocolatey-packages\MyPackage\MyPackage.1.0.0.nupkg
```
:::

Your package will then be uploaded to the `internal-chocolatey` feed. To learn more about creating and publishing Chocolatey packages, see [HOWTO: Create and Push Chocolatey Packages to a Private Repository in ProGet](/docs/proget/feeds/chocolatey/howto-chocolatey-publish).

## Internalizing Chocolatey Packages

To minimize reliance on external resources for software installed using Chocolatey packages, [internalize](/docs/proget/feeds/chocolatey/howto-chocolatey-internalized#internalize-packages) your Chocolatey packages. You can see how to do this by watching [Internalizing Your Chocolatey Packages in a Privatized Repository with ProGet](https://www.youtube.com/watch?v=qrT3EehzPTQ). Internalized packages can be hosted in Chocolatey feeds.

## Differences Between Chocolatey Feeds and NuGet Feeds in ProGet

As the Chocolatey API is built on top of the NuGet v2 API, a Chocolatey feed in ProGet is actually a [NuGet feed](/docs/proget/feeds/nuget) with some slight differences in behavior:
* Packages in Chocolatey feeds have a different icon to indicate that they are intended for use by Chocolatey
* The package installation instructions also include an example of installing the package using `choco` instead of NuGet
* The [Package Usage feature](/docs/proget/feeds/chocolatey/howto-chocolatey-scan) is `enabled`, while the Package Consumers feature is `disabled`

 [Combine ProGet and Chocolatey](https://www.youtube.com/watch?v=BcTYGf7sQ8Q&t=1s) to form a complete Windows package management solution. Proget's user interface has been updated since this video, but the instructions provided are still valid.
