Private Nuget Servers – Klondike

UPDATE: A better solution I think is to use VSTS’s new package Management feature if you are using VSTS already.

Nuget is a great way to share packages around, but a lot of the LOB apps I work on we need a private solution that isn’t open to the public. I’ve setup Klondike ( a couple of times now and find it to be light weight and dumb enough not to give any problems.

I even used it for my octopack nuget files (instead of the built in nuget server in octopus) as I find it handy just to have all your nuget in the one place.

Installation is easy, just extract it to a folder and point an IIS webroot at it. Supports self-hosted in OWIN as well if that is more your flavor.

To get everything setup i generally set this value in the web.config, it treats all request from the local server as admin. So using a web browser on the local server I get everything setup.

<add key="NuGet.Lucene.Web:handleLocalRequestsAsAdmin" value="true" />

I’ve dropped this on servers on a domain before and used windows auth as well for authentication at an IIS level, which works fine. You could also use Basic Auth and create user accounts on the local server to manage access which I’ve done as well without any complaints.

In general terms, most projects in private sources that I work on, if you have access to the source control you should have permission to read from the nuget server, so I leave the credentials for the nuget server in my nuget.config at the root of each project in source.

Example configuration below from one of my projects:

<?xml version="1.0" encoding="utf-8"?>
<add key="All" value="(Aggregate source)" />
<add key="enabled" value="true" />
<add key="disableSourceControlIntegration" value="true" />
<add key="MyNugetServerInAzure" value="" />
<add key="" value="" />
<add key="Username" value="MyUserAccount" />
<add key="ClearTextPassword" value="XXXXX />

And then create the User Account in the Computer Manager on the server and setup IIS Authenticaiton on the Klondike website like so:


And you are away. I have had odd issues using the above with the role mappings, so i generally leave these settings alone

<add key="PackageManager" value="" />
<add key="AccountAdministrator" value="" />

The only thing to point out in the config I change generally for Klondike is is

<add key="NuGet.Lucene.Web:localAdministratorApiKey" value="XXX" />

And drop in an API key to use when updating packages, I don’t always give this out to all the developers working on it, but instead save the API key in the build server to force check-in to update packages via the build system.

One last issue i have with Klondike is this error “The process cannot access the file ‘C:\inetpub\wwwroot\App_Data\Lucene\write.lock’ because it is being used by another process.”


If you recycle the worker process this happens, touch the web config file and it will fix it up.

3 thoughts on “Private Nuget Servers – Klondike

  1. Pingback: Private Nuget Servers – VS Team Services Package Management | beerandserversdontmix

    • this is in the last line of the post
      …If you recycle the worker process this happens, touch the web config file and it will fix it up.

      If you see this happening a lot you may have done somthing like having two sites in IIS on the same folder, or maybe you have web garden turned on (in which case turn it off)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s