[Download] Peercoin-Raspi-Desktop - Automated installer for raspberry pi


#1

Peercoin-Raspi desktop is an automated installer package for Peercoin on your raspberry pi.

All customized content consists of scripts and desktop items, and is viewable as plain text. The installer will download the peercoin source code directly from github, and will compile it on your pi. This way you are certain that you will have the official and unaltered client on your device.

Functionality:

  • User friendly setup and configuration
  • Choose between either the official reference client or the full featured community client, Peerunity
  • Minting shortcut on the desktop
  • Easy wallet backup to USB
  • Easy wallet import from USB
  • Automatic weekly email status updates
  • Secure by default; local access only, firewall enabled

The parts you will need for peercoin-raspi are:

  1. Fresh raspbian image, download here: http://downloads.raspberrypi.org/raspbian_latest

[ul][li]Extract the .img from the downloaded .zip file before writing it to an sd card[/li]
[li]Password for default user (pi) is raspberry[/li][/ul]

  1. Either win32diskimager (windows), or PIwriter (mac) to write the raspbian image to sd card

[ul][li]win32diskimager: http://sourceforge.net/projects/win32diskimager/files/latest/download[/li]
[li]PIwriter: http://sourceforge.net/projects/piwriter/files/PiWriter-1.x/[/li][/ul]

  1. Setup guide (peercoin-raspi-install-guide.pdf):
    mirror 1 dropbox
    mirror 2 google

  2. Desktop package (peercoin-raspi-0.4.0.zip, dont worry about the version in the file name, this package is valid for the newest version):
    mirror 1 dropbox
    mirror 2 google

  3. Install script (install_peercoin.sh)
    :slight_smile: CHOICE: You have 2 choices

  • The official core protocol client (basic functionality)
  • Full featured community client Peerunity, with features like coin control and minting probability overview
    Both versions include ppcoind for command line.
    [table]
    [tr]
    [td]Official core protocol client: Peercoin-qt [/td]
    [td]Full featured community client: Peerunity[/td]
    [/tr]
    [tr]
    [td]mirror 1 dropbox[/td]
    [td]mirror 1 dropbox[/td]
    [/tr]
    [tr]
    [td]mirror 2 google[/td]
    [td]mirror 2 google[/td]
    [/tr]
    [/table]

Follow the steps in the setup guide to install Peercoin on your PI.
Extra note: On a slow SD card, the compile process can take up to 24 hours! On a fast (class 10 or better) SD card the installation&compile process will be done under 4 hours.

Warning, local access only: The installer script will uninstall ssh, and activate a firewall. The setup only works with a locally attached keyboard and mouse.

Control over the installation steps
Those who want more control over the installation can also open install_peercoin.sh in an editor (for example leafpad on the pi), and execute each step manually in a terminal window. Note that a lot of commands need to have ‘sudo’ in front (for root permissions)!

[center][/center]

Security notes

[ul][li]You can reset your RPC password by using the ‘configure peercoin’ desktop item. Make it about 30 characters of gibberish, you don’t have to remember it. Restart the client afterwards.[/li]
[li]Always encrypt your wallet, and use a long wallet password with Capital letters, numbers and/or special characters in it. It should NOT be the same as your RPC password. You should always remember your wallet password, without it you cannot send your coins.[/li][/ul]

Happy minting!
Tea42

Disclaimer: I am not accountable for anything that happens on your raspberry pi. Using this installer package is your own responsibility.


#2

Part 2 - Automatic conversion to full node with incoming connections -

Run a Full Node with port forwarding, and contribute to the Peercoin network
If you want to help the Peercoin network to grow, you can contribute to the distibution of the blockchain by running a full node with incoming connections.
Security wise, it is best to mint on a node without port forwarding, like the installation above. Full nodes with incoming connections (with port forwarding) are generally running with an empty wallet.
Also be aware that the conversion script opens up the firewall for port 9901.

The following functionality is added:

  • Opens a browser for you to configure port forwarding on your router
  • Makes the peercoin client start automatically
  • If your external IP address changes, your peercoin client will be restarted automatically (Credits to ROMERUN)

- Steps to convert -
This part currently only works for the core protocol client, not yet for Peerunity!
If you use Peerunity, perform these manual steps:

