-
Notifications
You must be signed in to change notification settings - Fork 719
Running PIVX
There are two variations of the PIVX program available; one with a graphical user interface (usually referred to as just PIVX), and a 'headless' version (called pivxd). They are completely compatible with each other, and take the same command-line arguments, read the same configuration file, and read and write the same data files. You can run one copy of either PIVX or pivxd on your system at a time (if you accidently try to launch another, the copy will let you know that PIVX or pivxd is already running and will exit).
The simplest way to start from scratch with the command line client, automatically syncing blockchain and creating a wallet, is to just run this command (without arguments) from the directory containing your pivxd binary:
./pivxd
To run with the standard GUI interface:
./pivx-qt
These commands are accurate as of PIVX Core version v3.0.6.
Command | Description | |
---|---|---|
-? | Print this help message and exit | |
-version | Print version and exit | |
-alertnotify=<cmd> | Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message) | |
-alerts | Receive and display P2P network alerts (default: 1) | |
-blocknotify=<cmd> | Execute command when the best block changes (%s in cmd is replaced by block hash) | |
-checkblocks=<n> | How many blocks to check at startup (default: 500, 0 = all) | |
-conf=<file> | Specify configuration file (default: pivx.conf) | |
-datadir=<dir> | Specify data directory | |
-dbcache=<n> | Set database cache size in megabytes (4 to 4096, default: 100) | |
-loadblock=<file> | Imports blocks from external blk000??.dat file on startup | |
-maxreorg=<n> | Set the Maximum reorg depth (default: 100) | |
-maxorphantx=<n> | Keep at most <n> unconnectable transactions in memory (default: 100) | |
-par=<n> | Set the number of script verification threads (-8 to 16, 0 = auto, <0 = leave that many cores free, default: 0) | |
-pid=<file> | Specify pid file (default: pivxd.pid) | |
-reindex | Rebuild block chain index from current blk000??.dat files on startup | |
-reindexaccumulators | Reindex the accumulator database on startup | |
-reindexmoneysupply | Reindex the PIV and zPIV money supply statistics on startup | |
-resync | Delete blockchain folders and resync from scratch on startup | |
-sysperms | Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality) | |
-txindex | Maintain a full transaction index, used by the getrawtransaction rpc call (default: 1) | |
-forcestart | Attempt to force blockchain corruption recovery on startup | |
Connection options: | ||
-addnode=<ip> | Add a node to connect to and attempt to keep the connection open | |
-banscore=<n> | Threshold for disconnecting misbehaving peers (default: 100) | |
-bantime=<n> | Number of seconds to keep misbehaving peers from reconnecting (default: 86400) | |
-bind=<addr> | Bind to given address and always listen on it. Use [host]:port notation for IPv6 | |
-connect=<ip> | Connect only to the specified node(s) | |
-discover | Discover own IP address (default: 1 when listening and no -externalip) | |
-dns | Allow DNS lookups for -addnode, -seednode and -connect (default: 1) | |
-dnsseed | Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect) | |
-externalip=<ip> | Specify your own public address | |
-forcednsseed | Always query for peer addresses via DNS lookup (default: 0) | |
-listen | Accept connections from outside (default: 1 if no -proxy or -connect) | |
-listenonion | Automatically create Tor hidden service (default: 1) | |
-maxconnections=<n> | Maintain at most <n> connections to peers (default: 125) | |
-maxreceivebuffer=<n> | Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) | |
-maxsendbuffer=<n> | Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) | |
-onion=<ip:port> | Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy) | |
-onlynet=<net> | Only connect to nodes in network <net> (ipv4, ipv6 or onion) | |
-permitbaremultisig | Relay non-P2SH multisig (default: 1) | |
-peerbloomfilters | Support filtering of blocks and transaction with bloom filters (default: 1) | |
-port=<port> | Listen for connections on <port> (default: 51472 or testnet: 51474) | |
-proxy=<ip:port> | Connect through SOCKS5 proxy | |
-proxyrandomize | Randomize credentials for every proxy connection. This enables Tor stream isolation (default: 1) | |
-seednode=<ip> | Connect to a node to retrieve peer addresses, and disconnect | |
-timeout=<n> | Specify connection timeout in milliseconds (minimum: 1, default: 5000) | |
-torcontrol=<ip:port> | Tor control port to use if onion listening enabled (default: 127.0.0.1:9051) | |
-torpassword=<pass> | Tor control port password (default: empty) | |
-upnp | Use UPnP to map the listening port (default: 0) | |
-whitebind=<addr> | Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 | |
-whitelist=<netmask> | Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times. Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway | |
Wallet options: | ||
-createwalletbackups=<n> | Number of automatic wallet backups (default: 10) | |
-disablewallet | Do not load the wallet and disable wallet RPC calls | |
-keypool=<n> | Set key pool size to <n></n> (default: 1000) | |
-paytxfee=<amt> | Fee (in PIV/kB) to add to transactions you send (default: 0.0001) | |
-rescan | Rescan the block chain for missing wallet transactions on startup | |
-salvagewallet | Attempt to recover private keys from a corrupt wallet.dat on startup | |
-sendfreetransactions | Send transactions as zero-fee transactions if possible (default: 0) | |
-spendzeroconfchange | Spend unconfirmed change when sending transactions (default: 0) | |
-disablesystemnotifications | Disable OS notifications for incoming transactions (default: 0) | |
-txconfirmtarget=<n> | If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: 1) | |
-maxtxfee=<amn> | Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: 1.00) | |
-upgradewallet | Upgrade wallet to latest format on startup | |
-wallet=<file> | Specify wallet file (within data directory) (default: wallet.dat) | |
-walletnotify=<cmd> | Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) | |
-windowtitle=<name> | Wallet window title | |
-zapwallettxes=<mode> | Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup (1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data) | |
ZeroMQ notification options: | ||
-zmqpubhashblock=<address> | Enable publish hash block in <address> | |
-zmqpubhashtx=<address> | Enable publish hash transaction in <address> | |
-zmqpubhashtxlock=<address> | Enable publish hash transaction (locked via SwiftX) in <address> | |
-zmqpubrawblock=<address> | Enable publish raw block in <address> | |
-zmqpubrawtx=<address> | Enable publish raw transaction in <address> | |
-zmqpubrawtxlock=<address> | Enable publish raw transaction (locked via SwiftX) in <address> | |
Debugging/Testing options: | ||
-debug=<category> | Output debugging information (default: 0, supplying <category> is optional). If <category> is not supplied, output all debugging information.<category> can be: addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, tor, mempool, net, proxy, pivx, (obfuscation, swiftx, masternode, mnpayments, mnbudget, zero), qt. | |
-gen | Generate coins (default: 0) | |
-genproclimit | Set the number of threads for coin generation if enabled (-1 = all cores, default: 1) | |
-help-debug | Show all debugging options (usage: --help -help-debug) | |
-logips | Include IP addresses in debug output (default: 0) | |
-logtimestamps | Prepend debug output with timestamp (default: 1) | |
-minrelaytxfee=<amt> | Fees (in PIV/Kb) smaller than this are considered zero fee for relaying (default: 0.0001) | |
-printtoconsole | Send trace/debug info to console instead of debug.log file (default: 0) | |
-shrinkdebugfile | Shrink debug.log file on client startup (default: 1 when no -debug) | |
-testnet | Use the test network | |
-litemode=<n> | Disable all PIVX specific functionality (Masternodes, Zerocoin, SwiftX, Budgeting) (0-1, default: 0) | |
Staking options: | ||
-staking=<n> | Enable staking functionality (0-1, default: 1) | |
-reservebalance=<amt> | Keep the specified amount available for spending at all times (default: 0) | |
Masternode options: | ||
-masternode=<n> | Enable the client to act as a masternode (0-1, default: 0) | |
-mnconf=<file> | Specify masternode configuration file (default: masternode.conf) | |
-mnconflock=<n> | Lock masternodes from masternode configuration file (default: 1) | |
-masternodeprivkey=<privkey> | Set the masternode private key | |
-masternodeaddr=<addr> | Set external address:port to get to this masternode (example: 128.127.106.235:51472) | |
-budgetvotemode=<mode> | Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto) | |
Zerocoin options: | ||
-enablezeromint=<n> | Enable automatic Zerocoin minting (0-1, default: 1) | |
-zeromintpercentage=<n> | Percentage of automatically minted Zerocoin (10-100, default: 10) | |
-preferredDenom=<n> | Preferred Denomination for automatically minted Zerocoin (1/5/10/50/100/500/1000/5000), 0 for no preference. default: 0) | |
-backupzpiv=<n> | Enable automatic wallet backups triggered after each zPiv minting (0-1, default: 1) | |
SwiftX options: | ||
-enableswifttx=<n> | Enable SwiftX, show confirmations for locked transactions (bool, default: true) | |
-swifttxdepth=<n> | Show N confirmations for a successfully locked transaction (0-9999, default: 5) | |
Node relay options: | ||
-datacarrier | Relay and mine data carrier transactions (default: 1) | |
-datacarriersize=<n> | Maximum size of data in data carrier transactions we relay and mine (default: 83) | |
Block creation options: | ||
-blockminsize=<n> | Set minimum block size in bytes (default: 0) | |
-blockmaxsize=<n> | Set maximum block size in bytes (default: 750000) | |
-blockprioritysize=<n> | Set maximum size of high-priority/low-fee transactions in bytes (default: 50000) | |
RPC server options: | ||
-server | Accept command line and JSON-RPC commands | |
-rest | Accept public REST requests (default: 0) | |
-rpcbind=<addr> | Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces) | |
-rpcuser=<user> | Username for JSON-RPC connections | |
-rpcpassword=<pw> | Password for JSON-RPC connections | |
-rpcport=<port> | Listen for JSON-RPC connections on <port></port> (default: 51473 or testnet: 51475) | |
-rpcallowip=<ip> | Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times | |
-rpcthreads=<n> | Set the number of threads to service RPC calls (default: 4) | |
-rpckeepalive | RPC support for HTTP persistent connections (default: 1) | |
UI Options: | ||
-choosedatadir | Choose data directory on startup (default: 0) | |
-lang=<lang> | Set language, for example "de_DE" (default: system locale) | |
-min | Start minimized | |
-rootcertificates=<file> | Set SSL root certificates for payment request (default: -system-) | |
-splash | Show splash screen on startup (default: 1) |
Many of the boolean options can also be set to off by specifying them with a "no" prefix: e.g. -nodnseed.
All command-line options (except for -conf) may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
The configuration file is a list of setting=value pairs, one per line, with optional comments starting with the '#' character.
An empty configuration file is automatically created on first run. By default, PIVX (or pivxd) will look for a file named 'pivx.conf' in the PIVX data directory, but both the data directory and the configuration file path may be changed using the -datadir and -conf command-line arguments.
Operating System | Default PIVX datadir | Typical path to configuration file |
---|---|---|
Windows | %APPDATA%\PIVX\ | C:\Users\username\AppData\Roaming\PIVX\pivx.conf |
Linux | $HOME/.pivx/ | /home/username/.pivx/pivx.conf |
Mac OSX | $HOME/Library/Application Support/PIVX/ | /Users/username/Library/Application Support/PIVX/pivx.conf |
Note: if running PIVX in testnet mode, the sub-folder "testnet4" will be appended to the data directory automatically.
See https://github.com/pivx-project/pivx/blob/master/contrib/debian/examples/pivx.conf for an up-to-date sample.
To configure the PIVX client to start automatically:
You might use the configuration-file, or the GUI-Settings:
Settings -> Options
then mark the checkbox titled:
[X] Start PIVX on system startup
To work with batch, you have to start the daemon (pivxd.exe). The pivxd.exe run with option "-server" will respond with GUI-messages you are not able to process its answers.