Skip to content

How to Build paycoind on Raspian (Raspberry Pi)

Thomas Le edited this page Nov 15, 2015 · 13 revisions

This is the process I used to create a Paycoin Node on a Raspberry Pi running Raspian.

Remove some Unneeded Software

sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove

The above steps saves about 300mb of space.

Due to running on a Raspberry Pi you do not have enough RAM to build so we got to build Virtual RAM Know as SWAP

Type df -k and if the top line is 3.9gb and you have larger than a 4gb sd card read the following paragraph.

If you have larger than a 4gb SD card and are using the 4GB image for Raspian you can follow this tutorial to expand the file system so you get full use out of the SD card.

Create Swap

sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
sudo mkswap /var/swap.img
sudo swapon /var/swap.img

Setup your Development Environment

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y git
sudo apt-get install -y vim (If you want VI)
sudo apt-get install -y build-essential (this was 
sudo apt-get install -y libdb++-dev
sudo apt-get install -y autoconf libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev (FYI 304MB download)
sudo apt-get install -y libdb5.3

Download newest Paycoin source

cd /opt (If is doe not exist then sudo mkdir /opt)
sudo git clone https://github.com/PaycoinFoundation/paycoin.git

Start Building paycoin

cd /opt/paycoin/src
sudo make -f makefile.unix USE_UPNP=-
sudo cp paycoind /usr/local/bin *(this allows you to type paycoind "wallet command" from any directory) *

Run Paycoind & Setup Paycoin.conf

cd ~
paycoind &
nano ~/.paycoin/paycoin.conf 
rpcuser=pick any username
rpcpassword=A really strong password
server=1

Important Commands

paycoind & - Adding the "&" runs the wallet as a service and will not terminate on logout
paycoind getinfo
paycoind encryptwallet (long complicated password) - Remember this as it is required to unlock your wallet to send coins and mint coins
paycoind walletpassphase (long complicated password) 99999999 - *Unlocks wallet for minting once blockchain is synchronized and you have mature coins *

Backup and Restore Wallet

Backup

cd ~/
paycoind backupwallet xpy_backup_wallet.dat

Restore

cd ~/.paycoin
mv wallet.dat old_wallet.dat
mv ~/xpy_backup_wallet.dat ~/.paycoin/wallet.dat

Upgrade Instructions.

cd /opt/paycoin
git pull
cd src
make -f makefile.unix USE_UPNP=-
paycoind stop
cp ./paycoind /usr/local/bin/
paycoind
paycoind getinfo (verify the correct wallet version)

Other useful commands

paycoind help
paycoind listtransactions
paycoind listminting
Clone this wiki locally