MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Host Your Own NuGet Feed: Local Source vs NuGet.Server vs NuGetGallery

If your team publishes internal .NET libraries, running a private NuGet feed gives you control over package distribution, versioning, and access. This guide explains three self-hosted approaches—local folder sources, NuGet.Server, and NuGetGallery—and shows how to publish and consume packages with each.

Originally published on 2015-11-21; fully revised and updated.

Hosting your own NuGet feed

Choose the right hosting option

The best private feed setup depends on how much management, UI, and automation your team needs.

OptionSetup complexityPackage publish methodWeb UIBest for
Local folder sourceLowCopy files or nuget add to a folder/shareNoSmall teams and simple internal sharing
NuGet.ServerMediumnuget push to HTTP endpoint with API keyMinimalInternal feeds with basic server capabilities
NuGetGalleryHighServer-backed publish flowYesOrganizations needing a full package portal

Option 1: Local file-based package source

A folder source is the fastest way to share packages. Packages are stored as .nupkg files on disk or a network share. It is easy to start, but there is no built-in web feed UI or server-side management layer.

mkdir -p /srv/nuget-feed
nuget add MyLibrary.1.0.0.nupkg -Source /srv/nuget-feed
nuget list -Source /srv/nuget-feedCode language: PHP (php)

Option 2: Host NuGet.Server in an ASP.NET app

This is the closest match to the original tutorial: create an empty ASP.NET web app in Visual Studio, install NuGet.Server, and use the generated /nuget endpoint as a private package source.

Minimal setup flow

  • Create an empty ASP.NET web application in Visual Studio.
  • Open Package Manager Console and install NuGet.Server.
  • Run the app and browse to http://localhost:<port>/nuget.
  • Configure an API key in app settings, restart, then publish with nuget push.
Install-Package NuGet.ServerCode language: CSS (css)
<appSettings>
  <add key="apiKey" value="CHANGE_ME" />
</appSettings>Code language: HTML, XML (xml)
nuget setApiKey SECRETKEY -Source http://localhost:42386/nuget
nuget push MyLibrary.1.0.0.nupkg -Source http://localhost:42386/nuget
nuget list -Source http://localhost:42386/nugetCode language: PHP (php)

Option 3: Run NuGetGallery for a full portal experience

If you need a richer, gallery-style package experience, use NuGetGallery. The original post pointed to this repository. Compared with NuGet.Server, it is a larger deployment with more operational overhead.

git clone https://github.com/NuGet/NuGetGallery.gitCode language: PHP (php)

Package publish and consume workflow

flowchart LR
    A[Developer creates nupkg] --> B[Publish package]
    B --> C{Feed type}
    C --> D[Folder source]
    C --> E[NuGet.Server]
    C --> F[NuGetGallery]
    D --> G[Consumer restores package]
    E --> G
    F --> G
    G --> H[Build and release]

Client configuration example

To make a private feed available to developers and CI agents, add it to NuGet.Config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="PrivateFeed" value="http://nuget.example.com/nuget" />
  </packageSources>
</configuration>Code language: HTML, XML (xml)

Best practices and common pitfalls

  • Start simple: use a folder source or NuGet.Server first, then move to NuGetGallery only if you need portal features.
  • Secure publishing endpoints with strong API keys and controlled network access.
  • Standardize feed configuration in source-controlled NuGet.Config files.
  • Define package retention and cleanup policies to avoid uncontrolled storage growth.
  • Validate commands and app settings against the exact NuGet tooling and server version you run.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Publish NuGet Packages to NuGet.org: CLI Steps, Workflow, and CI Example

Learn how to publish a NuGet package to NuGet.org using either nuget.exe or the dotnet CLI. This revised guide includes a workflow diagram, command comparison, and a CI-friendly example.

Read More

How to Create NuGet Packages with nuget.exe (Assembly, .nuspec, and .csproj Methods)

Learn three practical ways to build NuGet packages using nuget.exe: from an existing assembly, from a convention-based folder layout, or directly from a Visual Studio project. This guide includes commands, folder conventions, token behavior, and common pitfalls.

Read More

DOTNET: Capstone Project for DOTNET Performance Optimization

1. Recommended GitHub Application Chosen app: NimblePros/eShopOnWeb Repo: https://github.com/NimblePros/eShopOnWeb (GitHub) Why this one: We’ll treat: 2. Capstone: High-Level Structure Your “DOTNET Performance Optimization Capstone” will use eShopOnWeb…

Read More

Database Performance Optimization in .NET + MSSQL

A Complete End-to-End Guide for High-Performance Data Access in ASP.NET Applications ⭐ PREFACE Modern ASP.NET applications rely heavily on databases—not just to store records, but to power…

Read More

DOTNET: Kestrel-only / ASP.NET Core hosting-side performance techniques

Rajesh Kumar I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have…

Read More

DOTNET: IIS Performance Checklist

✅ IIS-Only Performance Optimization Settings (Complete List) 1. Application Pool Settings (IIS Core) ✔ Start Mode ✔ Idle Time-out ✔ Worker Process Settings ✔ Recycling Settings 2….

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Puja kushwaha
Puja kushwaha
27 days ago

Hosting a private NuGet feed can help teams share packages and keep project dependencies under control. It is important to set clear access rules so only approved users can publish or download packages. Versioning packages carefully also helps prevent unexpected changes from breaking existing projects. Teams should plan backups and test package restore during their build process. These steps make package sharing safer and more reliable as projects grow.

1
0
Would love your thoughts, please comment.x
()
x