This repository contains the official Docker deployment for BTCPay Server. It generates and operates a Docker Compose stack from a small set of environment variables and optional fragments.
If you are still choosing how to host BTCPay Server, start with the deployment overview. This repository is for administrators who want to run and maintain the Docker deployment.
The standard Bitcoin deployment includes:
- BTCPay Server
- PostgreSQL
- NBXplorer
- Bitcoin Core
- Nginx with automatic HTTPS certificates
- Tor hidden services and selected Tor connectivity
Lightning implementations, additional cryptocurrencies, and other services are optional. See the architecture guide for how the components fit together.
Use the server specifications guide to select and size a VPS for the chains and features you need.
Provider-specific cloud installation guides are available for:
- LunaNode (most popular)
- Cloudzy
- Clovyr
- Microsoft Azure
- Google Cloud
- Comet Cash
A domain is not required for local or manually proxied deployments. The bundled automatic HTTPS setup requires a domain whose DNS records point to the server and incoming TCP ports 80 and 443 open to the internet.
The setup script installs Docker and Docker Compose when needed. Read the installation guide before adapting this process to an existing server, another Linux distribution, or an external reverse proxy.
Replace btcpay.example.com with your domain, then run:
sudo su -
mkdir BTCPayServer
cd BTCPayServer
git clone https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker
export BTCPAY_HOST="btcpay.example.com"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_LIGHTNING="none"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-xs"
. ./btcpay-setup.sh -i
exitThe setup generates the Compose stack, installs the command-line utilities, registers BTCPay Server to start at boot, and starts the services. Initial Bitcoin synchronization can take time.
Open https://btcpay.example.com and register the first account, which becomes
the server administrator. Do this promptly, then follow the synchronization
status in the BTCPay Server interface before accepting payments.
- Browse all Docker documentation
- Configure the deployment
- Choose a Lightning implementation
- Configure domains, HTTPS, proxies, and routes
- Operate and monitor the server
- Update BTCPay Server
- Back up and restore the deployment
- Enable optional fragments
- Customize the generated Compose stack
- Review image versions, architectures, and source builds
Check the Docker troubleshooting guide first. For deployment help, use the BTCPay Server community chat. Report reproducible problems with this repository on the GitHub issue tracker.
See the development guide for generator internals, testing, and adding cryptocurrency support. Changes are licensed under the MIT License.