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. You can create a new user with:
useradd -m <username>
Next, set a password for your new user.
Now substitute user into your new user and its home directory using:
su - <username>
Download the latest NIX Platform Core software release. At the time of this writing, that would be:
Unpack the file.
tar -zxvf nix-2.3.0-x86_64-linux-gnu.tar.gz
Next, make the binary files executable.
chmod +x nix-2.3.0/bin/*
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-2.3.0/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 a reward address of <your_address_for_collecting_reward_fees>. 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.
nix-cli encryptwallet <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 address to a text file named LeaseToAddress.txt:
nix-cli getnewaddress > 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!