Try describing what you need:

BTCPay Server logo

BTCPay Server

★ 7.9k

A self-hosted alternative to Paypal, Stripe

MIT LicenseOpen Source — No Paywall12 Containers — 12 containers — heavy hosting footprintCompose · SourceNeeds Postgres35+ active committers (12mo)

About

BTCPay Server is a self-hosted Bitcoin payment processor designed for merchants and organizations that want to accept Bitcoin without relying on intermediaries, transaction fees, or custodial payment...

Community Ratings

No ratings yet
BTCPay Server screenshot

Features

  • Direct Bitcoin payments
  • No transaction fees
  • Non-custodial wallet
  • Lightning Network support
  • Tor support
  • Multi-tenant instances
  • Invoice management
  • Payment requests
  • Point of sale app
  • Crowdfunding and donation button

Details

Last Updated
Oct 29, 2026
Created
Aug 18, 2017
Install Methods
docker-composesource
Requirements
.NET SDK v10.0docker-compose
API
REST
Runtime / Stack
C#
Privacy & Independence
Cloud: Optional
User Model
Multi-UserMulti-Tenant
Deployment

Deployment: Docker Compose ✓12 Containers — heavy hosting footprintRuns as 12 containers

Run BTCPay Server yourself

Pick how much you want to manage.

2 more ways to host

Is this your project? Sponsor a listing

Run BTCPay Server with Docker Compose

Compose file from the BTCPay Server project repository.

12 services · database: postgres · infra: postgres · 3 unclassified (alpine, mailpit, nbxplorer)

no resource limits declared

needs persistent storage (15 volumes)

BTCPayServer.Tests/docker-compose.yml · @ 04024cc · scanned Sep 24, 2026

version: "3"

