A template for your own BTCPay Server plugin.
Learn more in our plugin documentation.
- Create root folder (Ex: branta-btcpayserver)
- Clone https://github.com/btcpayserver/btcpayserver in your root folder
- Checkout v1.3.X branch
- Clone https://github.com/BrantaOps/btcpay in your root folder
git clone git@github.com:BrantaOps/btcpay.git --recurse-submodules btcpayserver-plugin-brantaFolder structure should look like
branta-btcpayserver # (root)
|_ btcpayserver
|_ btcpayserver-plugin-branta
|_ btcpayserver
|_ BTCPayServer.Plugins.Branta- Set
Branta.Migrationsproject as the Startup Project (not in source control) - Set
BTCPayServer.Plugins.Brantaas the Default Project - Run migration
Add-Migration -c BrantaDbContext "<Migration-Name-Here>"
To install the plugin you can either Reference in Project or Generate .btcpay File
- Reference plugin project
# Enter the forked BTCPay Server repository
cd btcpayserver
# Add your plugin to the solution
dotnet sln add ../btcpayserver-plugin-branta/BTCPayServer.Plugins.Branta -s Plugins- Create appsettings.dev.json file
Path: branta-btcpayserver/btcpayserver/BTCPayServer/appsettings.dev.json
{
"DEBUG_PLUGINS": "/absolute/path/btcpayserver-plugin-branta/BTCPay.Plugins.Branta/bin/Debug/net6.0/BTCPayServer.Plugins.Branta.dll"
}- Follow commands in
BTCPayServer.Plugins.Branta/Makefilefor your operating system to generate .btcpay file - When running BTCPayServer project on the left nav click the "Manage Plugins" link
- Scroll to the bottom you will see "Upload Plugin" option
- Run docker
cd btcpayserver/BTCPayServer.Tests
docker-compose up dev- Run the application in Debug
cd btcpayserver/BTCPayServer
dotnet run -c Debug