Setting Up An Internal Chocolatey Package Repository

If your organization is serious about using Chocolatey as a means for Windows package management, then setting up your own internal package repository is a must.

While, the Chocolatey community repository is full of great Windows packages, chances are you do not want all your internal client machines reaching out to the internet for every package install. It is obviously insecure, not mention will undoubtedly be slower.

There is a slew of solutions for hosting your own repository, such as ProGet, Teamcity, SCCM or just a plain old file share. In this article, I will illustrate setting up a Chocolatey Simple Server, which is an IIS web server with some NuGet framework stuff. It is a great choice if your organization is on the small-medium side due to the cost (free) and setup.

Installing Chocolatey Server with Chocolatey

There are a few ways to install Chocolatey Server, but the one I prefer is using the Puppet module. The reason for this is that it automates almost all that you will need to get your server up and running. What the module does not do is some added configuration that I will add on in Puppet. These configurations are setting the firewall, configuring the app pool identify and setting a virtual directory to point to a UNC share which will house our Chocolatey packages. Keep in mind there could be others depending on your needs such as using an SSL certificate.

If you do not want to use Puppet for this, you can simple use the Chocolatey CLI to install it, which will do most of the setup:

PS C:\Users\Administrator> choco install chocolatey.server –y

Creating Puppet configuration for Chocolatey Server

On my Puppet master server, I will first install the Chocolatey Server module:

[vagrant@puppet production]$ puppet module install chocolatey-chocolatey_server 

Notice: Preparing to install into /home/vagrant/.puppetlabs/etc/code/modules ...

Notice: Downloading from ...


Notice: Installing -- do not interrupt ...


└─┬ chocolatey-chocolatey_server (v0.0.5)

  ├─┬ puppet-iis (v1.4.1)

  │ └── puppetlabs-stdlib (v4.24.0)

  ├── puppet-windowsfeature (v1.1.0)

  ├── puppetlabs-acl (v1.1.2)

  └── puppetlabs-powershell (v1.0.6)


Comments are closed.