[ul][li]open an lxterminal, and type: sudo ufw allow 9901[/li]
[li]to display the ip address of your raspi, type: sudo ifconfig[/li]
[li]Configure your router to forward TCP port 9901 to the ip address of your raspi[/li][/ul]

Automated steps for the core protocol client:
Download the following 3 files, and put them all on the pi Desktop:

Desktop 1 preconfigure full node.desktop | mirror 1 dropbox | mirror 2 google
Desktop 2 FULL PPC node.desktop | mirror 1 dropbox | mirror 2 google
desktopgotofullnode.sh | mirror 1 dropbox | mirror 2 google

Next:
Doubleclick the Desktop 1 icon (this makes the script executable)
Doubleclick the Desktop 2 icon (this starts the script)
Follow the instructions on the terminal window that opens.

After rebooting, you can delete the 3 files on your desktop. After a few hours you should have more than 8 connections to your peercoin client.

Rollback to original desktop
An undo script will be generated. To roll back to the original desktop, open a terminal and run:
/home/pi/scripts/undodesktopfullnode.sh
Reboot afterwards.
Note that you will have to deconfigure port forwarding yourself, on your router.


#3

Thank you Tea42.

I think your achievement here will get some serious interest! ;D ;D ;D

Edit: I sent to you a few PPC as small compensation for your large achievement. Thanks Again! :slight_smile:


#4

[quote=“NewMoneyEra, post:3, topic:2255”]Thank you Tea42.

I think your achievement here will get some serious interest! ;D ;D ;D

Edit: I sent to you a few PPC as small compensation for your large achievement. Thanks Again! :)[/quote]

Woa, thank you NewMoneyEra!


#5

Very nice, now just need to order the R-pi…

BTW Can you get an simple graphical terminal setup into the R-pi? Like taking over a PC remotely. Would save the hassle of connecting the keyboard and monitor.


#6

[quote=“Cybnate, post:5, topic:2255”]Very nice, now just need to order the R-pi…

BTW Can you get an simple graphical terminal setup into the R-pi? Like taking over a PC remotely. Would save the hassle of connecting the keyboard and monitor.[/quote]

Here is an article about remote desktop from a windows computer to an RPi: http://www.raspians.com/knowledgebase/?knowledgebase=setting-up-a-remote-desktop-view-the-pi-on-your-windows-pc/
But I’m not a big fan of remote connections to my wallet… If someone is on your lan (almost everyone has wifi ), then they can try to hack into your pi if you open that port.
By default everything is closed up after you run the installer above (except ppc port 9902). You’d have to reinstall openssh-server to be able to connect with ssh. Also you’d have to open the ssh port on the UFW firewall on the pi.

During the installation you need to connect a keyboard+mouse anyway, and either a monitor or a tv. After everything is running and your client is minting, you can disconnect everything except the power and network. The pi will send you an email with the status of your peercoin client every friday at 9 am.


#7

Tea42,
this is awesome! You are making ppc even more decentralised.

Now, I am using my RPi to mint as well! I like your scripts and the guide a lot. Although I did not used them to set up the PPC client, I have looked up many good and helpful commands!

You could push your guide even more by showing how to enable inbound connections to the new RPi-networtnode.
For example, I had to configure my router to do portforwarding for port 9902 and I added
listen=1
to the ppcoin.conf. (I guess this is default, but I am not sure).

I guess enabling inbound connections is not dangerous, right?

After I have downloaded the blockchain, I will tip you with my RPi.


#8

Josojo thank you for the nice comments! But think twice before you enable port forwarding, there was a discussion about it here: http://www.peercointalk.org/index.php?topic=2597.msg22279#msg22279
From what I understand the general consensus seems to be that you should only run a full node (ie use port forwarding)with an empty wallet, and mint without port forwarding. This because port forwarding allows attempts from outside to try and brute force your rpc password.


#9

[quote=“Tea42, post:8, topic:2255”]But think twice before you enable port forwarding, there was a discussion about it here: http://www.peercointalk.org/index.php?topic=2597.msg22279#msg22279
From what I understand the general consensus seems to be that you should only run a full node (ie use port forwarding)with an empty wallet, and mint without port forwarding. This because port forwarding allows attempts from outside to try and brute force your rpc password.[/quote]

