Rent server on
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
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.
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:
Copy your address from Metamask:
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:
Push Exchange and accept transaction:
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»:
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:
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:
Restart your node:
systemctl restart bee