How To Host Your Own [Private/Internal/Public] Package Repository Server (aka Package Feed)

Why?

Chocolatey has had the ability to be able to work with packages from one or more sources since its inception back in 2011. With that, Chocolatey comes with a default package repository configured - the community package repository (https://chocolatey.org/packages). However due to the community repository being in the public domain and subject to distribution rights, it has a failure point in that it can not be 100% reliable (most packages can't contain software and must download at runtime). It's not something an organization hosting their own package repository would be subject to, so we recommend organizational use of Chocolatey should include an internal package repository. Organizations looking to use Chocolatey should review the following topics to learn more:

Host your own server

There are three types of package repositories, folder/unc share, simple server, and the sophisticated package gallery.

Known Hosting Options

Some of these options also work from a non-Windows hosting perspective. See Non-Windows Hosting.

Others

These are other known servers, but we don't know the quality or compatibility of these frameworks as they relate to Chocolatey packages.

Package Version Immutability

A package version is immutable on some sources. This means that everybody's version 1.0.1 of a particular package is the same. You do not need to worry about this when updating with newer versions of packages, because each package version compiled nupkg has the unique version in the name (e.g bob.1.0.0.nupkg vs bob.1.0.1.nupkg ).

Package immutability is usually desired, because then you know that everyone on v1.0.0 of a package has exactly the same code as does even everyone else. Even a broken version v1.0.0 gives you a global understanding that everyone who has v1.0.0 has exactly the same bits. This really simplifies administration. Without immutability, there is no guarantee that a version of a package installed is the same as the version of the package at the source.

Local Folder / UNC Share (CIFS)

Perhaps the easiest to set up and recommended for testing quick and dirty scenarios, local folder is easily a strong point when you need a quick source for packages.

Advantages

Disadvantages

Local Folder Share Setup

No really, it's that easy. Just set your permissions appropriately and put packages in the folder. You are already done.

Simple Server

There is where the bulk of NuGet OData compatible servers fall (Nexus, Nuget.Server, Chocolatey.Server, Artifactory, MyGet, etc). Since Chocolatey just uses an enhanced version of the NuGet framework, it is compatible everywhere you can put a NuGet package.

Advantages

Disadvantages

The actual limit for package sizes varies depending on what each simple server can handle (usually determined by the limitation of pushing a package to the server). If you determine what those are, we'd be happy to list each one here.

Simple Server Setup

Most hosting options have great information on how to set up the package repository. When it comes to Chocolatey.Server and NuGet.Server, we've added additional information that is quite helpful.

Third Party / Commercial Options

If the option you've chosen is not listed, take a look at known hosting options and follow the link from there to see what the vendor provides in the way of documentation.

Chocolatey.Server Setup

Please see Set up the Chocolatey.Server. More details below on what this option provides.

Chocolatey Simple Server is a simple Nuget.Server that is ready to rock and roll. It has already completed Steps 1–3 of NuGet's host your own remote feed. Some things to consider with Chocolatey.Server as compared to other options:

NOTE: Commercial options of Chocolatey also may have support for the Chocolatey.Server.

NuGet.Server Setup

Setting up NuGet.Server is very much a hands on approach for a packaging server - it requires Visual Studio as you will be adding the NuGet package to a Website project. We recommend looking at Chocolatey.Server as it is nearly the same thing but fully ready to go (and with Chocolatey enhancements).

Many google searches will throw out good ways to set up your own feed (hint: search for "host your own NuGet server feed")
Some notable references:

This is like what https://chocolatey.org (the community feed runs on). It is the most advanced, having both a file store for packages and a database for tracking all sorts of information.

Advantages:

Disadvantages:

Only approach this if you are a Windows Admin with significant experience in setting up SQL Server databases and IIS for ASP.NET MVC sites. We don't have resources to help support the setup, but we can point you to NuGet Gallery Setup.

At this time we don't have setup instructions and are not keen to answer questions specifically surrounding the setup of a Chocolatey Gallery (the code behind chocolatey.org). This is due to specific necessary settings regarding the community packages repository and tight integration to what it offers. Chocolatey for Business is likely to offer a gallery at some point, depending on prioritization.

Non-Windows Hosting

If you don't want to host on Windows you have only the following options (from least advanced to most advanced - these options typically also work on Windows):

Note: NuGet.Java.Server, TeamCity and JNuGet are about the same in terms of sophistication (they are ordered alphabetically).