Posted on Leave a comment

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.

Requirements:
– Raspberry Pi 3 B+
– Minimum 64 Gb SD Card (if no external storage)
– USB HDD or Thumb Drive (optional)
– Sub domain pointed to “btcpay.mydomain.com”
– 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 https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker

# Run btcpay-setup.sh with the right parameters
export BTCPAY_HOST=”btcpay.mydomain.com”
export NBITCOIN_NETWORK=”mainnet”
export BTCPAYGEN_CRYPTO1=”btc”
export BTCPAYGEN_REVERSEPROXY=”nginx”
export BTCPAYGEN_LIGHTNING=”lnd”
export BTCPAYGEN_ADDITIONAL_FRAGMENTS=”opt-save-storage-xs”
export BTCPAYGEN_ADDITIONAL_FRAGMENTS=”opt-save-memory”
. ./btcpay-setup.sh -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 (https://btcpay.mydomain.com) to confirm BTCPayServer is running.

#From the /root/BTCPayServer/btcpayserver-docker folder run the following commands.
./btcpay-down.sh
cd contrib
cd FastSync
./load-utxo-set.sh

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

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

Posted on Leave a comment

Lightning in a Box (LIAB) – Bitcoin Full Node + Lightning < $250.00

For the #reckless and #brave here are instructions for building your own Lightning in a Box (LIAB).  For those who want to accept Bitcoin Lightning payments ASAP Click here to order your LIAB today!

Requirements:

1. High speed internet connection.
2. Static IP
3. Domain Name
4. Ability to open ports (80, 443, 9735) on your router.
5. Tiny Screwdriver
6. USB Thumb Drive
7. USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.

Hardware:
1. Gigabyte Brix GB-BXBT-1900 – $111.29

2. Crucial 8GB DDR3L-1600 SODIMM – $59.32

3. WD Blue 1TB Mobile Hard Disk Drive – $52.99

Software:

1. Ubuntu 18.04 LTS – Free

2. BTCPayServer (Docker) – Free

Instructions:

1. Assemble PC (LIAB)

  • Remove back cover with screwdriver.
  • Insert RAM
  • Install hard drive

2.  Download Ubuntu 18.04 – Desktop

3.  Use Etcher Studio to create bootable USB drive from Ubuntu ISO.

4.  Insert USB thumb drive into PC to boot.

5.  Follow Ubuntu installation.

6.  Set static IP on LIAB.

7.  Log into your router and forward ports 80, 443 and 9735 to your LIAB local IP address.

8.  Install OpenSSH

9.  Install Fail2ban

10.  Install UFW Firewall

  • sudo ufw allow 22
  • sudo ufw allow 80
  • sudo ufw allow 443
  • sudo ufw allow 9735
  • sudo ufw enable

11.  Go to your domain registrar and point an A record of your domain to your external IP address.  I suggest that you use a subdomain (ie. btcpay.yourdomain.com).

12.  Install BTCPayServer – Docker

For an in-depth guide to using BTCPayServer & WooCommerce together to accept Bitcoin on your website check out this this guide written by @bitcoinshirt –  How to Create an Online Store & Accept Bitcoin – Step By Step Guide