5. Setup wallet

Please note this page mainly applies to stratisd setup. However the sections below regarding restoring wallets from a backup can be used in conjuction with the Stratis-qt wallet as well.

Running Stratis for the first time

Step 1) Start the Stratis daemon

Now you can start stratis by typing stratisd -daemon from any location in terminal.

When you run stratisd for the first time, you will have to set a user and password for rpcuser and rpcpassword which is a protocol used to connect and send commands to Stratis. You can do this by typing:

sh -c "echo 'rpcuser=USER\nrpcpassword=PASSWORD'" >> ~/.stratis/stratis.conf

**Change USER and PASSWORD to any of your choosing

Once you've completed the above start stratis:

stratisd -daemon.

Stratis should now start running in the background.

Step 2) Check Wallet is Running and Synced

Now that you've got your new wallet, let's check if it's running:

stratisd getinfo

Will display the following (example):

"version" : "v2.0.0.2",
"protocolversion" : 70000,
"walletversion" : 60000,
"balance" : 0.00000000,
"newmint" : 0.00000000,
"stake" : 0.00000000,
"blocks" : 234101,
"timeoffset" : 0,
"moneysupply" : 98254172.35650000,
"connections" : 5,
"proxy" : "",
"ip" : "",
"difficulty" : {
"proof-of-work" : 79.69030101,
"proof-of-stake" : 1495565.44820926
"testnet" : false,
"keypoololdest" : 1485381018,
"keypoolsize" : 101,
"paytxfee" : 0.00010000,
"mininput" : 0.00000000,
"errors" : ""

On first start Stratis will download/sync the blockchain (this may take some time). To check if you are synced compare the total "blocks" from the information output of getinfo with the block explorer's 'block height' list (the top-most block # will the the current block the chain is on)

Another way to confirm the wallet is synced type:

stratisd getblocktemplate

When synced the output will be:

error: {"code":-1,"message":"No more PoW blocks"}

Step 3) Stopping Stratis

stratisd stop will terminate Stratis

Avoid using Ctrl+C to break out if you started stratis without the -daemon flag, as this may cause corruption of the database (Stratis does some magic in the background to properly close the database on shutdown). Instead open a new terminal and type stratisd stop

Setup a new wallet

When starting Stratis for the first time, you get an auto generated unencrypted wallet.

Type stratisd encryptwallet YOUR_PASSWORD_HERE to encrypt the wallet. Choose a strong password without spaces!

Now make sure you can unlock your wallet with your password by typing stratisd walletpassphrase YOUR_PASSWORD_HERE 60

Now backup your wallet and write down your password. If you lose the wallet file or your password, your hard earned cash will be lost forever! You can use SFTP to backup /home/pi/.stratis/wallet.dat. Follow this guide to connect to the Raspberry Pi with SFTP. Host is your Raspberry Pi IP number and username is pi.

Add an existing wallet from a backup


On your pi simply zip the file with this command (The zip will be located in the same folder you ran the command):

zip -e9v wallet.zip ~/.stratis/wallet.dat

You will be prompted to set a password, be sure to write it down !

To extract it later (This will put the wallet.dat to the stratis directory!):

unzip wallet.zip -d ~/.stratis

Now to restore a backed up wallet.dat:

First, stop the Stratis wallet: stratisd stop

If you are an advanced user and know how to move files to the Raspberry Pi, replace /home/pi/.stratis/wallet.dat with your own wallet backup.

The easy, but less secure way, of getting your wallet.dat backup to your Raspberry Pi is to move it to a cloud storage service (like Dropbox) and generate a link to it which you can use to download the wallet to the Raspberry Pi. Do not do this with a unencrypted wallet! You have been warned! Furthermore, take head to the *warning* stated above as well !

If you still wish to use cloud, then generate a URL to your wallet.dat (or wallet.zip preferred) file, go to your wallet home folder (/home/pi/.stratis) and download it (**This will REPLACE your current wallet.dat**):

cd ~/.stratis
wget YOUR_DropBoxURL_HERE -O <filname>
unzip <filename>


cd ~/.stratis
wget https://www.dropbox.com/s/deadbeefdead/wallet.zip?dl=1 -O wallet.zip
unzip wallet.zip ~/.stratis

*If you are using Dropbox, make sure you change "dl=0" at the end of the URL to "dl=1".

You can now start Stratis again by typing stratisd -daemon.

**Note: If you need a list of available commands to perform various tasks with your wallet do:

stratisd help

Many of Stratis' commands are that of Bitcoin's and you can follow this guide for explanations

results matching ""

    No results matching ""