# Staking process on a VPS

{% embed url="<https://www.youtube.com/watch?v=7xZ4z480T3Q>" %}

How to stake on a VPS

In this guide, we are going to explain how to stake on a VPS server.

This guide is for advanced users and assumes that you know how to safely use an Ubuntu server.

We assume that you will run all the commands as **root** user.<br>

First, we need to connect to our server via SSH and download the wallet we want to install, from our official links on GitHub.

In this case, we have chosen KYAN.

The wallet links can be found at [<mark style="color:blue;">https://github.com/kyancoin/KYAN/releases</mark>](https://github.com/kyancoin/KYAN/releases)

We choose the Linux version and copy the link.

To download the wallet we use **wget** command.

**wget <https://github.com/kyancoin/KYAN/releases/download/v1.0.0.1/KYAN-1.0.0.1-Linux.zip>**

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FdRO3w6MzWd3qHlLkikV0%2F0?alt=media)

We now extract the archive using **unzip** command (if the command is not available you can run **apt install unzip**)\
**unzip KYAN-1.0.0.1-Linux.zip**\
\
![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FsOJx6cm8Fz8QHp9ut2FR%2F1?alt=media)<br>

Now we copy the KYAN executables in /usr/local/bin folder to make them available as system command

**cp kyanite\* /usr/local/bin/**

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FcWifr84O7uqj6rqfU4f6%2F2?alt=media)

Let’s start the KYAN daemon and encrypt the wallet.

**kyanited -daemon**

**kyanite-cli encryptwallet “YOUR-PASSWORD-HERE”**

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2Fxk5MgZ03cKXNzjETw8BZ%2F3?alt=media)

We can now create a system service to make sure our wallet will always run.\
**nano /etc/systemd/system/kyanite.service**

This command will open nano text editor where we paste the following.

\[Unit]

Description=KYAN service

After=network.target

StartLimitIntervalSec=0

\[Service]

Type=forking

Restart=always

RestartSec=10

User=root

ExecStart=/usr/local/bin/kyanited -conf=/root/.kyanite/kyanite.conf -datadir=/root/.kyanite

ExecStop=-/usr/local/bin/kyanite-cli -conf=/root/.kyanite/kyanite.conf -datadir=/root/.kyanite stop

\[Install]

WantedBy=multi-user.target<br>

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FM5kUVStjzNryinFrtT80%2F4?alt=media)

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2Fl1sSBl85Bzbdx7Cth25P%2F5?alt=media)

We can now exit nano and save (ctrl+x, y, enter).

To apply the change we run this command\
**systemctl daemon-reload**

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FpJQ074qfxlnunAgHmZV3%2F6?alt=media)

Now we need to setup the kyanite.conf file, we use nano again

**nano /root/.kyanite/kyanite.conf**<br>

Paste the following lines in it:<br>

daemon=1\
server=1\
rpcuser=kyanite\
rpcpassword=YOUR-RPC-PASS\
rpcallowip=127.0.0.1

staking=1

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FetpIW0qXxs9dIBLCl3Wn%2F7?alt=media)

Save and exit nano.<br>

The configuration is now complete and we can start the kyanite service and generate a new address.

**systemctl start kyanite.service**

**kyanite-cli getnewaddress**

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2Ffao7qTsHyU0PbljqM3ct%2F8?alt=media)

While we wait for the wallet synchronisation we can transfer our funds to the address we just generated.

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FspThrNZC3bygkdNO3Y5B%2F9?alt=media)

As the last step we need to unlock our wallet for staking.\
**kyanite-cli walletpassphrase “YOUR-PASSWORD-HERE” 99999999999999 true**

![](https://505947675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiHm486VotxVq44a_Jg%2Fuploads%2FA3s1xDga11u6K8oiBgco%2F10?alt=media)

**N.B. Coins need 600 network confirmations to start staking**

You can verify staking status using the command below

**kyanite-cli getstakingstatus**

All the fields must return “true”

It is highly recommended to delete terminal history when we enter sensitive information like wallet passwords.\
It can be done simply using **history -c** command.
