NuGet Server Logo

NuGet Server

NuGet Server acts as a wrapper of the NuGet.Server package, but installed through a wizard. NuGet Server is distributed with its own web server, you don't need IIS installed.

So what do I get with NuGet Server?

A fully functional NuGet server that can be installed as a Windows service. Purchase, download, and double click the installer; our wizard will guide you through the rest. To start serving your packages, simply place your NuGet packages in the Packages folder!

Buy NuGet Server for $9

NuGet Server is a community project, and is intended chiefly for hobbyist, students, and for simple projects that need only need NuGet packages. It is not a solution for more advanced work, or for projects where different types of packages will be needed.

ProGet, by Inedo, is a much more comprehensive package repository that supports NuGet and many other types of packages and can be downloaded for free.

Download ProGet for Free

You can also build NuGet.Server yourself, just follow the instructions below.

Free NuGet Server in 5 not so easy steps

Source: http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds

  1. Create a new Empty Web Application in Visual Studio

    Go to the File -> New -> Project menu option (or just hit CTRL + SHIFT + N) which will bring up the new project dialog and select ASP.NET Empty Web Application as in the following screenshot.

    New Project dialog box

    This results in a very empty project template.

    New project in Solution Explorer

  2. Install the NuGet.Server Package

    Now right click on the References node and select Manage NuGet Packages to launch the NuGet dialog (alternatively, you can use the Package Manager Console instead and type Install-Package NuGet.Server).

    Click the Online tab and then type NuGet.Server in the top right search box. Click Install on the NuGet.Server package as shown in the following image.

    NuGet.Server package

  3. Configure the Packages folder

    Starting with NuGet.Server 1.5, you can configure the folder which contains your packages. The web.config file contains a new appSetting, named packagesPath. When the key is omitted or left blank, the packages folder is the default ~/Packages. You can specify an absolute path, or a virtual path.

    <appSettings>
       
    <add key="packagesPath" value="C:\MyPackages" />
    </appSettings>
  4. Add Packages to the Packages folder

    That's it! The NuGet.Server package just converted your empty website into a site that's ready to serve up the OData package feed. Just add packages into the Packages folder and they'll show up.

    In the following screenshot, you can see that I've manually added a few packages to the default Packages folder.

    Adding packages to the packages folder

    If you want these packages to be published (such as when selecting Build -> Publish from the application menu) you'll also need to select the .nupkg files in Solution Explorer and change the Build Action property to "Content".

    Starting with NuGet.Server 1.4, you can also add and delete packages to the lightweight feed using NuGet.exe. After installing the package, the web.config file will contain a new appSetting, named apiKey. When the key is omitted or left blank, pushing packages to the feed is disabled. Setting the apiKey to a value (ideally a strong password) enables pushing packages using NuGet.exe.

    <appSettings>
       
    <add key="requireApiKey" value="true" />
       
    <add key="apiKey" value="" />
    </appSettings>

    If however your server is already secured and \ or you do not require an api key to perform this operation, set the requireApiKey value to false.

  5. Deploy and run your brand new Package Feed!

    I can hit CTRL + F5 to run the site and it'll provide some instructions on what to do next.

    Package feed home page

    Clicking on "here" shows the OData over ATOM feed of packages.

    OData over ATOM package feed

    Now all I need to do is deploy this website as I would any other site and then I can click the Settings button and add this feed to my set of package sources as in the following screenshot.

    Adding new feed to package sources

    Note that the URL you need to put in is http://yourdomain/nuget/ depending on how you deploy the site.

    Yes, it's that easy! An alternative way of publishing packages to this server is by simply placing the nupkg under the the Packages folder and they are automatically syndicated.