The first few commands will help you backup your files for an upgrade, but brand new installs can skip down to the highlighted location.  This guide should be updated as new versions are released, but make sure you use the latest version in the download step.



Change Directory to the home directory (/home/pi in this case)

pi@barry:~ $ cd ~


Stop the currently running PIVX daemon.  Your PIVX binaries may be in a different location like Downloads

pi@barry:~ $ pivx-3.0.6/bin/pivx-cli stop
PIVX server stopping


Make a backup of the current wallet (to a network share in  this case but you can copy to a USB too).  Backing up your wallet to a  safe location is always a good idea

pi@barry:~ $ cp .pivx/wallet.dat /media/Crypto/walletBackups/wallet.dat.pivx.20171130.bak


New installs being here

Download  the new binaries from the official github repository.  Make sure you get the right build for your device.  For a Raspberry Pi, you want the 32-bit ARM release (pivx-3.0.6-arm-linux-gnueabihf.tar.gz)

pi@barry:~ $ wget https://github.com/PIVX-Project/PIVX/releases/download/v3.0.6/pivx-3.0.6-x86_64-linux-gnu.tar.gz
--2017-11-30 20:32:22--  https://github.com/PIVX-Project/PIVX/releases/download/v3.0.6/pivx-3.0.6-x86_64-linux-gnu.tar.gz

...

Saving to: ‘pivx-3.0.6-x86_64-linux-gnu.tar.gz’

pivx-3.0.6-x86_64-linu 100%[=====================>]  29.58M  9.71MB/s   in 3.2s

2017-11-30 20:32:26 (9.19 MB/s) - ‘pivx-3.0.6-x86_64-linux-gnu.tar.gz’ saved
[31019051/31019051]


Extract the tar.gz file to the pivx-3.0.6 folder, still in the home directory

pi@barry:~ $ tar -xvzf pivx-3.0.6-x86_64-linux-gnu.tar.gz
pivx-3.0.6/
pivx-3.0.6/bin/
pivx-3.0.6/bin/pivx-cli
pivx-3.0.6/bin/pivxd
pivx-3.0.6/bin/pivx-qt
pivx-3.0.6/bin/pivx-tx
pivx-3.0.6/bin/test_pivx
pivx-3.0.6/bin/test_pivx-qt


New installs only: Create the .pivx folder and pivx configuration with the RPC lines required for pivx-cli to talk to pivxd

pi@barry:~ $ mkdir ~/.pivx
pi@barry:~ $ nano ~/.pivx/pivx.conf

#Add the following lines to the file.  For the X's, press 16+ random keys on the keyboard.  You don't need to record or remember these random values:

rpcuser=XXXXXXXXXXXXXXXX
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Start the PIVX daemon

pi@barry:~ $ ~/pivx-3.0.6/bin/pivxd -daemon
PIVX server starting


Be impatient and spam getinfo to see if it's ready yet so you can get staking.  "Loading block index..." just means it's still starting, which takes a few minutes and quite a bit longer on a raspberry pi.

pi@barry:~ $ ~/pivx-3.0.6/bin/pivx-cli getinfo
error: {"code":-28,"message":"Loading block index..."}


The daemon is ready and the version number indicates the newest version in the "version" line.  However we are not staking yet, as indicated in the "staking status" line.

pi@barry:~ $ ~/pivx-3.0.6/bin/pivx-cli getinfo
{
    "version" : 3000600,
    "protocolversion" : 70912,
    "walletversion" : 61000,
    "balance" : 1337.58408386,
    "zerocoinbalance" : 0.00000000,
    "blocks" : 286820,
    "timeoffset" : 0,
    "connections" : 2,
    "proxy" : "",
    "difficulty" : 86879.77667644,
    "testnet" : true,
    "moneysupply" : 90920257.42380112,
    "zPIVsupply" : {
        "1" : 4451.00000000,
        "5" : 14375.00000000,
        "10" : 15580.00000000,
        "50" : 62050.00000000,
        "100" : 139200.00000000,
        "500" : 611500.00000000,
        "1000" : 1265000.00000000,
        "5000" : 15955000.00000000,
        "total" : 18067156.00000000
    },
    "keypoololdest" : 1511715814,
    "keypoolsize" : 1002,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00010000,
    "staking status" : "Staking Not Active",
    "errors" : ""
}


Remember to be safe and always encrypt your wallet before holding any PIVX!

You can give your wallet a password by using the commands:


~/pivx-3.0.6/bin/pivx-cli encryptwallet mysupercomplexpasswordhere


The wallet will turn off once it has completed encrypting. All you need to do is run 

~/pivx-3.0.6/bin/pivxd -daemon


to get it started!



Unlock the wallet for staking only.  The syntax is 

walletpassphrase <passphrase> <unlock time> <for  staking/anonymization only true/false>  

Introduced in v2.3 is the ability to unlock indefinitely by using an unlock time of 0.  It is recommended that you start the command with a space so it is not saved in bash history with your passhrase.  If you've already done this, you can use nano to remove the entry from ~./bash_history

pi@barry:~ $  ~/pivx-3.0.6/bin/pivx-cli walletpassphrase 9jF5rujKLo96t$4erfdy76tf 0 true


Staking active!

pi@barry:~ $ ~/pivx-3.0.6/bin/pivx-cli getinfo
{
    "version" : 3000600,
    "protocolversion" : 70912,
    "walletversion" : 61000,
    "balance" : 1337.58408386,
    "zerocoinbalance" : 0.00000000,
    "blocks" : 986820,
    "timeoffset" : 0,
    "connections" : 16,
    "proxy" : "",
    "difficulty" : 147509.58522445,
    "testnet" : true,
    "moneysupply" : 90920257.42380112,
    "zPIVsupply" : {
        "1" : 4451.00000000,
        "5" : 14375.00000000,
        "10" : 15580.00000000,
        "50" : 62050.00000000,
        "100" : 139200.00000000,
        "500" : 611500.00000000,
        "1000" : 1265000.00000000,
        "5000" : 15955000.00000000,
        "total" : 18067156.00000000
    },
    "keypoololdest" : 1511715814,
    "keypoolsize" : 1002,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00010000,
    "staking status" : "Staking Active",
    "errors" : ""

}



If you have unlocked your wallet but staking is still not active, please refer to the troubleshooting guide here: https://pivx.freshdesk.com/support/solutions/articles/30000023125-how-to-troubleshoot-staking-activation