NG
Swarm

Swarm

Setup Guide

Some hosting providers (like Webtropia) detect Swarm as miner software, so be aware of that when you choose your hosting provider. If you want continue use Webtropia – choose VDS/Dedicated servers.

1. Installing

First of all we need to download installing script. To do it enter the following:
If OS is Ubuntu:

wget https://github.com/grodstrike/bee-swarm/raw/main/install.sh

If OS is CentOS:

wget https://github.com/grodstrike/bee-swarm/raw/main/install-centos.sh

Swarm-0

Now let’s set access rights for script:

chmod +x install.sh
sudo su
./install.sh

Copy and paste all three line in one time, after execution you have to write your password.
Swarm-1

Attention. You couldn’t change the password, so make backup file /root/bee-pass.txt
Check node status:
systemctl status bee

Should be “active (running)”.

2. Get tokens

Now we should request bzz tokens from faucet. To do this we need to know our node eth address:

cat ~/.bee/keys/swarm.key | jq .address | sed -e 's/^"//' -e 's/"$//' | awk '{print "0x"$1}'

Next we should download metamask and choose goerli testnet:
Swarm-2

Copy your address from Metamask:
Swarm-3

Now we should get gETH (goerli ETH) from faucet. To do it go into goerli or goerli social faucet and request some gETH to the metamask and node address.

Next step – request gBZZ from swarm faucet. To get the faucet link enter the following command:

cat ~/.bee/keys/swarm.key | jq .address | sed -e 's/^"//' -e 's/"$//' | awk '{print "https://bzz.ethswarm.org/?transaction=buy&amount=10&slippage=30&receiver=0x"$1}'

Push Connect to wallet -> Metamask:
Swarm-4

Push GET G-ETH:
Swarm-5

Push Exchange and accept transaction:

Swarm-6

Wait until tokens come and then you could launch your node.

3. Additional commands

For node restarting:

systemctl restart bee

Check peers:

curl -s http://localhost:1635/peers | jq '.peers | length'

For node stopping:

systemctl stop bee

Command for autoexec node:

systemctl enable bee

Command for start node’s service:

systemctl start bee

Node’s status check:

systemctl status bee

For launch noda without password you have to write your password in the config «password»:
Swarm-7

4. Replacing Goerli endpoint

If you face difficulties starting the node, its recommended to change your Goerli endpoint.
Sign up at infura.io, enter Ethereum section on the left -> click CREATE NEW PROJECT on the right -> enter your (any) name in NAME field -> CREATE. Find dropdown (Mainnet) and select Goerli Testnet. Copy https:// address by clicking button to the right and then click SAVE CHANGES on top:
Swarm-8
Next we need to change your endpoint address in bee swarm config:

apt install vim
vim ~/bee-default.yaml

This will open your config in text editor. Use your arrow keys to navigate to line 28 – the one with https:/ address.
Press keyboard key INSERT (or just i) (you will know you entered editing mode by text-message -- INSERT -- in bottom left corner), delete old address, paste new one from buffer, press keyboard key ESC (-- INSERT -- will be gone), type in :wq!, press ENTER:
Swarm-9
Restart your node:

systemctl restart bee
Stuck? Ask!

By continuing to use our website, you consent to our use of cookies in accordance with our cookie policy