[BREAKGLASS] A server building plugins for BTCPay Server https://plugin-builder.btcpayserver.org
Go to file
rockstardev cdb1b412bf
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (push) Has been cancelled
Merge pull request #142 from btcpayserver/fix/editorconfig
Updating editorconfig and cleaning up solution
2026-01-16 15:28:15 +09:00
.github/workflows Reducing verbosity of tests console 2025-11-17 23:38:18 -06:00
PluginBuilder More coderabbit nits fixed 2026-01-16 00:20:32 -06:00
PluginBuilder.Tests Cleanup based on coderabbit suggestions 2026-01-16 00:09:06 -06:00
.coderabbit.yaml chore: add coderabbit config 2025-09-11 17:00:03 -03:00
.dockerignore init 2022-11-08 10:43:22 +09:00
.editorconfig Fixing problem with cshtml files being removed @model string 2026-01-15 23:55:40 -06:00
.gitattributes init 2022-11-08 10:43:22 +09:00
.gitignore init 2022-11-08 10:43:22 +09:00
btcpayserver-plugin-builder.sln Improving playwright GitHub Actions 2025-10-16 09:44:03 -05:00
Cleanup.md Moving PluginNavPages to Component, closer to usage 2025-03-27 23:12:54 -05:00
Dockerfile bump buildx 2023-12-21 19:26:58 +09:00
README.md docs: update outdated readme 2025-08-26 01:04:57 -03:00

Introduction

This project hosts a server with a front end which can be used to build BTCPay Server plugins and store the binaries on some storage. You can find our live server on https://plugin-builder.btcpayserver.org/, that is updated through btcpayserver-infra repository.

Prerequisite

It assumes you installed docker on your system.

Configuration

All parameters are configured via environment variables.

  • PB_POSTGRES: Connection to a postgres database (example: User ID=postgres;Include Error Detail=true;Host=127.0.0.1;Port=61932;Database=btcpayplugin)
  • PB_STORAGE_CONNECTION_STRING: Connection string to azure storage to store build results (example: BlobEndpoint=http://127.0.0.1:32827/satoshi;AccountName=satoshi;AccountKey=Rxb41pUHRe+ibX5XS311tjXpjvu7mVi2xYJvtmq1j2jlUpN+fY/gkzyBMjqwzgj42geXGdYSbPEcu5i5wjSjPw==)
  • PB_CHEAT_MODE: If set to true, it's considered that the server is running in a development environment and will allow to bypass some security checks (right now only registering admin account).
  • ASPNETCORE_URLS: The url the web server will be listening (example: http://127.0.0.1:8080)
  • PB_DATADIR: Where some persistent data get saved (example: /datadir)

API

Public/Unauthenticated endpoints

Get published versions

HTTP GET /api/v1/plugins?btcpayVersion=1.2.3.4&includePreRelease=true&includeAllVersions=false

List the published versions of the server compatible with btcpayVersion. (optionally include includePreRelease)

If includeAllVersions is set to true, all versions will be returned, otherwise only the latest version for each plugin will be returned.

  • searchPluginName: Query parameter to search by plugin slug or name.

Get a version

HTTP GET /api/v1/plugins/{pluginSelector}/versions/{version}

pluginSelector can be either a plugin slug (example: rockstar-stylist) or a plugin identifier surrounded by brackets (example: [BTCPayServer.Plugins.RockstarStylist]).

Download a version

HTTP GET /api/v1/plugins/{pluginSelector}/versions/{version}/download

Download the binaries of the plugin.

Authenticated endpoints

The following endpoints require HTTP Basic Auth. Use your login email and password to provide the HTTP Authorization header like this: Authorization: Basic {credentials}, where {credentials} is the base64 encoded form of email:password (note the : as delimiter). See the cURL examples below.

Get build details

HTTP GET /api/v1/plugins/{pluginSelector}/builds/{buildId}

Get the details for a specific plugin build.

Sample cURL request:

curl --user "$EMAIL:$PASSWORD" -X GET -H "Content-Type: application/json" \
     "https://plugin-builder.btcpayserver.org/api/v1/plugins/{pluginSelector}/builds/{buildId}"

Sample response:

{
    "projectSlug": "lnbank",
    "buildId": 8,
    "buildInfo": {
        "gitRepository": "https://github.com/dennisreimann/btcpayserver-plugin-lnbank",
        "gitRef": "v1.5.1",
        "pluginDir": "BTCPayServer.Plugins.LNbank",
        "gitCommit": "4f0548cbc22d5a91493ef9a42db41a066251622a",
        "gitCommitDate": "2023-05-18T21:46:37+02:00",
        "buildDate": "2023-05-23T18:02:06+02:00",
        "buildHash": "c63a96792aafc80bedb067cd554667cfbd235cadb43aeceda39166c8018b6001",
        "url": "https://plugin-builder.btcpayserver.org/satoshi/artifacts/lnbank/8/BTCPayServer.Plugins.LNbank.btcpay",
        "error": null,
        "buildConfig": "Release",
        "assemblyName": "BTCPayServer.Plugins.LNbank",
        "additionalObjects": null
    },
    "manifestInfo": {
        "identifier": "BTCPayServer.Plugins.LNbank",
        "name": "LNbank",
        "version": "1.5.1",
        "description": "Use the BTCPay Server Lightning node in custodial mode and give users access via custodial layer 3 wallets.",
        "systemPlugin": false,
        "dependencies": [
            {
                "identifier": "BTCPayServer",
                "condition": ">=1.9.0"
            }
        ]
    },
    "createdDate": "2023-05-23T16:01:26.949327+00:00",
    "downloadLink": "https://plugin-builder.btcpayserver.org/satoshi/artifacts/lnbank/8/BTCPayServer.Plugins.LNbank.btcpay",
    "published": true,
    "prerelease": false,
    "commit": "4f0548cb",
    "repository": "https://github.com/dennisreimann/btcpayserver-plugin-lnbank",
    "gitRef": "v1.5.1"
}

Create a new build

HTTP POST /api/v1/plugins/{pluginSelector}/builds

Create a new build by specifying the gitRepository (required), gitRef (optional, default: master), pluginDirectory (optional) and buildConfig (optional, default: Release).

Sample cURL request:

curl --user "$EMAIL:$PASSWORD" -X POST -H "Content-Type: application/json" \
     -d "{'gitRepository': 'https://github.com/dennisreimann/btcpayserver-plugin-lnbank', 'gitRef': 'v1.5.1', 'pluginDirectory': 'BTCPayServer.Plugins.LNbank' }" \
     "https://plugin-builder.btcpayserver.org/api/v1/plugins/{pluginSelector}/builds/{buildId}"

Sample response:

{
    "pluginSlug": "lnbank",
    "buildId": 12,
    "buildUrl": "https://plugin-builder.btcpayserver.org/plugins/lnbank/builds/12"
}