# Run `docker-compose up dev` for bootstrapping your development environment
# Doing so will expose NBXplorer, Bitcoind RPC and postgres port to the host so that tests can Run,
# The Visual Studio launch setting `Docker-regtest` is configured to use this environment.
services:

  tests:
    build:
      context: ..
      dockerfile: BTCPayServer.Tests/Dockerfile
      args:
        CONFIGURATION_NAME: Release
    environment:
      TESTS_BTCRPCCONNECTION: server=http://bitcoind:43782;ceiwHEbqWI83:DwubwWsoo3
      TESTS_BTCNBXPLORERURL: http://nbxplorer:32838/
      TESTS_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=btcpayserver
      TESTS_EXPLORER_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=nbxplorer
      TESTS_MAILPIT_HOST: mailpit
      TESTS_MAILPIT_SMTP: 1025
      TESTS_MAILPIT_HTTP: 8025
      TESTS_HOSTNAME: tests
      TESTS_RUN_EXTERNAL_INTEGRATION: ${TESTS_RUN_EXTERNAL_INTEGRATION:-"false"}
      TESTS_AzureBlobStorageConnectionString: ${TESTS_AzureBlobStorageConnectionString:-none}
      TEST_MERCHANTLIGHTNINGD: "type=clightning;server=unix://etc/merchant_lightningd_datadir/lightning-rpc"
      TEST_CUSTOMERLIGHTNINGD: "type=clightning;server=unix://etc/customer_lightningd_datadir/lightning-rpc"
      TEST_MERCHANTLND: "http://merchant_lnd:8080/"
      TESTS_INCONTAINER: "true"
      PLAYWRIGHT_HEADLESS: "true"
      TESTS_SOCKSENDPOINT: "tor:9050"
    expose:
      - "80"
    depends_on:
      - dev
    extra_hosts:
      - "tests:127.0.0.1"
    networks:
      default:
      custom:
        ipv4_address: 172.23.0.18
    volumes:
      - "customer_lightningd_datadir:/etc/customer_lightningd_datadir"
      - "merchant_lightningd_datadir:/etc/merchant_lightningd_datadir"

  # The dev container is not actually used, it is just handy to run `docker-compose up dev` to start all services
  dev:
    image: alpine:3.7
    command: [ "/bin/sh", "-c", "trap : TERM INT; while :; do echo Ready to code and debug like a rockstar!!!; sleep 2073600; done & wait" ]
    depends_on:
      - nbxplorer
      - postgres
      - customer_lightningd
      - merchant_lightningd
      - customer_lnd
      - merchant_lnd
      - tor
      - mailpit

  devlnd:
    image: btcpayserver/bitcoin:31.1-1
    environment:
      BITCOIN_NETWORK: regtest
      BITCOIN_WALLETDIR: "/data/wallets"
      BITCOIN_EXTRA_ARGS: |
        deprecatedrpc=signrawtransaction
        connect=bitcoind:39388
        fallbackfee=0.0002
        rpcallowip=0.0.0.0/0
        unsafesqlitesync=1
    depends_on:
      - nbxplorer
      - postgres
      - customer_lnd
      - merchant_lnd

  mailpit:
    image: axllent/mailpit:v1.27
    ports:
      # Web UI
      - "34218:8025"
      # SMTP
      - "34219:1025"
    environment:
      MP_SMTP_AUTH_ACCEPT_ANY: 1
      MP_SMTP_AUTH_ALLOW_INSECURE: 1

  nbxplorer:
    image: nicolasdorier/nbxplorer:2.6.10
    restart: unless-stopped
    ports:
      - "32838:32838"
    expose:
      - "32838"
    environment:
      NBXPLORER_NETWORK: regtest
      NBXPLORER_CHAINS: "btc"
      NBXPLORER_BTCRPCURL: http://bitcoind:43782/
      NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
      NBXPLORER_BTCRPCUSER: ceiwHEbqWI83
      NBXPLORER_BTCRPCPASSWORD: DwubwWsoo3
      NBXPLORER_BIND: 0.0.0.0:32838
      NBXPLORER_MINGAPSIZE: 5
      NBXPLORER_MAXGAPSIZE: 10
      NBXPLORER_VERBOSE: 1
      NBXPLORER_POSTGRES: User ID=postgres;Include Error Detail=true;Host=postgres;Port=5432;Database=nbxplorer
      NBXPLORER_EXPOSERPC: 1
      NBXPLORER_NOAUTH: 1
    depends_on:
      - bitcoind

  bitcoind:
    restart: unless-stopped
    image: btcpayserver/bitcoin:31.1-1
    environment:
      BITCOIN_NETWORK: regtest
      BITCOIN_RPCUSERS: lnd
      BITCOIN_WALLETDIR: "/data/wallets"
      BITCOIN_EXTRA_ARGS: |-
        rpcuser=ceiwHEbqWI83
        rpcpassword=DwubwWsoo3
        rpcport=43782
        rpcbind=0.0.0.0:43782
        rpcallowip=0.0.0.0/0
        port=39388
        whitelist=0.0.0.0/0
        zmqpubrawblock=tcp://0.0.0.0:28332
        zmqpubrawtx=tcp://0.0.0.0:28333
        deprecatedrpc=signrawtransaction
        fallbackfee=0.0002
        minrelaytxfee=0.00001000
        unsafesqlitesync=1
    ports:
      - "43782:43782"
      - "39388:39388"
    expose:
      - "43782" # RPC
      - "39388" # P2P
      - "28332" # ZMQ
      - "28333" # ZMQ
    volumes:
      - "bitcoin_datadir:/data"

  customer_lightningd:
    image: btcpayserver/lightning:v26.06.1
    stop_signal: SIGKILL
    restart: unless-stopped
    environment:
      EXPOSE_TCP: "true"
      LIGHTNINGD_CHAIN: "btc"
      LIGHTNINGD_NETWORK: "regtest"
      LIGHTNINGD_OPT: |
        developer
        bitcoin-datadir=/etc/bitcoin
        bitcoin-rpcconnect=bitcoind
        announce-addr=customer_lightningd:9735
        log-level=debug
        funding-confirms=1
        dev-fast-gossip
        dev-bitcoind-poll=1
    ports:
      - "30992:9835" # api port
      - "30892:9735" # server port
    expose:
      - "9735" # server port
      - "9835" # api port
    volumes:
      - "bitcoin_datadir:/etc/bitcoin"
      - "customer_lightningd_datadir:/root/.lightning"
    depends_on:
      - bitcoind

  merchant_lightningd:
    image: btcpayserver/lightning:v26.06.1
    stop_signal: SIGKILL
    restart: unless-stopped
    environment:
      EXPOSE_TCP: "true"
      LIGHTNINGD_CHAIN: "btc"
      LIGHTNINGD_NETWORK: "regtest"
      LIGHTNINGD_OPT: |
        developer
        bitcoin-datadir=/etc/bitcoin
        bitcoin-rpcconnect=bitcoind
        announce-addr=merchant_lightningd:9735
        funding-confirms=1
        log-level=debug
        dev-fast-gossip
        dev-bitcoind-poll=1
    ports:
      - "30993:9835" # api port
      - "30893:9735" # server port
    expose:
      - "9735" # server port
      - "9835" # api port
    volumes:
      - "bitcoin_datadir:/etc/bitcoin"
      - "merchant_lightningd_datadir:/root/.lightning"
    depends_on:
      - bitcoind

  postgres:
    image: postgres:18.1
    environment:
        POSTGRES_HOST_AUTH_METHOD: trust
    ports:
      - "39372:5432"
    command: ["-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
    expose:
      - "5432"
    volumes:
      - "postgres_test_datadir:/var/lib/postgresql"

  merchant_lnd:
    image: btcpayserver/lnd:v0.21.3-beta-2
    restart: unless-stopped
    environment:
      LND_CHAIN: "btc"
      LND_ENVIRONMENT: "regtest"
      LND_EXPLORERURL: "http://nbxplorer:32838/"
      LND_REST_LISTEN_HOST: http://merchant_lnd:8080
      RPCUSER_FILE: /deps/.bitcoin/RPCUsers/lnd
      LND_EXTRA_ARGS: |
        restlisten=merchant_lnd:8080
        rpclisten=127.0.0.1:10008
        rpclisten=merchant_lnd:10009
        bitcoin.node=bitcoind
        bitcoind.rpchost=bitcoind:43782
        bitcoind.rpcuser=lnd
        bitcoind.zmqpubrawblock=tcp://bitcoind:28332
        bitcoind.zmqpubrawtx=tcp://bitcoind:28333
        externalip=merchant_lnd:9735
        bitcoin.defaultchanconfs=1
        no-macaroons=1
        debuglevel=debug
        trickledelay=1000
        no-rest-tls=1
    ports:
      - "35531:8080"
      - "53280:10009"
      - "30894:9735"
    expose:
      - "8080"
      - "9735"
      - "10009"
    volumes:
      - "merchant_lnd_datadir:/data"
      - "bitcoin_datadir:/deps/.bitcoin"
    depends_on:
      - bitcoind

  customer_lnd:
    image: btcpayserver/lnd:v0.21.3-beta-2
    restart: unless-stopped
    environment:
      LND_CHAIN: "btc"
      LND_ENVIRONMENT: "regtest"
      LND_EXPLORERURL: "http://nbxplorer:32838/"
      LND_REST_LISTEN_HOST: http://customer_lnd:8080
      RPCUSER_FILE: /deps/.bitcoin/RPCUsers/lnd
      LND_EXTRA_ARGS: |
        restlisten=customer_lnd:8080
        rpclisten=127.0.0.1:10008
        rpclisten=customer_lnd:10009
        bitcoin.node=bitcoind
        bitcoind.rpchost=bitcoind:43782
        bitcoind.rpcuser=lnd
        bitcoind.zmqpubrawblock=tcp://bitcoind:28332
        bitcoind.zmqpubrawtx=tcp://bitcoind:28333
        externalip=customer_lnd:9735
        bitcoin.defaultchanconfs=1
        no-macaroons=1
        debuglevel=debug
        trickledelay=1000
        no-rest-tls=1
    ports:
      - "35532:8080"
      - "30895:9735"
    expose:
      - "8080"
      - "9735"
      - "10009"
    volumes:
      - "customer_lnd_datadir:/root/.lnd"
      - "bitcoin_datadir:/deps/.bitcoin"
    depends_on:
      - bitcoind

  tor:
    restart: unless-stopped
    image: btcpayserver/tor:0.4.9.12
    container_name: tor
    environment:
        TOR_PASSWORD: btcpayserver
    volumes:
        - "tor_datadir:/home/tor/.tor"
        - "torrcdir:/usr/local/etc/tor"
        - "tor_servicesdir:/var/lib/tor/hidden_services"

volumes:
    bitcoin_datadir:
    elementsd_liquid_datadir:
    customer_lightningd_datadir:
    merchant_lightningd_datadir:
    customer_lnd_datadir:
    merchant_lnd_datadir:
    postgres_test_datadir:
    tor_datadir:
    torrcdir:
    tor_servicesdir:

networks:
  default:
    driver: bridge
  custom:
    driver: bridge
    ipam:
      config:
        - subnet: 172.23.0.0/16

This file may be out of date. Check the BTCPay Server documentation for current setup steps.

Track your self-hosted stack

Bookmark software to try, rate tools you've used, and keep your collection in one place.

Metadata extracted from README on Aug 27, 2026

Alternatives to BTCPay Server

SHKeeper logo

SHKeeper

635
SHKeeper is an open-source, self-hosted cryptocurrency payment processor for accepting direct payments in multiple cryptocurrencies.
Budgeting and FinanceCopyleft LicenseE-Commerce Solutions+1
Details
Bitcart logo

Bitcart

998
Bitcart is a platform for merchants, users, and developers that aims to provide easy setup and use.
Budgeting and FinancePermissive LicenseE-Commerce Solutions+1
Details
DePay logo

DePay

135
A crypto web3 payment widget for accepting wallet-to-wallet payments across supported blockchains.
Budgeting and FinanceE-Commerce SolutionsSelf Hosting Solutions+1
Details

Related Software

Umbrel logo

Umbrel

12.5k
A home server operating system for self-hosting apps and data.
Self Hosting SolutionsPersonal DashboardsPlatform as a Service+2
Source AvailableNot FOSS
Details
PrestaShop logo

PrestaShop

9.2k
An open source e-commerce web application for building online stores.
E-Commerce SolutionsCopyleft LicenseCMS Platforms+3
3 Containers
Details
Mybucks.online logo

Mybucks.online

21
A browser-based disposable crypto wallet that derives private keys from a passphrase and PIN without servers or persistent storage.
Budgeting and FinancePermissive LicenseSelf Hosting Solutions
Details
s-cart logo

s-cart

737
S-Cart is a free, open-source e-commerce platform for building online stores, with storefront, admin panel, plugins, and templates.
E-Commerce SolutionsPermissive LicenseInventory Management+2
6 ContainersFully FOSS
Details
Econumo logo

Econumo

119
Econumo is a self-hosted software project with a Docker Compose-based getting started guide.
Budgeting and FinancePermissive LicenseSelf Hosting Solutions+2
Freemium
Details
IHateMoney logo

IHateMoney

1.4k
I Hate Money is a web application for shared budget management that tracks expenses and helps settle bills.
Budgeting and FinancePermissive LicenseSelf Hosting Solutions
Single Container
Details
MedusaJs logo

MedusaJs

37.0k
Medusa is a commerce platform and customization framework for building custom digital commerce applications.
E-Commerce SolutionsPermissive LicenseInventory Management+1
Details
Solidus logo

Solidus

5.3k
Solidus is a free, open-source e-commerce platform built with Ruby on Rails for creating and managing online stores.
E-Commerce SolutionsPermissive LicenseInventory Management
Details
ezbookkeeping logo

ezbookkeeping

5.9k
An open source self-hosted personal finance app for recording transactions, importing financial data, and analyzing spending with charts and custom queries.
Budgeting and FinancePermissive LicenseSelf Hosting Solutions
Details