Install BTCPay Server on your own machine or VPS instance.
The officially supported setup is driven by Docker (and Docker-Compose).
First, make sure you have a domain name pointing to your host A record
, with ports 443
and 80
externally accessible. For Lightning Network, port 9735
is required (9736
if you use Litecoin Lightning). Otherwise, you will have to set a domain manually by running changedomain.sh
.
Let’s assume your domain is btcpay.EXAMPLE.com
.
The setup below assumes you want to support Bitcoin, c-lightning, HTTPS automatically configured by Nginx. It also enables node pruning, which you can modify or ignore if you have enough disk space for a full node. Finally, your domain is btcpay.EXAMPLE.com
should reflect your actual domain name.
Environment variables can be tailored to your needs. Some variables require additional storage space.
# Login as root
sudo su –
# Create a folder for BTCPay
mkdir BTCPayServer
cd BTCPayServer
# Clone this repository
git clone https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker
# Run btcpay-setup.sh with the right parameters
export BTCPAY_HOST=”btcpay.EXAMPLE.com”
export NBITCOIN_NETWORK=”mainnet”
export BTCPAYGEN_CRYPTO1=”btc”
export BTCPAYGEN_ADDITIONAL_FRAGMENTS=”opt-save-storage-s”
export BTCPAYGEN_REVERSEPROXY=”nginx”
export BTCPAYGEN_LIGHTNING=”clightning”
export BTCPAY_ENABLE_SSH=true
. ./btcpay-setup.sh -i
exit
btcpay-setup.sh
will then:
- Install Docker
- Install Docker-Compose
- Make sure BTCPay starts at reboot via upstart or systemd
- Setup environment variables to use BTCPay utilities
- Add BTCPay utilities in /usr/bin
- Start BTCPay Server
Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.