How to use the command line to install or upgrade PIVX and start staking on Linux.
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)
Stop the currently running PIVX daemon. Your PIVX binaries may be in a different location like Downloads
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
[email protected]:~ $ 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.1.1-arm-linux-gnueabihf.tar.gz)
[email protected]:~ $ wget https://github.com/PIVX-Project/PIVX/releases/download/v3.1.1/pivx-3.1.1-x86_64-linux-gnu.tar.gz
--2017-11-30 20:32:22-- https://github.com/PIVX-Project/PIVX/releases/download/v3.1.1/pivx-3.1.1-x86_64-linux-gnu.tar.gz
Saving to: ‘pivx-3.1.1-x86_64-linux-gnu.tar.gz’
pivx-3.1.1-x86_64-l 100%[===================>] 35.79M 7.89MB/s in 5.9s
2018-07-13 09:30:58 (6.11 MB/s) - ‘pivx-3.1.1-x86_64-linux-gnu.tar.gz’ saved [37533970/37533970]
Extract the tar.gz file to the pivx-3.0.6 folder, still in the home directory
New installs only: Create the .pivx folder and pivx configuration with the RPC lines required for pivx-cli to talk to pivxd
#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:
Start the PIVX daemon
Be impatient and spam getinfo to see if it's ready yet so you can get staking. "Blockchain information not yet available" just means it's still starting, which takes a few minutes and quite a bit longer on a single board computer.
Remember to be safe and always encrypt your wallet before holding any PIVX!
You can give your wallet a password by using the commands:
The wallet will turn off once it has completed encrypting. All you need to do is run 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
[email protected]:~ $ ~/pivx-3.1.1/bin/pivx-cli walletpassphrase 9jF5rujKLo96t$4erfdy76tf 0 true
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