I didn’t feel like we got to any consensus on that discussion. More smoke than light. We need more info. Is anyone aware of any qt wallet, even bitcoin, being hacked thru an opened port?

Any actual funds lost in this way?


#10

I updated the second post (part 2 - extra info - ), just to be sure. Better safe than sorry :slight_smile:


#11

Well I dont think RPC calls are this dangerous.

Bruteforcing these hard passwords is very hard. And by default ppcoind accepts only rpc calls from the local host.

# By default, only RPC connections from localhost are allowed. Specify # as many rpcallowip= settings as you like to allow connections from # other hosts (and you may use * as a wildcard character): rpcallowip=127.0.0.1 rpcallowip=192.168.1.*
This quote is from the standard ppcoind.conf file.

I know, its always better save than sorry, but I guess threat is minimal.


#12

[quote=“josojo, post:11, topic:2255”]Well I dont think RPC calls are this dangerous.

Bruteforcing these hard passwords is very hard. And by default ppcoind accepts only rpc calls from the local host.

# By default, only RPC connections from localhost are allowed. Specify # as many rpcallowip= settings as you like to allow connections from # other hosts (and you may use * as a wildcard character): rpcallowip=127.0.0.1 rpcallowip=192.168.1.*
This quote is from the standard ppcoind.conf file.

I know, its always better save than sorry, but I guess threat is minimal.[/quote]

Yes better safe than sorry. I am no networking expert and it is hard to figure with many different perspectives being given. Some say if you have no port forwarding then you are a network leech: more a part of the problem than the solution. With not listening and having only 8 connections you weaken the network and don’t strengthen it. But, then guys who have port forwarded complain of massive bandwidth consumption: megabytes per second continuous upload speeds and exceeding their terabyte max limits in short time periods and getting throttled back by their ISPs etc., etc. I honestly don’t know what to think, and I sure wish I did understand this better.


#13

[quote=“josojo, post:11, topic:2255”]Well I dont think RPC calls are this dangerous.

Bruteforcing these hard passwords is very hard. And by default ppcoind accepts only rpc calls from the local host.

# By default, only RPC connections from localhost are allowed. Specify # as many rpcallowip= settings as you like to allow connections from # other hosts (and you may use * as a wildcard character): rpcallowip=127.0.0.1 rpcallowip=192.168.1.*
This quote is from the standard ppcoind.conf file.

I know, its always better save than sorry, but I guess threat is minimal.[/quote]

josojo thanks for that information! So the threat isn’t nearly as big as I thought. The only problem with port forwarding is possible bandwith consumption then. I edited the security notes.

And NewMoneyEra that is also a valid point. If there is no threat in it other than a lot of traffic, it’s not dangerous to run a full node.

Except if there is some RPC security problem through which you can still somehow send commands from another IP. But that would be very quickly in the news, and the problem would also be fixed very fast.


#14

When I get a chance, I’ll open a port up and measure the traffic that is passed through in a 24 hour period. I’ll do the same thing the next day, and then once more on Testnet (possible differences due to the speed of blocks)?


#15

was about to do something similar, i just cant believe those remarks of megabytes per second until i see it with my own eyes


#16

was about to do something similar, i just cant believe those remarks of megabytes per second until i see it with my own eyes[/quote]
That’s appreciated as I’m still on a datacap, and I guess a few more people would be.


#17

Updated part 2. I’m convinced that port forwarding on 9902 is secure enough, and my second pi is now running as a full peercoin node :slight_smile:


#18

Hi Tea, I tested your script and it is really awesome. Thanks for this contribution.

The only thing I found so far is the screensaver, which should be disabled. It takes about 40-90% CPU and most of the time no screen will be connected to the pi.

One more question: How to autostart peercoin wallet at boot? You could also include this as optional setting in your script.


#19

[quote=“MUTO, post:18, topic:2255”]Hi Tea, I tested your script and it is really awesome. Thanks for this contribution.

The only thing I found so far is the screensaver, which should be disabled. It takes about 40-90% CPU and most of the time no screen will be connected to the pi.

One more question: How to autostart peercoin wallet at boot? You could also include this as optional setting in your script.[/quote]

you can select a blank screen instead of a random screensaver


#20

Yes, I changed it. Not a big deal. But would be nice to have it automatically executed in the script.