Giter Site home page Giter Site logo

raspnode's Introduction

raspnode

Bitcoin Core + LND 0.4 Beta (mainnet) installer.

To install, just clone this git or download raspnode.sh and run with sudo.

If you have installed and only want to secure your Raspberry launch with secure parameter --> sudo ./raspnode.sh secure

If I've helped you, consider donating some BTC to 3FM6FypcrSVhdHh7cpVQMrhPXPZ6zcXeYU

And if you want to donate via LN you can send me 1000 satoshi -->

lnbc10u1pdtyqucpp52fu993pgr4vx8kw7un53wc6nr2v979ca53wsr7swkaxaxewgep6qdqlgysxyet9wgsxvmmjyp4x7cmgv4kkjmscqzysxq92ptxs5jyam5u65rlfhrls2khe60lt93m2zyv06tzjkxt9u6l50jy63v7xu4pqah2kr3kljmhq8zyeaw02t3vcygde4nglm48fruk6x4lmf8gqueegmf

My LN Node --> 02d249db09237f974f1c67775accee37a9d1eb3f04f236dda177f5a5c083094f15@jocheminlnd1.ddns.net:9735

raspnode's People

Contributors

jochemin avatar laurensn avatar vnnkl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspnode's Issues

Install fails on brand new Raspberry Pi due to logname failing

Running "sudo ./raspnode.sh" fails on my system with the error message "logname: no login name", the same message that the logname command fails with. I worked around this with replacing logname in the script with $USER. Perhaps the script should use something other than logname, or have a fallback?

This is with Raspian running on a Raspberry Pi 3, Model B from CanaKit.

shellcheck raspnode.sh yields 50+ warnings

Many of the warnings might be minor, but SC2086: Double quote to prevent globbing and word splitting. is pretty major since it can mess up a lot of stuff if e.g. the variable contains spaces.

$ shellcheck raspnode.sh
 
Line 23:
TEXT_GREEN='\e[0;32m'
^-- SC2034: TEXT_GREEN appears unused. Verify it or export it.
 
Line 35:
    echo -e -n "'\e[0;32m$1"
                 ^-- SC1117: Backslash is literal in "\e". Prefer explicit escaping: "\\e".
 
Line 39:
    echo -e -n "'\e[0;33m$1"
                 ^-- SC1117: Backslash is literal in "\e". Prefer explicit escaping: "\\e".
 
Line 43:
    echo -e -n "'\e[1;31m$1"
                 ^-- SC1117: Backslash is literal in "\e". Prefer explicit escaping: "\\e".
 
Line 52:
    drive_size="$(df -h $drive | sed 1d |  awk '{print $2}')"
                        ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 54:
        echo -e $TEXT_RED_B
                ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 55:
        read -p "$drive_size $drive will be formatted. Are you agree? (y/n) " yn
        ^-- SC2162: read without -r will mangle backslashes.
 
Line 58:
            [Nn]* ) echo "This script needs to format an entire hard disk.";echo -e $TEXT_RESET;exit;;
>>                                                                                  ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 61:
        echo -e $TEXT_RESET
                ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 70:
    if mount | grep $drive > /dev/null;then
                    ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 71:
        umount -l $drive > /dev/null
                  ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 74:
    sudo mkfs.ext4 -F $drive -L BITCOIN
                      ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 76:
    PARTUUID="$(blkid -o value -s PARTUUID $drive)"
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 79:
    mkdir -p $BTCDIR
             ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 83:
    if mount | grep $drive > /dev/null;then
                    ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 88:
    sudo chmod 777 $BTCDIR
                   ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 96:
    sudo -u $user mkdir -p /home/$user/.bitcoin/swap
            ^-- SC2086: Double quote to prevent globbing and word splitting.
                                 ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 97:
    dd if=/dev/zero of=/home/$user/.bitcoin/swap/swap.file bs=1M count=2148
                             ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 98:
    chmod 600 /home/$user/.bitcoin/swap/swap.file
                    ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 103:
    mkswap /home/$user/.bitcoin/swap/swap.file
                 ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 104:
    swapon /home/$user/.bitcoin/swap/swap.file
                 ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 112:
        echo -e $TEXT_YELLOW
                ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 113:
        read -p "Is the hard drive connected? It will be formated. (y/n)" yn
        ^-- SC2162: read without -r will mangle backslashes.
 
Line 121:
    read -p 'Insert username: ' rpcuser
    ^-- SC2162: read without -r will mangle backslashes.
 
Line 122:
    read -s -p 'Insert password: (will not be shown) ' rpcpass
    ^-- SC2162: read without -r will mangle backslashes.
 
Line 124:
    read -p 'Insert your LND node alias: ' LNALIAS
    ^-- SC2162: read without -r will mangle backslashes.
 
