diff --git a/electrs/README.md b/electrs/README.md index d97cd56..6389faf 100644 --- a/electrs/README.md +++ b/electrs/README.md @@ -8,24 +8,30 @@ Tested on the Requires 47 Gb diskpace (March 2019). -The install instructions adapted to the RaspiBlitz are in this script, take a look: https://github.com/openoms/bitcoin-tutorials/blob/master/electrs/electrs_install_on_RaspiBlitz.sh +The install instructions adapted to the RaspiBlitz are in this script, take a look: [electrs_install_on_RaspiBlitz.sh](electrs_install_on_RaspiBlitz.sh) -Download this script to your RaspiBlitz: -`wget https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/electrs_install_on_RaspiBlitz.sh` -make it executable: -`sudo chmod +x electrs_install_on_RaspiBlitz.sh` -and run: -`./electrs_install_on_RaspiBlitz.sh` +Download this script to your RaspiBlitz, make it executable and run: +`$ wget https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/electrs_install_on_RaspiBlitz.sh && sudo chmod +x electrs_install_on_RaspiBlitz.sh && ./electrs_install_on_RaspiBlitz.sh` + +--- + +## Set up the Electrum Server in Rust on the RaspiBlitz to be used with Eclair +Sets up the automatic start of electrs and nginx and certbot. + +Take a look: [electrs_automation_for_Eclair.sh](electrs_automation_for_Eclair.sh) + +To download this script, make executable and run: +`$ wget https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/electrs_automation_for_Eclair.sh && sudo chmod +x electrs_automation_for_Eclair.sh && ./electrs_automation_for_Eclair.sh` + +For the certificate to be obtained successfully a dynamic DNS and port forwarding is needed +Need to forward port 80 to the IP of your RaspiBlitz for certbot +Forward port 50002 to be able to access you electrs from outside of your LAN --- ## Install, configure and run the Electrum wallet on your Linux desktop -The instruction are in this script: https://github.com/openoms/bitcoin-tutorials/blob/master/electrs/electrum_install_config_and_run.sh +The instruction are in the script: [electrum_install_config_and_run.sh](electrum_install_config_and_run.sh) -Download this script to your linux desktop: -`wget https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/electrum_install_config_and_run.sh` -make it executable: -`sudo chmod +x electrum_install_config_and_run.sh` -and run: -`./electrum_install_config_and_run.sh` +Download this script to your linux desktop, make it executable and run: +`$ wget https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/electrum_install_config_and_run.sh && sudo chmod +x electrum_install_config_and_run.sh && ./electrum_install_config_and_run.sh` diff --git a/electrs/electrs_automation_for_Eclair.sh b/electrs/electrs_automation_for_Eclair.sh index 284a476..4f21dd9 100644 --- a/electrs/electrs_automation_for_Eclair.sh +++ b/electrs/electrs_automation_for_Eclair.sh @@ -88,7 +88,7 @@ echo "***" echo "Please type the domain/ddns you have generated the certificate for followed by [ENTER]" read YOUR_DOMAIN -echo "setting up nginx.confsu" +echo "Setting up nginx.conf" echo "***" echo "" # sudo nano /etc/nginx/nginx.conf @@ -128,7 +128,7 @@ After=bitcoind.service [Service] WorkingDirectory=/home/admin/electrs -ExecStart=/home/admin/electrs/target/release/electrs --release -- -vvvv --index-batch-size=10 --jsonrpc-import --db-dir /mnt/hdd/electrs/db --electrum-rpc-addr="0.0.0.0:50001" --cookie="raspibolt:$PASSWORD_B" +ExecStart=/home/admin/electrs/target/release/electrs --index-batch-size=10 --jsonrpc-import --db-dir /mnt/hdd/electrs/db --electrum-rpc-addr="0.0.0.0:50001" --cookie="raspibolt:$PASSWORD_B" User=admin Group=admin diff --git a/electrs/electrs_install_on_RaspiBlitz.sh b/electrs/electrs_install_on_RaspiBlitz.sh index b491ced..f61ea0d 100644 --- a/electrs/electrs_install_on_RaspiBlitz.sh +++ b/electrs/electrs_install_on_RaspiBlitz.sh @@ -1,4 +1,4 @@ -# Download this script to your RaspiBlit, make it executable, and run: +# Download this script to your RaspiBlitz, make it executable, and run: # $ wget https://github.com/openoms/bitcoin-tutorials/raw/master/electrs/electrs_install_on_RaspiBlitz.sh && sudo chmod +x electrs_install_on_RaspiBlitz.sh && ./electrs_install_on_RaspiBlitz.sh # https://github.com/romanz/electrs/blob/master/doc/usage.md diff --git a/electrs/revert_ electrs_automation_for_Eclair.sh b/electrs/revert_ electrs_automation_for_Eclair.sh new file mode 100644 index 0000000..d5ff112 --- /dev/null +++ b/electrs/revert_ electrs_automation_for_Eclair.sh @@ -0,0 +1,13 @@ + + +sudo systemctl stop nginx +sudo systemctl disable nginx +sudo apt remove -y nginx + +sudo sytemctl stop certbot +sudo sytemctl disable certbot +sudo rm /etc/systemd/system/certbot.service +sudo rm certbot* + +sudo nano systemctl stop electrs +sudo nano systemctl disable electrs \ No newline at end of file