├── .gitignore ├── Device_001.png ├── LICENSE ├── README.md ├── Scripts ├── Install_Complete_Fullnode_Software.sh ├── Installing_Bitcoin_0.14.0.sh ├── ReadMe.md └── Upgrading_to_Bitcoin_0.14.sh ├── Setup_Guides ├── InstallingPythonLibrary.md ├── ReadMe.md ├── Setup_Bitcoin_Over_Tor.md ├── Setup_JessieLite_Bitcoin_Core_0.13.2.md ├── Setup_Jessie_Bitcoin_Core_0.13.2.md ├── Setup_Jessie_Bitcoin_Extras.md ├── Strip_Down_Raspbian_Jessie.md └── bitcoin.conf └── bitcoin.sh /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /Device_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrChrisJ/fullnode/549344a603e619457d5334f95aec393197759f0a/Device_001.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Fullnode 2 | Setting up a Bitcoin Fullnode on a Raspberry Pi 2 3 | 4 | [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mrchrisj/fullnode?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 5 | 6 | This is the getting started guide for the Raspberry Pi Bitcoin Fullnodes sold on the ProTip crowd fund: [Not (Just) Made In China](https://www.startjoin.com/ProTip). 7 | 8 | ![Bitcoin Fullnode](https://github.com/MrChrisJ/fullnode/blob/master/Device_001.png) 9 | *Bitcoin/Pi Artwork by* [*Phneep*](Phneep.com) 10 | 11 | # [Setup Guides](https://github.com/MrChrisJ/fullnode/tree/master/Setup_Guides#setup-guides) 12 | 13 | 1. [Setup Bitcoin Core 0.13.2 using latest version of Raspbian Jessie OSX](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_Jessie_Bitcoin_Core_0.13.2.md) 14 | 2. [Setup Bitcoin Core 0.13.2 using Jessie Lite for a Headless Fullnode](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_JessieLite_Bitcoin_Core_0.13.2.md) 15 | 3. [Strip down Jessie](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Strip_Down_Raspbian_Jessie.md) to make free space on your node 16 | 4. [Install Extras on your Fullnode](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_Jessie_Bitcoin_Extras.md) including IPFS and Iceweasel Browser 17 | 5. [Setup Bitcoin Configuration](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/bitcoin.conf) 18 | 19 | # Motivation 20 | The goal of this project is to learn and layout a simple process for someone to be able to build a Bitcoin Fullnode using nothing but low cost, open source available tools. 21 | 22 | The main focus will be on educating and inspiring a new generation of people to begin hosting bitcoin fullnodes to help decentralise the network and to encourage enthusiasts to become janitors of the blockchain. 23 | 24 | # README.TXT 25 | ========== 26 | Getting started with your fullnode once you have bought it or followed the steps above. 27 | 28 | 1. Attach external USB Thumb drive enclosed to Raspberry Pi (must be done first) 29 | 2. Attach Ethernet Cable (not included) to your router 30 | 3. Plug in micro USB cable in to to any USB/Phone charger using cable provided 31 | 4. After a few minutes the device will begin syncing with the Bitcoin Blockchain 32 | 5. Go to your computer’s command line and type: 33 | 34 | ``` 35 | ssh pi@fullnode.local 36 | ``` 37 | 38 | Username: pi 39 | Password: raspberry 40 | 41 | Bitcoin should start automatically in headless mode, to get started type: 42 | 43 | ``` 44 | bitcoin-cli getinfo 45 | ``` 46 | 47 | After a few moments Bitcoin should report errors but telling you that is Loading the Blockchain, Verifying Blocks etc. Please be patient, this can take some time but while you’re making a nice cup of tea you can feel good knowing you are supporting the Bitcoin network by distributing its database. 48 | 49 | You can also plug the Pi in to most modern TVs using an HDMI lead. Plug in a keyboard and mouse and type: 50 | 51 | ``` 52 | startx 53 | ``` 54 | 55 | This will load up the desktop mode. To load up Bitcoin Graphical User Interface type open up Terminal from top menu bar and type: 56 | 57 | ``` 58 | bitcoin-cli stop 59 | ``` 60 | 61 | You will need to wait a minute or so for Bitcoin Server to stop. Then type: 62 | 63 | ``` 64 | bitcoin-qt 65 | ``` 66 | 67 | You may get an error if you did it too quickly, no problem, just press the Up Arrow on your keyboard, hit return to try again. 68 | 69 | You may spend a long time on the “Activating Best Chain” progress report, this is a known issue in bitcoin and will be fixed in version 0.12. Once it loads you will be in the GUI where you can go to the menu and click Help>Debug Window to get nice graphs on network usage. 70 | 71 | It is not recommended that you use the Fullnode as a wallet. Though if you want to play around with the JSON RPC it’s fine to put small change on it just for experimentation. 72 | 73 | 74 | A signed Certificate of Authenticity is in your Home folder. If you want one which identifies you personally these are available on request. 75 | 76 | Have fun and remember there’s more to come beginning 6th January 2016. Thank you for supporting the cause. From everyone at ProTip and the Fullnode project we hope you have a wonderful holiday season. 77 | 78 | For more info visit fullnode.protip.is 79 | 80 | # Further Reading 81 | This repo is a work in progress. For further information checkout the following sites: 82 | 83 | [Developer Examples on Bitcoin.org](https://bitcoin.org/en/developer-examples#testnet) 84 | [Bitcoin.it Wiki](https://en.bitcoin.it/wiki/Running_Bitcoin) 85 | [API Call Lists as of v0.8.0](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) 86 | [API reference (JSON-RPC)](https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)) 87 | -------------------------------------------------------------------------------- /Scripts/Install_Complete_Fullnode_Software.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sudo apt-get update 3 | sudo apt-get upgrade -y 4 | sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libb$ 5 | sudo apt-get install libqt4-dev qt4-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev -y 6 | sed '16d' /etc/dphys-swapfile 7 | sed 's/16d/CONF_SWAPSIZE=1024/g' /etc/dphys-swapfile 8 | sudo dphys-swapfile setup 9 | sudo dphys-swapfile swapon 10 | mkdir ~/bin 11 | cd ~/bin 12 | wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz 13 | tar -xzvf db-4.8.30.NC.tar.gz 14 | cd db-4.8.30.NC/build_unix/ 15 | ../dist/configure --enable-cxx 16 | make -j4 17 | sudo make install 18 | cd ~/bin 19 | git clone -b v0.13.1 https://github.com/bitcoin/bitcoin 20 | cd bitcoin/ 21 | ./autogen.sh 22 | ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui=qt4 23 | make -j2 24 | sudo make install 25 | sudo rm -r -f /home/pi/bin 26 | mkdir /home/pi/.bitcoin/ 27 | sudo blkid 28 | sudo mkfs.vfat /dev/sda1 29 | sudo blkid 30 | uuid = echo "What is your uuid number" 31 | read uuid 32 | sed 's/4d/UUID=$uuid /home/pi/.bitcoin vfat uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0/g' /etc/fstab 33 | sudo apt-get remove --purge minecraft-pi wolfram-engine scratch oracle-java8-jdk omxplayer penguinspuzzle greenfoot bluej claws-mail sonic-pi dillo netsurf-gtk -y 34 | sudo apt-get update --fix-missing 35 | sudo apt-get install iceweasel --no-install-recommends 36 | sudo apt-get install tor -y 37 | sudo apt-get install openvpn reolvconf -y 38 | sudo apt-get install nodejs npm 39 | wget https://nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv61.tar.gz 40 | tar -xvf node-v4.0.0-linux-armv61.tar.gz 41 | cd node-v4.0.0-linux-armv61 42 | sudo cp -R * /usr/local/ 43 | sudo npm install npm@latest -g 44 | wget https://gobuilder.me/get/github.com/ipfs/cmd/ipfs/ipfs_master_linux-arm.zip 45 | cd ipfs 46 | sudo mv ipfs /usr/local/bin/ipfs 47 | cd .. 48 | git clone https://github.com/ipfs/station.git 49 | cd station 50 | npm install 51 | npm cache clean 52 | npm start 53 | cd ~ 54 | mkdir btchip 55 | cd btchip 56 | wget https://hardwarewallet.com/zip/add_btchip_driver.sh 57 | sudo bash add_btchip_driver.sh 58 | sudo udevadm control --reload-rules 59 | git clone https://github.com/LedgerHQ/btchip-python.git 60 | cd btchip-python 61 | sudo python setup.py install 62 | cd samples 63 | python getFirmwareVersion.py 64 | cd ../btchip 65 | cd ../.. 66 | git clone https://github.com/LedgerHQ/btchip-c-api.git 67 | cd btchip-c-api 68 | mkdir bin 69 | make 70 | make -f Makefile.hidapi 71 | cd bin 72 | ./btchip_getFirmwareVersion 73 | cd ../.. 74 | cd .. 75 | git clone https://github.com/LedgerHQ/btchip-js-api 76 | cd ~ 77 | sudo apt-get --yes install python-pip python-slowaes python-socksipy 78 | sudo apt-get --yes install pyqt4-dev-tools python-ecdsa python-zbar 79 | sudo apt-get --yes install python-qt4 80 | sudo pip install pyasn1 pyasn1-modules pbkdf2 tlslite qrcode 81 | git clone https://github.com/spesmilo/electrum.git 82 | cd electrum 83 | pyrcc4 icons.qrc -o gui/qt/icons_rc.py 84 | python mki18n.py 85 | python setup.py sdist --format=zip,gztar 86 | -------------------------------------------------------------------------------- /Scripts/Installing_Bitcoin_0.14.0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Install updates 3 | sudo apt-get update 4 | sudo apt-get upgrade -y 5 | # Install dependencies for Bitcoin Core (not the GUI) 6 | sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libevent-dev -y 7 | # Install dependencies for Bitcoin QT (GUI) 8 | sudo apt-get install libqt4-dev qt4-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev -y 9 | # Setup Swap file 10 | sudo sed -i '16s/.*/CONF_SWAPSIZE=2048/g' /etc/dphys-swapfile 11 | sudo dphys-swapfile setup 12 | sudo dphys-swapfile swapon 13 | mkdir ~/bin 14 | cd ~/bin 15 | wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz 16 | tar -xzvf db-4.8.30.NC.tar.gz 17 | cd db-4.8.30.NC/build_unix/ 18 | ../dist/configure --enable-cxx 19 | make -j4 20 | sudo make install 21 | cd ~/bin 22 | git clone -b v0.14.0 https://github.com/bitcoin/bitcoin 23 | cd bitcoin/ 24 | ./autogen.sh 25 | ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui=qt4 26 | make 27 | sudo make install 28 | sudo rm -r -f /home/pi/bin 29 | mkdir ~/.bitcoin/ 30 | touch ~/.bitcoin/bitcoin.conf 31 | printf 'listen=1\nserver=1\ndaemon=0\ntestnet=0\nmempoolexpiry=72\nmaxmempool=300\nmaxorphantx=100\nlimitfreerelay=10\nminrelaytxfee=0.0001\nmaxconnections=40\n' >> bitcoin.conf 32 | 33 | # Remove the swap file we made earlier 34 | sudo swapoff -a 35 | sudo rm /var/swap 36 | sudo systemctl disable dphys-swapfile -------------------------------------------------------------------------------- /Scripts/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Scripts 2 | 3 | 1. [Install Bitcoin Core 0.14 on Raspbian Jessie](https://github.com/MrChrisJ/fullnode/blob/master/Scripts/Installing_Bitcoin_0.14.0.sh) 4 | 2. [Upgrading Bitcoin Fullnode to 0.14](https://github.com/MrChrisJ/fullnode/blob/master/Scripts/Upgrading_to_Bitcoin_0.14.sh) 5 | 3. [Install Complete Fullnode Software](https://github.com/MrChrisJ/fullnode/blob/master/Scripts/Install_Complete_Fullnode_Software.sh) 6 | 7 | These are Bash scripts designed to automate the installation process. To use a script simply download it on to your Raspberry Pi and then run the following commands: 8 | 9 | ``` 10 | sudo chmod +x Installing_Bitcoin_0.14.0.sh 11 | ``` 12 | Then to run the file, type: 13 | ``` 14 | ./Installing_Bitcoin_0.14.0.sh 15 | ``` 16 | 17 | Users who own early versions of the Fullnodes will just need to upgrade using script 2. 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Scripts/Upgrading_to_Bitcoin_0.14.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Install updates 4 | sudo apt-get update 5 | 6 | # Install dependencies for Bitcoin Core (not the GUI) 7 | sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libevent-dev -y 8 | 9 | # Install dependencies for Bitcoin QT (GUI) 10 | sudo apt-get install libqt4-dev qt4-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev -y 11 | 12 | # Setup Swap file 13 | sudo sed -i '16s/.*/CONF_SWAPSIZE=2048/g' /etc/dphys-swapfile 14 | sudo dphys-swapfile setup 15 | sudo dphys-swapfile swapon 16 | 17 | mkdir ~/bin 18 | cd ~/bin 19 | git clone -b v0.14 https://github.com/bitcoin/bitcoin 20 | cd bitcoin/ 21 | ./autogen.sh 22 | ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui=qt4 23 | make -j2 24 | sudo make install 25 | sudo rm -r -f ~/bin 26 | 27 | # Remove the swap file we made earlier 28 | sudo swapoff -a 29 | sudo rm /var/swap 30 | sudo systemctl disable dphys-swapfile -------------------------------------------------------------------------------- /Setup_Guides/InstallingPythonLibrary.md: -------------------------------------------------------------------------------- 1 | ## Setting up Peter Todd's Bitcoin Library 2 | 3 | 1. First thing to do is download the folder from Peter Todds Github Page https://github.com/petertodd/python-bitcoinlib/archive/master.zip 4 | 2. You have to download the zip folder from the Github Page 5 | 3. After installing the zip file you will need to go to file manager which is on the top left hand side 6 | 4. Once in file manager click on Downloads that is where you have installed the unzip folder 7 | 5. Now that your in the Downloads folder scroll down and find python-bitcoinlib-master.zip 8 | 6. Once you have found it right click on it and click extract here or go to the terminal and run this command unzip Downloads/python-bitcoinlib-master 9 | 7. Whatever way you did it you should have an unzip file called python-bitcoinlib-master in the Downloads folder 10 | 8. One of the last things to do is to go to the terminal you may already be in it if you ran the unzip command 11 | 9. Now that your in the terminal you need to navigate to the python-bitcoinlib-master folder 12 | 10. So type cd Downloads and press enter (cd stands for Change Directory) now once your in the Downloads folder enter ls (ls stands for list segments it lists all the segments in the current directory) 13 | 11. So the next thing to do is cd python-bitcoinlib-master now run ls and you will see a file called setup.py so type sudo setup.py install 14 | 12. Now you will see it installing it wont take long maybe 10-15 seconds maybe less when its finished 15 | 13. You can either type python after it has finished typing python will bring you to the python command line or they other thing to do is click on menu in the top left hand side and then to programming you dont have to click on this if you dont want to just wave your mouse over it and click python 2 16 | 14. The last thing to do is once you have either ran python in the terminal or gone to python's interface you can type import bitcoin if you get no errors you have installed it correctly 17 | 15. For code examples visit this link https://github.com/OpenProvenance/python-bitcoinlib-scripting 18 | -------------------------------------------------------------------------------- /Setup_Guides/ReadMe.md: -------------------------------------------------------------------------------- 1 | # Setup Guides 2 | 3 | These are the setup guides if you want to build and customise your own Fullnode. Feedback and contributions are welcome. 4 | 5 | 1. [Setup Bitcoin Core 0.13.2 using latest version of Raspbian Jessie OSX](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_Jessie_Bitcoin_Core_0.13.2.md) 6 | 2. [Setup Bitcoin Core 0.13.2 using Jessie Lite for a Headless Fullnode](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_JessieLite_Bitcoin_Core_0.13.2.md) 7 | 3. [Strip down Jessie](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Strip_Down_Raspbian_Jessie.md) to make free space on your node 8 | 4. [Install Extras on your Fullnode](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_Jessie_Bitcoin_Extras.md) including IPFS and Iceweasel Browser 9 | 5. [Installing Bitcoin Python Library](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/InstallingPythonLibrary.md#setting-up-peter-todds-bitcoin-library) maintained by @PeterTodd 10 | 6. [Bitcoin Configuration file bitcoin.conf](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/bitcoin.conf) with settings tailored to the Raspberry Pi versions 2 and 3. 11 | 7. [Setup Bitcoin Over Tor](https://github.com/MrChrisJ/fullnode/blob/master/Setup_Guides/Setup_Bitcoin_Over_Tor.md) for anonymity 12 | 13 | -------------------------------------------------------------------------------- /Setup_Guides/Setup_Bitcoin_Over_Tor.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Using info found in https://github.com/bitseed-org/bitcoin-box/blob/master/tools/torsetup.sh it is possible to configure your fullnode to also run over TOR 4 | 5 | First install TOR 6 | ``` 7 | sudo apt-get install tor 8 | ``` 9 | 10 | Then use the following commands to add the bitcoin hidden service to TOR 11 | ``` 12 | sudo echo "HiddenServiceDir /var/lib/tor/bitcoin-service/" >> /etc/tor/torrc 13 | sudo echo "HiddenServicePort 8333 127.0.0.1:8333" >> /etc/tor/torrc 14 | ``` 15 | 16 | Then reload the TOR service 17 | ``` 18 | sudo service tor reload 19 | ``` 20 | 21 | Then determine your onion address 22 | ``` 23 | sudo cat /var/lib/tor/bitcoin-service/hostname 24 | ``` 25 | 26 | Then modify your bitcoin.conf file with the following additional lines 27 | 28 | ``` 29 | onion=127.0.0.1:9050 30 | listen=1 31 | bind=127.0.0.1:8333 32 | externalip=(your onion address) 33 | #these are other Tor nodes that will help your node find peers 34 | seednode=nkf5e6b7pl4jfd4a.onion 35 | seednode=xqzfakpeuvrobvpj.onion 36 | seednode=tsyvzsqwa2kkf6b2.onion 37 | #these lines help limit potential DOS attacks over Tor 38 | banscore=10000 39 | bantime=11 40 | 41 | #if you would like your node to only connect over tor use 42 | onlynet=tor 43 | ``` 44 | -------------------------------------------------------------------------------- /Setup_Guides/Setup_JessieLite_Bitcoin_Core_0.13.2.md: -------------------------------------------------------------------------------- 1 | # Installing a Headless Bitcoin #Fullnode on Raspberry Pi 2 Model B 2 | #### This is mashup of two instructions: 3 | [Raspnode](http://raspnode.com/diyBitcoin.html) & [Tutorials & Technicalities - Compile Bitcoin Core on Raspberry Pi](http://blog.pryds.eu/2014/06/compile-bitcoin-core-on-raspberry-pi.html) 4 | 5 | These instructions are for developers or those who just want to create a fast, lightweight Fullnode. This will not give a Desktop Graphical User Interface, just a command line only interface. 6 | 7 | #### You will need: 8 | 1. 4Gb Micro SD card (preferably Class 10 or above with wear protection) 9 | 2. Download Raspian Jessie https://www.raspberrypi.org/downloads/raspbian / or your favourite distro 10 | 11 | #### Installing Raspbian Jessie Lite (OSX Only) 12 | You may need a micro SD Card Adapter as many computers come with traditional SD Memory Card Slots. Insert the card & open up Terminal, do this by going to Spotlight and begin typing "Terminal". 13 | 14 | #### List disks 15 | List all the dists on your computer with this command: 16 | ``` 17 | diskutil list 18 | ``` 19 | This should give you a list of disks. The SD Card you inserted is likely to be the last one on the list. 20 | 21 | If your SD Card is /dev/disk3 for example then type: 22 | ``` 23 | diskutil umountDisk /dev/disk3 24 | ``` 25 | **Be very carefull with the next step.** What we are about to do can destroy data, it is recommended you detach any hard drives or memory cards that you don't need so that it is impossible to overwrite them. 26 | ``` 27 | sudo dd if=2015-11-21-raspbian-jessie-lite.img of=/dev/disk3 bs=4096 conv=noerror,sync 28 | ``` 29 | This will copy the img file to the SD Card. This usually only take a few mins with Jessie Lite as it is a lightweight operating system. 30 | 31 | #### Starting Up Raspbian Jessie Lite on the Pi 32 | Take the micro SD out of its adapter and your computer and put it in to the Raspberry Pi 2 and connect it up to monitor and screen 33 | On first boot it will load up the raspi-config console. If this is not your first time then load it using the commmand: 34 | ``` 35 | sudo raspi-config 36 | ``` 37 | Select: 38 | 1. Expand File System - click OK 39 | 2. Enable SSH 40 | 3. Change hostname to eg "fullnode" (without quotes) 41 | 4. Click Finish by using Tab Key and Reboot 42 | 43 | #### Installing Updates 44 | Make sure the install is up to date like so: 45 | ``` 46 | sudo apt-get update 47 | ``` 48 | ``` 49 | sudo apt-get upgrade -y 50 | ``` 51 | *The -y flag tells the OS to answer "yes" to any prompts warning you of extra disk space required, we use this for convenience but it is not essential.* 52 | 53 | #### Install the Dependencies for Bitcoin 54 | ``` 55 | sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libevent-dev git -y 56 | ``` 57 | 58 | #### Increase Swap File 59 | To make sure you don't run out of memory increase Swap file size, you can return this back to default after install. 60 | ``` 61 | sudo nano /etc/dphys-swapfile 62 | ``` 63 | Change the default size to: 64 | ``` 65 | CONF_SWAPSIZE=1024 66 | ``` 67 | To exit ```cntr+X``` then ```Y``` 68 | ``` 69 | sudo dphys-swapfile setup 70 | ``` 71 | ``` 72 | sudo dphys-swapfile swapon 73 | ``` 74 | 75 | #### Create a folder where we will install the files 76 | ``` 77 | mkdir ~/bin 78 | ``` 79 | ``` 80 | cd ~/bin 81 | ``` 82 | 83 | #### Installing Bitcoin 0.13.2 84 | ``` 85 | git clone -b v0.13.2 https://github.com/bitcoin/bitcoin 86 | ``` 87 | ``` 88 | cd bitcoin/ 89 | ``` 90 | ``` 91 | ./autogen.sh 92 | ``` 93 | ``` 94 | ./configure --enable-upnp-default --disable-wallet 95 | ``` 96 | ``` 97 | make 98 | ``` 99 | ``` 100 | sudo make install 101 | ``` 102 | Usually the errors will not be apparent until this last step. In addition to the ```-j2``` flag you may also be getting errors if: 103 | 104 | 1. The memory card does not have enough space 105 | 2. You did not set the swap file size high enough 106 | 3. You did not install all of the dependencies near the start of the tutorial 107 | 108 | You can delete ~/bin folder after the compiling to save space with: 109 | ``` 110 | sudo rm -r -f /home/pi/bin 111 | ``` 112 | The ```-r``` means recursive (deletes all subfolders) and the ```-f``` means Force delete without prompting. 113 | 114 | #### Return Swap File Back to Default 115 | Remember earlier we increased the swap file size. Some people choose to disable Swapfile altogether by setting ```CONF_SWAPSIZE=0``` however we are going to do it slightly differently see [Issue 20](https://github.com/MrChrisJ/fullnode/issues/20). 116 | 117 | ``` 118 | sudo chmod -x /etc/init.d/dphys-swapfile 119 | sudo swapoff -a 120 | sudo rm /var/swap 121 | ``` 122 | 123 | Note to re-enable just reverse the process: 124 | ``` 125 | sudo chmod +x /etc/init.d/dphys-swapfile 126 | sudo dphys-swapfile setup 127 | sudo dphys-swapfile swapon 128 | ``` 129 | 130 | #### Setting up Bitcoin Data Folder 131 | Once Bitcoin is installed you will need to create a .bitcoin folder inside of your home directory. This is really only necessary if you want to use Bitcoin Command Line Interface (CLI) and run it headlessly. If you do you need to make sure you have enough space. At the time of writing the Bitcoin Blockchain is around 66Gb which means realistically you will need MicroSD or an external Drive that is at least 128Gb. 132 | 133 | ``` 134 | mkdir /home/pi/.bitcoin/ 135 | ``` 136 | If you have an internal MicroSD drive large enough for the whole blockchain you can skip to the section on creating the bitcoin.conf file. Assuming you will be using external media then do the following: 137 | 138 | Display information about block devices attached to the Raspberry Pi... 139 | ``` 140 | sudo blkid 141 | ``` 142 | Make a note of the drive name eg ```/dev/sda1```. Then format the drive you wish to use *if* this hasn't been done already. FAT32 is recommended for compatibility with other devices. Skip this step if the device was formatted on your computer. 143 | ``` 144 | sudo mkfs.vfat /dev/sda1 145 | ``` 146 | Then do the blkid command again: 147 | ``` 148 | sudo blkid 149 | ``` 150 | Make a note of the new UUID number eg. 8736-1215 151 | ``` 152 | sudo nano /etc/fstab 153 | ``` 154 | Enter the following: 155 | ``` 156 | UUID=8736-1215 /home/pi/.bitcoin vfat uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0 157 | ``` 158 | Replacing the "8736-1215" with whatever your drive actually is. Then reboot and the external drive will automatically mount to /home/pi/.bitcoin. 159 | ``` 160 | sudo reboot 161 | ``` 162 | 163 | Next let's go in to our Bitcoin data directory: 164 | ``` 165 | cd /home/pi/.bitcoin 166 | ``` 167 | Using nano text editor we will create the Bitcoin Configuration file bitcoin.conf 168 | ``` 169 | nano bitcoin.conf 170 | ``` 171 | This will open a blank text editor. Enter the following text as a minimum: 172 | ``` 173 | listen=1 174 | server=1 175 | dbcache=50 176 | daemon=1 177 | testnet=0 178 | ``` 179 | Press ```cntr+X``` followed by ```Y``` then ```Enter``` to save changes and return back to the command line. 180 | 181 | #### Starting Bitcoind 182 | To start Bitcoin Daemon type: 183 | ``` 184 | bitcoind -daemon 185 | ``` 186 | To check the status run this command: 187 | ``` 188 | bitcoin-cli getinfo 189 | ``` 190 | While Bitcoin is starting up you will get an error like this one: 191 | ``` 192 | error code: -28 193 | error message: 194 | Verifying blocks... 195 | ``` 196 | This is normal, be patient and use the up arrow on the keyboard to toggle through the previous used commands. Keep re-entering ```bitcoin-cli getinfo`` and eventually you will see something like this: 197 | ``` 198 | { 199 | "version": 120000, 200 | "protocolversion": 70012, 201 | "walletversion": 60000, 202 | "balance": 0.00000000, 203 | "blocks": 96, 204 | "timeoffset": 0, 205 | "connections": 4, 206 | "proxy": "", 207 | "difficulty": 1, 208 | "testnet": false, 209 | "keypoololdest": 1455980870, 210 | "keypoolsize": 101, 211 | "paytxfee": 0.00000000, 212 | "relayfee": 0.00001000, 213 | "errors": "" 214 | } 215 | ``` 216 | **Congratulations you are now running Bitcoin Core 0.12!** 217 | -------------------------------------------------------------------------------- /Setup_Guides/Setup_Jessie_Bitcoin_Core_0.13.2.md: -------------------------------------------------------------------------------- 1 | # Installing the Bitcoin #Fullnode to turn it in to a Freedom Machine 2 | #### This is mashup of two instructions: 3 | [Raspnode](http://raspnode.com/diyBitcoin.html) & [Tutorials & Technicalities - Compile Bitcoin Core on Raspberry Pi](http://blog.pryds.eu/2014/06/compile-bitcoin-core-on-raspberry-pi.html) and forms part of the [Bitcoin Fullnode Project](https://github.com/MrChrisJ/fullnode). 4 | 5 | #### You will need: 6 | 1. 8Gb Micro SD Card (preferably Class 10 or above with wear protection) 7 | 2. Download Raspian Jessie https://www.raspberrypi.org/downloads/raspbian / or your favourite distro 8 | 9 | The new version of Raspbian Jessie is out: 2016-02-09-raspbian-jessie.img, at the time of writing includes bundled software which takes up extra room on the disk. To remove these packages see instructions on Strip Down Raspian. 10 | 11 | *Note* 12 | At the time of writing **2016-02-26-raspbian-jessie.img** released for the latest Raspberry Pi 3 will throw up errors when you reach the Autogen step before compiling Bitcoin. It is recommended that you download the [latest version of Raspbian](https://www.raspberrypi.org/downloads/raspbian/) **2016-03-18-raspbian-jessie.img** to resolve this issue when compiling for the Raspberry Pi 3. 13 | 14 | #### Step 1 - Installing Raspbian on to Micro SD 15 | See [Instalation Instructions](https://www.raspberrypi.org/documentation/installation/installing-images/README.md) on the Raspberry Pi website that includes all operating systems. 16 | 17 | ##### These instructions are for Mac OSX 18 | 19 | Insert Micro SD Card & Open up Terminal 20 | 21 | List disks: 22 | ``` 23 | diskutil list 24 | ```` 25 | 26 | ##### Be carefull to select the correct disk OR YOU COULD LOSE DATA! If your SD Card is /dev/disk2 for example then: 27 | ``` 28 | diskutil umountDisk /dev/disk2 29 | ``` 30 | ``` 31 | sudo dd if=2016-02-09-raspbian-jessie.img of=/dev/disk2 bs=4096 conv=noerror,sync 32 | ``` 33 | 34 | This will take some time. 35 | 36 | #### Turning on the Pi 37 | Take the micro SD out of the adapter and over to the Raspberry Pi 2 and connect it up to monitor and screen. 38 | On first boot it will load up the raspi-config console. If this is not your first time then load it using the commmand: 39 | ``` 40 | sudo raspi-config 41 | ``` 42 | Select: 43 | 1. Expand File System - click OK 44 | 2. Enable SSH 45 | 3. Change hostname to eg "fullnode" (without quotes) 46 | 4. Reboot either via the config 47 | 48 | If you want you can reboot manually like so: 49 | ``` 50 | sudo reboot 51 | ``` 52 | #### Installing Updates 53 | 54 | ``` 55 | sudo apt-get update 56 | ``` 57 | ``` 58 | sudo apt-get upgrade -y 59 | ``` 60 | The -y flag tells the OS to answer "yes" to any prompts warning you of extra disk space required, we use this for convenience but it is not essential. 61 | 62 | #### Install the dependencies 63 | ``` 64 | sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libevent-dev -y 65 | ``` 66 | 67 | #### Dependencies for Graphical User Interface (GUI) QT Wallet 68 | ``` 69 | sudo apt-get install libqt4-dev qt4-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev -y 70 | ``` 71 | #### Increase Swap File size for instalation 72 | Make sure you have at least 2Gb free on the card before starting and increase your swap file like so: 73 | ``` 74 | sudo nano /etc/dphys-swapfile 75 | ``` 76 | Then enter 77 | ``` 78 | CONF_SWAPSIZE=1024 79 | ``` 80 | Then hit control+X and click Y to save and Enter. Then type the command: 81 | ``` 82 | sudo dphys-swapfile setup 83 | ``` 84 | ``` 85 | sudo dphys-swapfile swapon 86 | ``` 87 | 88 | #### Create a folder where we will install the files 89 | ``` 90 | mkdir ~/bin 91 | ``` 92 | ``` 93 | cd ~/bin 94 | ``` 95 | 96 | #### Install the Berkeley DB 4.8 97 | ``` 98 | wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz 99 | ``` 100 | ``` 101 | tar -xzvf db-4.8.30.NC.tar.gz 102 | ``` 103 | ``` 104 | cd db-4.8.30.NC/build_unix/ 105 | ``` 106 | 107 | #### Configuring the system and installing Berkeley DB 108 | *Note the -j4 flag installs using all four cores on the Raspberry Pi* 109 | ``` 110 | ../dist/configure --enable-cxx 111 | ``` 112 | ``` 113 | make -j4 114 | ``` 115 | ``` 116 | sudo make install 117 | ``` 118 | 119 | #### Installing Bitcoin 0.13.2 120 | ``` 121 | cd ~/bin 122 | ``` 123 | ``` 124 | git clone -b v0.13.2 https://github.com/bitcoin/bitcoin 125 | ``` 126 | ``` 127 | cd bitcoin/ 128 | ``` 129 | ``` 130 | ./autogen.sh 131 | ``` 132 | ``` 133 | ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui=qt4 134 | ``` 135 | 136 | In this next step we are going to build the executable files using the [Make tool](https://en.wikipedia.org/wiki/Make_(software)). The ```-j2``` flag tells the computer to use two of the CPU cores. You might find that you get errors, if you do simply drop the flag and use ```make``` on its own instead. 137 | ``` 138 | make -j2 139 | ``` 140 | ``` 141 | sudo make install 142 | ``` 143 | Usually the errors will not be apparent until this last step. In addition to the ```-j2``` flag you may also be getting errors if: 144 | 145 | 1. The memory card does not have enough space 146 | 2. You did not set the swap file size high enough 147 | 3. You did not install all of the dependencies near the start of the tutorial 148 | 149 | You can delete ~/bin folder after the compiling to save space with: 150 | ``` 151 | sudo rm -r -f /home/pi/bin 152 | ``` 153 | The ```-r``` means recursive (deletes all subfolders) and the ```-f``` means Force delete without prompting. 154 | #### Return Swap File Back to Default 155 | Remember earlier we increased the swap file size. Some people choose to disable Swapfile altogether by setting ```CONF_SWAPSIZE=0``` however we are going to do it slightly differently see [Issue 20](https://github.com/MrChrisJ/fullnode/issues/20). 156 | 157 | ``` 158 | sudo chmod -x /etc/init.d/dphys-swapfile 159 | sudo swapoff -a 160 | sudo rm /var/swap 161 | ``` 162 | 163 | Note to re-enable just reverse the process: 164 | ``` 165 | sudo chmod +x /etc/init.d/dphys-swapfile 166 | sudo dphys-swapfile setup 167 | sudo dphys-swapfile swapon 168 | ``` 169 | 170 | #### Setting up Bitcoin Data Folder 171 | Once Bitcoin is installed you will need to create a .bitcoin folder inside of your home directory. This is really only necessary if you want to use Bitcoin Command Line Interface (CLI) and run it headlessly. If you do you need to make sure you have enough space. At the time of writing the Bitcoin Blockchain is around 66Gb which means realistically you will need MicroSD or an external Drive that is at least 128Gb. 172 | 173 | ``` 174 | mkdir /home/pi/.bitcoin/ 175 | ``` 176 | If you have an internal MicroSD drive large enough for the whole blockchain you can skip to the section on creating the bitcoin.conf file. Assuming you will be using external media then do the following: 177 | 178 | Display information about block devices attached to the Raspberry Pi... 179 | ``` 180 | sudo blkid 181 | ``` 182 | Make a note of the drive name eg ```/dev/sda1```. Then format the drive you wish to use *if* this hasn't been done already. FAT32 is recommended for compatibility with other devices. Skip this step if the device was formatted on your computer. 183 | ``` 184 | sudo mkfs.vfat /dev/sda1 185 | ``` 186 | Then do the blkid command again: 187 | ``` 188 | sudo blkid 189 | ``` 190 | Make a note of the new UUID number eg. 8736-1215 191 | ``` 192 | sudo nano /etc/fstab 193 | ``` 194 | Enter the following: 195 | ``` 196 | UUID=8736-1215 /home/pi/.bitcoin vfat uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0 197 | ``` 198 | Replacing the "8736-1215" with whatever your drive actually is. Then reboot and the external drive will automatically mount to /home/pi/.bitcoin. 199 | ``` 200 | sudo reboot 201 | ``` 202 | 203 | Next let's go in to our Bitcoin data directory: 204 | ``` 205 | cd /home/pi/.bitcoin 206 | ``` 207 | Using nano text editor we will create the Bitcoin Configuration file bitcoin.conf 208 | ``` 209 | nano bitcoin.conf 210 | ``` 211 | This will open a blank text editor. Enter the following text as a minimum: 212 | ``` 213 | listen=1 214 | server=1 215 | dbcache=50 216 | daemon=1 217 | testnet=0 218 | ``` 219 | Press ```cntr+X``` followed by ```Y``` then ```Enter``` to save changes and return back to the command line. 220 | 221 | #### Starting Bitcoind 222 | To start Bitcoin Daemon type: 223 | ``` 224 | bitcoind -daemon 225 | ``` 226 | To check the status run this command: 227 | ``` 228 | bitcoin-cli getinfo 229 | ``` 230 | While Bitcoin is starting up you will get an error like this one: 231 | ``` 232 | error code: -28 233 | error message: 234 | Verifying blocks... 235 | ``` 236 | This is normal, be patient and use the up arrow on the keyboard to toggle through the previous used commands. Keep re-entering ```bitcoin-cli getinfo`` and eventually you will see something like this: 237 | ``` 238 | { 239 | "version": 120000, 240 | "protocolversion": 70012, 241 | "walletversion": 60000, 242 | "balance": 0.00000000, 243 | "blocks": 96, 244 | "timeoffset": 0, 245 | "connections": 4, 246 | "proxy": "", 247 | "difficulty": 1, 248 | "testnet": false, 249 | "keypoololdest": 1455980870, 250 | "keypoolsize": 101, 251 | "paytxfee": 0.00000000, 252 | "relayfee": 0.00001000, 253 | "errors": "" 254 | } 255 | ``` 256 | **Congratulations you are now running Bitcoin Core 0.12!** 257 | 258 | #### Running Bitcoin QT in Desktop Mode 259 | To get Bitcoin QT running you will first need to make sure that Bitcoin Daemon has been stopped using this command: 260 | ``` 261 | bitcoin-cli stop 262 | ``` 263 | You will need to load up the Desktop on the Pi with the following command which can only be done if it is attached to a monitor and keyboard directly, this won't work using SSH. 264 | ``` 265 | startx 266 | ``` 267 | After the desktop has loaded open up a terminal window from the menu bar (it's the little black box icon) and type: 268 | ``` 269 | bitcoin-qt 270 | ``` 271 | You will now see the Graphical User Interface load up. Remember you cannot run both Bitcoind and Bitcoin QT at the same time. 272 | 273 | #### And that's all there is to it. You now have your Bitcoin #Fullnode. Enjoy your Freedom! 274 | -------------------------------------------------------------------------------- /Setup_Guides/Setup_Jessie_Bitcoin_Extras.md: -------------------------------------------------------------------------------- 1 | # Installing Extras on the New Fullnode OS 2 | 3 | #### Installing Iceweasel Browser on Raspbian Jessie 4 | Iceweasel is the Firefox Browser for the Arm processor. To install it on the latest version of Jessie 2016-02-09 you will need to add extra flags like so: 5 | ``` 6 | sudo apt-get update --fix-missing 7 | ``` 8 | ``` 9 | sudo apt-get install iceweasel --no-install-recommends 10 | ``` 11 | 12 | #### Installing Tor and VPN Services 13 | Note that you will need to purchase a VPN to secure all your traffic in addition to Bitcoin. We recommend [Mullvad](https://mullvad.net). For the Iceweasel Browser you can install [Zenmate VPN](https://zenmate.com/free-vpn/). 14 | Install Tor (note this is not the browser, just the service that runs in the background) 15 | ``` 16 | sudo apt-get install tor -y 17 | ``` 18 | ``` 19 | sudo apt-get install openvpn resolvconf -y 20 | ``` 21 | #### Installing NodeJs on the Pi 22 | Got this from here: [the Wia Blog](http://blog.wia.io/installing-node-js-v4-0-0-on-a-raspberry-pi/) 23 | 24 | #### Downloading NodeJS v4.0.0 25 | If you are running Raspbian Wheezy install NodeJS and NPM like so: 26 | ``` 27 | sudo apt-get install nodejs npm 28 | ``` 29 | To install v4 of NodeJS on the Pi use these instructions or alternatively checkout this neat app [https://github.com/tj/n](https://github.com/tj/n). 30 | ``` 31 | wget https://nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv7l.tar.gz 32 | ``` 33 | ``` 34 | tar -xvf node-v4.0.0-linux-armv7l.tar.gz 35 | ``` 36 | 37 | ``` 38 | cd node-v4.0.0-linux-armv7l 39 | ``` 40 | Copy to /usr/local 41 | ``` 42 | sudo cp -R * /usr/local/ 43 | ``` 44 | 45 | #### Installing NPM 46 | ``` 47 | sudo npm install npm@latest -g 48 | ``` 49 | #### IPFS - InterPlanetary File System 50 | IPFS is a distributed file system for the web, it is an emerging technology still in its early stages of development, please have fun and test it, [report any issues](https://github.com/ipfs/ipfs/issues) to the open source dev team. 51 | 52 | 1. To install IPFS go to [https://ipfs.io/docs/install/](https://ipfs.io/docs/install/) 53 | 2. Download the Linux ARM version [https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs_master_linux-arm.zip](https://gobuilder.me/get/github.com/ipfs/go-ipfs/cmd/ipfs/ipfs_master_linux-arm.zip) 54 | 3. Then to complete open a terminal window and type... 55 | ``` 56 | cd ipfs 57 | ``` 58 | ``` 59 | sudo mv ipfs /usr/local/bin/ipfs 60 | ``` 61 | 62 | #### Installing IPFS Station 63 | This is a GUI for IPFS if you are unsure of command line. At the time of writing this software is still a big buggy on the Raspberry Pi. Please report any issues or success stories to help other members of the community. 64 | ``` 65 | cd .. 66 | ``` 67 | ``` 68 | git clone https://github.com/ipfs/station.git 69 | ``` 70 | ``` 71 | npm cache clean 72 | ``` 73 | 74 | -------------------------------------------------------------------------------- /Setup_Guides/Strip_Down_Raspbian_Jessie.md: -------------------------------------------------------------------------------- 1 | #### Strip Down Raspbian 2 | Raspbian Jessie comes with a lot of bundled software which you may not need. Here are some instructions you can use to save space on your #Fullnode. 3 | 4 | These following steps are optional, just delete what you don't want. Thanks to Glenn Geenen's Blog Post: [Strip down Raspbian](http://glenngeenen.be/strip-down-raspbian/) for some of the commands used here. 5 | 6 | ``` 7 | sudo apt-get remove --purge minecraft-pi -y 8 | ``` 9 | ``` 10 | sudo apt-get remove --purge wolfram-engine scratch -y 11 | ``` 12 | ``` 13 | sudo apt-get remove --purge oracle-java8-jdk -y 14 | ``` 15 | ``` 16 | sudo apt-get remove --purge omxplayer penguinspuzzle -y 17 | ``` 18 | ``` 19 | sudo apt-get remove --purge greenfoot bluej -y 20 | ``` 21 | ``` 22 | sudo apt-get remove --purge claws-mail -y 23 | ``` 24 | ``` 25 | sudo apt-get remove --purge sonic-pi -y 26 | ``` 27 | ``` 28 | sudo apt-get remove --purge dillo netsurf-gtk -y 29 | ``` 30 | #### Or Remove them all in one go 31 | ``` 32 | sudo apt-get remove --purge minecraft-pi wolfram-engine scratch oracle-java8-jdk omxplayer penguinspuzzle greenfoot bluej claws-mail sonic-pi dillo netsurf-gtk -y 33 | ``` 34 | #### Remove Libre Office 35 | ``` 36 | sudo apt-get remove --purge libreoffice* 37 | ``` 38 | At the end of any of these steps you can run: 39 | ``` 40 | sudo apt-get clean 41 | sudo apt-get autoremove -y 42 | ``` 43 | 44 | This should leave you with about 4Gb of free space. 45 | 46 | -------------------------------------------------------------------------------- /Setup_Guides/bitcoin.conf: -------------------------------------------------------------------------------- 1 | ### bitcoin.conf configuration file for the Bitcoin #Fullnode Project: Not (Just) Made In China 2 | ## These settings are designed for the Raspberry Pi versions 2 & 3 see http://fullnode.protip.is for details 3 | ## Lines beginning with # are comments. 4 | ## Uncomment and edit options you wish to use, detailed guide here: https://en.bitcoin.it/wiki/Running_Bitcoin 5 | 6 | ### Enable incoming data connections 7 | ## To ensure your Fullnode validates transactions it is necessary to have both ‘upnp’ and ‘listen’ enabled. 8 | ## Note that many users will also need to enable Port Forwarding on their home router. 9 | ## To do this: go to your router’s page e.g. 192.168.0.1 in your browser then choose Advanced Settings 10 | ## Setup port forwarding on TCP/UDP 8333 to 8333 for the IP address of your Fullnode and Apply Changes 11 | ## If successful you will notice in time the number of connections increase above 8 12 | ## For more details see here: https://bitcoin.org/en/full-node#network-configuration 13 | upnp=1 14 | listen=1 15 | 16 | ## Use this for Bitcoin development and blockchain analysis 17 | # Note uncommenting this line will make Bitcoin rescan the whole blockchain which can takes several days 18 | #txindex=1 19 | 20 | ## Performance: Bandwidth and Memory usage 21 | # Cache size in Mb for the DB. Lower is better when using Bitcoin with other apps running, default is 100Mb. 22 | #dbcache=50 23 | 24 | # Send and receive complete blocks only, no loose transactions. Uncommenting can reduce bandwidth by 88% 25 | #blocksonly=1 26 | 27 | # Max number of megabytes uploaded by node per day. 144Mb is 1:1 ratio with downloading 1 day of blocks 28 | #maxuploadtarget=144 29 | 30 | mempoolexpiry=72 31 | maxmempool=300 32 | maxorphantx=100 33 | 34 | ## To save disk space you can prune the blockchain to n MB below. Min value is 550. 0 means Pruning is disabled. 35 | # Note if you prune before syncing, Bitcoin will still validate every block but it will only use up the max disk 36 | # space specified below, deleting block data as it syncs. The node still relays transactions to other nodes when enabled. 37 | prune=0 38 | 39 | ## Spam protection 40 | limitfreerelay=10 41 | minrelaytxfee=0.0001 42 | 43 | ## Maximum number of inbound+outbound connections 44 | # Consider setting this to 20-25 if you have issues 45 | maxconnections=40 46 | 47 | ## Data directory for bitcoin, Use for external devices or if not using the default directory 48 | # sample datadir=/home/media/USB/.bitcoin 49 | #datadir= 50 | 51 | ## JSON-RPC options (for controlling a running bitcoin-qt/bitcoind process) 52 | # =1 tells Bitcoin to accept JSON-RPC commands so that your fullnode can be run as a server 53 | server=1 54 | daemon=0 55 | 56 | # How many seconds Bitcoin will wait for a complete RPC HTTP request 57 | # after the HTTP connection is established. 58 | rpctimeout=30 59 | 60 | # By default, only RPC connections from localhost are allowed. Specify 61 | # as many rpcallowip= settings as you like to allow connections from 62 | # other hosts (and you may use * as a wildcard character): 63 | #rpcallowip=10.1.1.* 64 | #rpcallowip=192.168.1.* 65 | 66 | # Listen for RPC connections on this TCP port: 67 | rpcport=8332 68 | 69 | # You can use bitcoind to send commands to bitcoin-qt/bitcoind 70 | # running on another host using this option: 71 | rpcconnect=127.0.0.1 72 | 73 | # Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate 74 | # with Bitcoin -server or bitcoind 75 | #rpcssl=1 76 | 77 | # OpenSSL settings used when rpcssl=1 78 | rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH 79 | rpcsslcertificatechainfile=server.cert 80 | rpcsslprivatekeyfile=server.pem 81 | 82 | ### Network-related settings: 83 | 84 | # Run on the test network instead of the real bitcoin network. 85 | #testnet=1 86 | 87 | # Connect via a socks proxy 88 | # proxy=127.0.0.1:9050 89 | 90 | # Select the version of socks proxy to use (4-5, default: 5) 91 | #socks=5 92 | 93 | # Use proxy to reach Tor hidden services (default: same as -proxy) 94 | # See Issue 6 on Github for setup: https://github.com/MrChrisJ/fullnode/issues/6 95 | #onlynet=tor 96 | #onion=127.0.0.1:9050 97 | 98 | # These are other Tor nodes that will help your node find peers 99 | #seednode=nkf5e6b7pl4jfd4a.onion 100 | #seednode=xqzfakpeuvrobvpj.onion 101 | #seednode=tsyvzsqwa2kkf6b2.onion 102 | # These lines help limit potential DOS attacks over Tor 103 | #banscore=10000 104 | #bantime=11 105 | 106 | ############################################################## 107 | ## Quick Primer on addnode vs connect ## 108 | ## Let's say for instance you use addnode=4.2.2.4 ## 109 | ## addnode will connect you to and tell you about the ## 110 | ## nodes connected to 4.2.2.4. In addition it will tell## 111 | ## the other nodes connected to it that you exist so ## 112 | ## they can connect to you. ## 113 | ## connect will not do the above when you 'connect' to it.## 114 | ## It will *only* connect you to 4.2.2.4 and no one else.## 115 | ## ## 116 | ## So if you're behind a firewall, or have other problems ## 117 | ## finding nodes, add some using 'addnode'. ## 118 | ## ## 119 | ## If you want to stay private, use 'connect' to only ## 120 | ## connect to "trusted" nodes. ## 121 | ## ## 122 | ## If you run multiple nodes on a LAN, there's no need for## 123 | ## all of them to open lots of connections. Instead ## 124 | ## 'connect' them all to one node that is port forwarded ## 125 | ## and has lots of connections. ## 126 | ## Thanks goes to [Noodle] on Freenode. ## 127 | ############################################################## 128 | 129 | # Use as many addnode= settings as you like to attempt connection to specific p$ 130 | #addnode=69.164.218.197 131 | #addnode=10.0.0.2:8333 132 | 133 | # or use as many connect= settings as you like to connect ONLY to specific peer$ 134 | #connect=69.164.218.197 135 | #connect=192.168.1.20:8333 136 | 137 | # Do not use Internet Relay Chat to find peers. 138 | noirc=0 139 | 140 | # Miscellaneous options 141 | 142 | # Pre-generate this many public/private key pairs, so wallet backups will be va$ 143 | # after future transactions. 144 | #keypool=100 145 | 146 | # Add an optional transaction fee every time you send bitcoins. 147 | #paytxfee=0.01 148 | 149 | # Add timestamps to debug.log 150 | #logtimestamps=1 151 | 152 | # Miscellaneous options 153 | 154 | # Pre-generate this many public/private key pairs, so wallet backups will be va$ 155 | # after future transactions. 156 | #keypool=100 157 | 158 | # Add an optional transaction fee every time you send bitcoins. 159 | #paytxfee=0.01 160 | 161 | # Add timestamps to debug.log 162 | #logtimestamps=1 163 | 164 | 165 | # User interface options 166 | 167 | # Start Bitcoin minimized 168 | #min=1 169 | 170 | # Minimize to the system tray 171 | minimizetotray=0 172 | -------------------------------------------------------------------------------- /bitcoin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Install updates 4 | sudo apt-get update 5 | sudo apt-get upgrade -y 6 | 7 | # Install dependencies for Bitcoin Core (not the GUI) 8 | sudo apt-get install build-essential autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev libtool libevent-dev -y 9 | 10 | # Install dependencies for Bitcoin QT (GUI) 11 | sudo apt-get install libqt4-dev qt4-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev -y 12 | 13 | # Setup Swap file 14 | sudo sed -i '16s/.*/CONF_SWAPSIZE=1024/g' /etc/dphys-swapfile 15 | sudo dphys-swapfile setup 16 | sudo dphys-swapfile swapon 17 | 18 | mkdir ~/bin 19 | cd ~/bin 20 | wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz 21 | tar -xzvf db-4.8.30.NC.tar.gz 22 | cd db-4.8.30.NC/build_unix/ 23 | ../dist/configure --enable-cxx 24 | make -j4 25 | sudo make install 26 | cd ~/bin 27 | git clone -b v0.13.1 https://github.com/bitcoin/bitcoin 28 | cd bitcoin/ 29 | ./autogen.sh 30 | ./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui=qt4 31 | make -j2 32 | sudo make install 33 | sudo rm -r -f /home/pi/bin 34 | mkdir /home/pi/.bitcoin/ 35 | cd .bitcoin/ 36 | touch bitcoin.conf 37 | printf 'listen=1\n server=1\n daemon=1\n testnet=0\n rpcuser=BITCOIN_USER\n rpcpassword=BITCOIN_PASSWORD' >> bitcoin.conf 38 | 39 | 40 | # Remove the swap file we made earlier 41 | sudo chmod -x /etc/init.d/dphys-swapfile 42 | sudo swapoff -a 43 | sudo rm /var/swap --------------------------------------------------------------------------------