From 516f632b84bc418486538a2183564fe94b89097e Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:01:45 +0900 Subject: init --- content/btcpay.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 content/btcpay.md (limited to 'content/btcpay.md') diff --git a/content/btcpay.md b/content/btcpay.md new file mode 100644 index 0000000..11ed7ed --- /dev/null +++ b/content/btcpay.md @@ -0,0 +1,57 @@ +--- +title: "BTCPay" +icon: 'btcpay.svg' +tags: ['service'] +short_desc: "Host your own payment processor, powered by Bitcoin." +draft: true +--- + +```sh +apt install nginx python3-certbot-nginx tor postgresql postgresql-contrib iptables iptables-persistent +``` + + *filter + :INPUT ACCEPT [0:0] + :FORWARD ACCEPT [0:0] + :OUTPUT ACCEPT [0:0] + -A INPUT -i lo -j ACCEPT + -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT # SSH + -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # BTCPay HTTP + -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT # BTCPay HTTPS + -A INPUT -p tcp -m tcp --dport 8333 -j ACCEPT # Bitcoind P2P + -A INPUT -p tcp -m tcp --dport 9735 -j ACCEPT # Lightning P2P + -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT + COMMIT + +`iptables-restore > iptables.txt` netfilter-persistent save + + echo "ControlPort 9051 + CookieAuthentication 1" >> /etc/tor/torrc + +certbot \--nginx -d pay.cedars.xyz \--agree-tos +\--register-unsafely-without-email vim /etc/nginx/sites-available/btcpay + +## Building Bitcoin + +Now we can install the Bitcoin node and daemon software. For safety\'s +sake, we will install it from source. + +First, we install the build dependencies: + + apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev git + +Now we can download the Bitcoin source code from the official +repository: + + git clone https://github.com/bitcoin/bitcoin + cd bitcoin + +Now, we compile, then install it. Compiling the software will take some +time. + + ./autogen.sh + ./configure + make + make install + +[[Next:\<++\>](%3C++%3E)]{.next} -- cgit v1.2.3