- Install .NET Core SDK
- Download and extract BaGet's latest release
- Start the service with
dotnet BaGet.dll
- Browse
http://localhost:5000/
in your browser
You can push a package using this command:
dotnet nuget push -s http://localhost:5000/v3/index.json newtonsoft.json.11.0.2.nupkg
You can use BaGet as a Symbol Server by uploading symbol packages. After you've pushed a package to BaGet, you can push its corresponding symbol package using this command:
dotnet nuget push -s http://localhost:5000/v3/index.json symbol.package.1.0.0.snupkg
You will need to add the symbol location http://localhost:5000/api/download/symbols
to load symbols from BaGet.
Use this guide for Visual Studio.
If you'd like, you can run BaGet on Docker:
- Pull the latest docker image:
docker pull loicsharma/baget
- Create a file named
baget.env
with the content:
ApiKey=NUGET-SERVER-API-KEY
Storage__Type=FileSystem
Storage__Path=/var/baget/packages
Database__Type=Sqlite
Database__ConnectionString=Data Source=/var/baget/baget.db
Search__Type=Database
!!! info
The baget.env
file stores BaGet's configuration as environment
variables. To learn how these configurations work, please refer to
ASP.NET Core's Configuration documentation.
- Create a folder named
baget-data
- Run:
docker run --rm --name nuget-server -p 5555:80 --env-file baget.env -v "$(pwd)/baget-data:/var/baget" loicsharma/baget:latest
- Push your first package with:
dotnet nuget push -s http://localhost:5555/v3/index.json -k NUGET-SERVER-API-KEY newtonsoft.json.11.0.2.nupkg
- Open the URL
http://localhost:5555/
in your browser