- Open Source
- /
- Host UK
- /
- BTCPay Server Docker
BTCPay Server Docker
Host UKWant to accept Bitcoin without handing your payment data to a third party? This self-hosted payment processor puts you in control. You tell it what you need - which cryptocurrencies, which Lightning implementation, how to handle SSL - and it builds your Docker setup automatically. The clever bit: a C# generator stitches together YAML fragments, sorting out dependencies and conflicts so you don't have to. It's like having a payment infrastructure that actually respects your autonomy.
Features
Builds itself from pieces
Set your environment variables, and the generator assembles exactly the Docker setup you need - no manual YAML wrangling required
Lightning-fast payments
Pick your Lightning implementation - Core Lightning, LND, Phoenixd, or Eclair - and it's wired up automatically
Beyond just Bitcoin
Accept up to nine different cryptocurrencies - BTC, LTC, XMR, and more. LTHN chain support coming with v2
SSL sorted for you
Choose nginx or Traefik for your reverse proxy, and Let's Encrypt handles your certificates automatically
Runs on what you've got
Whether it's a proper server, a Raspberry Pi, or something in between - there are images for x64, ARM32, and ARM64
Make it your own
Add custom features through docker-fragments/ or extend cryptocurrency support via crypto-definitions.json
Installation
Set a few environment variables to describe what you want, then let the setup script do the heavy lifting:
export BTCPAY_HOST="btcpay.example.com"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_LIGHTNING="lnd"
export BTCPAYGEN_REVERSEPROXY="nginx"
export LETSENCRYPT_EMAIL="your@email.com"
. ./btcpay-setup.sh -i
The important settings
BTCPAYGEN_CRYPTO1-9 # Which cryptocurrencies (btc, ltc, etc.)
BTCPAYGEN_LIGHTNING # Your Lightning flavour: clightning, lnd, phoenixd, eclair
BTCPAYGEN_REVERSEPROXY # How to handle HTTPS: nginx, traefik, or none
BTCPAYGEN_ADDITIONAL_FRAGMENTS # Any extra features you fancy
NBITCOIN_NETWORK # mainnet for real money, testnet or regtest for playing
Usage
Day-to-day commands
Once it's running, these scripts keep things ticking along:
./btcpay-up.sh # Fire everything up
./btcpay-down.sh # Shut it all down gracefully
./btcpay-restart.sh # Give the services a fresh start
./btcpay-update.sh # Grab the latest version
./btcpay-clean.sh # Tidy up unused resources
Talking to your nodes
Need to check on your Bitcoin or Lightning node? These wrappers save you from Docker exec gymnastics:
./bitcoin-cli.sh getblockchaininfo
./bitcoin-lightning-cli.sh getinfo # For Core Lightning
./bitcoin-lncli.sh getinfo # For LND
How the magic works
The generator reads your environment variables, looks up what each option needs in crypto-definitions.json, then stitches together the right YAML fragments into your final Docker Compose file:
Your environment variables
↓
build.sh kicks off the generator
↓
C# reads crypto-definitions.json
↓
Merges the right YAML fragments from docker-fragments/
↓
docker-compose.generated.yml (ready to run)
Quick Links
More from Host UK
Fancy helping out?
Spotted a bug? Got an idea? We'd love to hear from you.
Read the contributing guide →