If you haven’t completed the “Initial Server Setup” guide then please do so before continuing with this guide.
- After preparing your server, you can now install SwapBlocks on your server. To complete this tutorial, you will need:
- One Ubuntu 16.04 or 17.10 server, including a sudo non-root user and a firewall configured with ssh port 22 (or the random one you created in the Secure node guide), 4111 open.
- A wallet with 25 tSPX to register your delegate and 5 tSPX for second passphrase registration.
First of all you’ll need to login into your server with the username you created when preparing the server:
Login as: YOURUSERNAME
sudo apt-get update
sudo apt-get install -y curl build-essential python git
Install Node.js (tested with version 6.9.2, but any recent LTS release should do):
sudo apt-get install -y nodejs
sudo apt-get install libpq-dev
sudo apt-get install -y npm
sudo npm install -g n
sudo n 6.9.2
Install grunt-cli and forever:
sudo npm install grunt-cli -g
sudo npm install forever -g
Install PostgreSQL (min version: 9.5.2)
sudo apt-get install -y postgresql postgresql-contribsudo -u postgres createuser -P --createdb --password $USERWhen asked, enter your db password, for example 1234, enter twice, followed by your sudo users main password.createdb test_swapblocks
Clone this repository
git clone -b testnet https://github.com/SwapBlocks/swapblocks-node.gitcd swapblocks-node
Install node modules:
npm install libpq secp256k1
Now login to the config file
sudo nano config.testnet.json
Now change the password in the config file to the db password you created above… in our example 1234. (line 14 of the config file)
If this is a forging node, scroll down to the forging section of the config file and enter your 12 word secret phrase.
See the info below on how to setup the Ark wallet for Swapblocks and how to register a delegate.
“secret”: ["word1 word2 word3 word4....word12"],
Ctrl + X, type y and press Enter to save the changes.
To launch SwapBlocks node on testnet:
npm run start:testnet
Your node will now synchronise, up to the current testnet block height.
Setting up the Wallet/Delegate
Using your Ark wallet, create a new network for SwapBlocks following the instructions below. The official SwapBlocks wallet will be released in due course.
You can download the Ark desktop wallet via this link - https://github.com/ArkEcosystem/desktop-wallet/releases
Open the Ark Wallet and click on the cog icon (settings).
Select Manage Network
In the name just type SwapBlocks
In the Seed Server field paste - http://18.104.22.168:4111
Select force and Save
It will now pull the config in. Click Save again.
Now you need to send yourself some tSBX to register your delegate.
Select Import Account - Paste this 12 word phrase in and select Import.
crystal salon theory derive dream glass onion scheme version clog destroy basket
Next you need to create a new account. Which will become your delegate account. Select Create Account.
Make a note, and keep it safe, of the 12 word passphrase. When sure, click Next. It will now ask you to type in specific words from your 12 word passphrase, complete this and Select Create.
Finally, you need to send enough tSBX to your newly created account (when sending from the main testnet wallet it will ask you for the 12 word phase, same as the one pasted above. When complete register your Delegate and add a 2nd Passphrase if you wish. (always good practice).
Originally published at medium.com on June 22, 2018.