Posted on 2 Comments

How to Install BTCPayServer on Raspberry Pi 3 B+ (with pruning and FastSync)

These instructions assume that you are starting with "virgin" Raspberry Pi Model 3 B+ that is running the latest updated version of Raspbian Stretch.

- Raspberry Pi 3 B+
- Minimum 64 Gb SD Card (if no external storage)
- USB HDD or Thumb Drive (optional)
- Sub domain pointed to ""
- Static External IP Address
- Forward ports 80,443,8333,9735 on your router to the Raspberry Pi

SSH to Raspberry Pi

# Switch to root
sudo su -

# Create a folder for BTCPay
mkdir BTCPayServer
cd BTCPayServer

# Clone this repository
git clone
cd btcpayserver-docker

# Run with the right parameters
export BTCPAY_HOST=""
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-xs;opt-save-memory"
. ./ -i

BTCPayServer's FastSync documentation is available here.
Please read very carefully to understand what FastSync is and why it's important to verify the UTXO set yourself.

Allow BTCPayServer run for a few minutes and visit your website ( to confirm BTCPayServer is running.

#From the /root/BTCPayServer/btcpayserver-docker folder run the following commands.
cd contrib
cd FastSync

This will take about 30 minutes or so depending on your download speed. After FastSync finishes run the following command.

Visit your domain and you should now see that your sync is at least 99%.

2 thoughts on “How to Install BTCPayServer on Raspberry Pi 3 B+ (with pruning and FastSync)

  1. export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-xs"
    export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-memory"

    should be

    export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-xs;opt-save-memory"

    Else the second overwrites $BTCPAYGEN_ADDITIONAL_FRAGMENTS

    1. Done. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.