This article will assume you are using a 64 bit Linux Virtual Private Server.
Log into your VPS using a Secure Shell (ssh) client according to your providers instructions. PuTTY is a popular ssh client that is open source and available for Windows and Unix/Linux for free.
If you are logging in as root, the first thing you will want to do is create a normal user. Running services as the root user is generally considered a bad practice as it allows programs to run with full access which they don't need. You can create a new user with:
useradd -m NEW_USERNAME_HERE
The following command will allow you to choose a password for your new username:
Next, "substitute user" into your new user and its home directory using:
su - USERNAME
Download the latest NIX Platform Core software release using wget:
Unpack the file.
tar -zxvf nix-3.0.9-x86_64-linux-gnu.tar.gz
You will now need to be the root user to install the binary files. Use the substitute user command:
After entering in your root password, install the NIX binary files.
cp nix-3.0.9/bin/* /usr/bin/
You no longer need root permissions, so drop back down to your normal user with:
Now that you are back into your normal user, start the NIX daemon and put it into the background.
Now create your nix.conf file. This needs to be in the data directory, which by default is created as a hidden directory named .nix in the users home. Use the command:
For a minimal configuration, add the following lines to nix.conf:
Using the above configuration, this wallet will only stake contracts with a fee no less than 11.91% and your specified reward address(es). For more advanced configurations, see Command-line options.
Exit and save the file by using 'Ctrl + x', pressing 'y' and hitting <Enter>
Next, encrypt your wallet and choose a passphrase.
nix-cli encryptwallet YOUR_PASSPHRASE
After encryption nixd will automatically shut itself down. Restart the daemon.
Now you can generate a new address. This will be used for the "Lease To: " address field when creating a LPoS client contract. The following command will generate and store a new standard address (beginning with "N") to a text file named LeaseToAddress.txt:
nix-cli getnewaddress >> LeaseToAddress.txt
To create a "nix1" Bech32 address and add it to LeaseToAddress.txt, type:
nix-cli getnewaddress LPoS-Bech32 bech32 >> LeaseToAddress.txt
If you want to quickly view the contents of LeaseToAddress.txt, use:
Check to see that your wallet is syncd with:
.. and compare the output with the networks current block number. If it continues to read zero, chances are it needs a little help finding a peer. To manually add a node, use:
nix-cli addnode sf.nixplatform.io add
Once you've confirmed your wallet is syncd, unlock it for staking with:
nix-cli walletpassphrase YOUR_PASSPHRASE 0 true
Your VPS wallet is now ready to accept contracts and begin staking.
Finally, delete your bash history to remove your passphrase from both the history file and system memory.
history -c;history -w
You can now close your ssh connection.
To watch your debug file in real time, use:
tail -f .nix/debug.log
To stop nixd, use:
Alternatively, you can also use the following method and utilize CryptoSharks' script:
These instructions will help guide you to setting up your own cold stake on a VPS. Log into the server using ssh (Putty for windows or terminal for Mac users) and run the following commands:
wget -q https://raw.githubusercontent.com/cryptosharks131/Ghostnode/master/nix_cold_stake.shbash nix_cold_stake.shnix-cli encryptwallet "create_password_here"nix-cli getnewaddressnix-cli walletpassphrase "put_your_password_here" 0 true
Now you may go to your local wallet and create a LPoS contract with the following details. Lease To: This is the address you got from the VPS after running 'nix-cli getnewaddress' Amount: The amount to place in the contract (subtract fee button can be used to take the contract writing fee from this amount)
You can now hit 'send nix' to confirm the contract and you are all set! Once the contract gets 200 confirms, your VPS will start staking!