Setting up a (QT) Stratis Node for RPC
This article will show you how to install the old Stratis wallet (“QT”) and how to configure it to function as an API for other programs to access it.
Download and run the Stratis QT wallet
- Download Stratis-QT wallet (version on Windows or Mac)
- Unzip downloaded file
- Run stratis-qt.exe in your directory (give permission for your Windows firewall if it is neceessary). Your qt-wallet should look like this:
Modify the stratis.conf file to enable the RPC server
Make sure that your wallet is closed
Search for the folder: %APPDATA% (path to directory stratis for windows: C:\Users\YOUR_USERNAME\AppData\Roaming\Stratis)
Search for the folder: ~/Library/Application Support/stratis/
- Open your notepad or other program to editing (I recommend Notepad++)
- Your set data to file according of pattern like this:
# RPC Settings # Activate RPC Server (default: 0) server = 1 # Where the RPC Server connects (default: 127.0.0.1 and ::1) rpcconnect = 127.0.0.1 # Ip address allowed to connect to RPC (default all: 0.0.0.0 and ::) rpcallowedip = 127.0.0.1 rpcuser = name_of_your_user rpcpassword = name_of_your_password
- Save the file as stratis.conf (make sure you have file with .conf extension like on image below):
You can also put “ quotes around the filename to make sure it doesn’t save as “stratis.conf.txt”, which is a possibility in Windows notepad.
Sync the blockchain
- Run Stratis-QT wallet
First of all you should see synchronized blockchain network:
Which means your wallet download blockchain blocks. Synchronizing of blockchain may go couple hours! You must be patient :)
Test the RPC connection
When the synchronization of Stratis-QT is finished you should see the following in blue square:
Which means Stratis-QT wallet is no longer downloading blocks and is up to date at the current block.
The RPC connection should be set up. You can test that it is working by running some code that relies on the RPC