Line 125:
    echo -e $TEXT_RESET
            ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 161:
    sudo -u $user mkdir -p $userhome/bin
            ^-- SC2086: Double quote to prevent globbing and word splitting.
                           ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 162:
    cd $userhome/bin
       ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 163:
    sudo -u $user wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
            ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 164:
    sudo -u $user tar -xzvf db-4.8.30.NC.tar.gz
            ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 176:
    rm -fR $userhome/bin/bitcoin
           ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 177:
    cd $userhome/bin
       ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 190:
    echo 'zmqpubrawblock=tcp://127.0.0.1:18501' > /home/$user/.bitcoin/bitcoin.conf
                                                        ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 191:
    echo 'zmqpubrawtx=tcp://127.0.0.1:18501' >> /home/$user/.bitcoin/bitcoin.conf
    ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                                                      ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 192:
    echo "rpcuser=$rpcuser" >> /home/$user/.bitcoin/bitcoin.conf
                                     ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 193:
    echo "rpcpassword=$rpcpass" >> /home/$user/.bitcoin/bitcoin.conf
                                         ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 194:
    echo 'bcache=100' >> /home/$user/.bitcoin/bitcoin.conf
                               ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 195:
    echo 'maxmempool=100' >> /home/$user/.bitcoin/bitcoin.conf
                                   ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 196:
    echo 'userhd=1' >> /home/$user/.bitcoin/bitcoin.conf
                             ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 197:
    echo 'txindex=1' >> /home/$user/.bitcoin/bitcoin.conf
                              ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 198:
    echo 'daemon=1' >> /home/$user/.bitcoin/bitcoin.conf
                             ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 199:
    echo 'server=1' >> /home/$user/.bitcoin/bitcoin.conf
                             ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 206:
    cd $userhome
       ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 207:
    sudo -u $user mkdir -p download
            ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 217:
    sudo -u $user mkdir -p $userhome/.lnd
            ^-- SC2086: Double quote to prevent globbing and word splitting.
                           ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 218:
    echo 'bitcoin.active=1' > $userhome/.lnd/lnd.conf
                              ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 219:
    echo "externalip=$PUBLICIP" >> $userhome/.lnd/lnd.conf
    ^-- SC2129: Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                                   ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 220:
    echo "alias=$LNALIAS" >> $userhome/.lnd/lnd.conf
                             ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 221:
    echo 'color=#1d8c09' >> $userhome/.lnd/lnd.conf
                            ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 222:
    echo 'bitcoin.node=bitcoind' >> $userhome/.lnd/lnd.conf
                                    ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 223:
    echo "bitcoind.rpcuser=$rpcuser" >> $userhome/.lnd/lnd.conf
                                        ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 224:
    echo "bitcoind.rpcpass=$rpcpass" >> $userhome/.lnd/lnd.conf
                                        ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 225:
    echo 'bitcoind.zmqpath=tcp://127.0.0.1:18501' >> $userhome/.lnd/lnd.conf
                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 284:
sudo -u $user bitcoind &
        ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 292:
sudo -u $user tmux new-session -d -s LND
        ^-- SC2086: Double quote to prevent globbing and word splitting.
 
Line 293:
sudo -u $user tmux send-keys -t LND "lnd --bitcoin.mainnet" Enter
        ^-- SC2086: Double quote to prevent globbing and word splitting.

Installer with Neutrino?

Hi, do you think you could make also installer with Neutrino, that does not need Bitcoin full node installed locally?

-deprecatedrpc=signrawtransaction

I found problems running lightning network with eclair and Bitcion Core v.17 because I did not set up -deprecatedrpc=signrawtransaction in Bitcoin.conf

I wonder if your installer needs to be updated to use signrawtransaction in v0.17, (Include -deprecatedrpc=signrawtransaction in bitcoin.conf)

Question: bitcoind sync time

Hi,

Do you need bitcoind to be fully synced with the network for LND?
If so, how much time does it take for it to download the full chain?

Thanks

Rate limiting

Maybe you want to configure iptables with rate limiting to prevent DOS ?

Hard disk without PARTUUID

@bigafricanhat_ report an error in line 83

sudo sed -i".bak" "/$PARTUUID/d" /etc/fstab

His hard drive doesn't have a PARTUUID:

image

Start on boot

Just wanted to check the process for restarting everything after a pi reboot?

Running the script without arguments fails

I have a brand new install of raspbian stretch that I was attempting to run the script on. I got some error related to uninitialized variable $1 (sorry, I didn't capture the error). I was able to comment out the "if [$1 == secure]" stanza and the script ran correctly on the subsequent run. My shell scripting fu is not very strong so I don't have a good suggestion for a fix. Thanks for the script.

zmq lib is required for lnd communicating with bitcoind

when running
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default

the result is

Options used to compile and link:
with wallet = yes
with gui / qt = no
with zmq = no
with test = yes
with bench = yes
with upnp = auto
use asm = yes
debug enabled = no
werror = no

zmq = yes is required for lnd communicating with bitcoind

after
sudo apt-get install libzmq3-dev

Options used to compile and link:
with wallet = yes
with gui / qt = no
with zmq = yes
with test = yes
with bench = yes
with upnp = auto
use asm = yes
debug enabled = no
werror = no

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.