⚒️Installation
Update packages and install useful tools.
sudo apt update && sudo apt upgrade --yes && \
sudo apt install git build-essential ufw curl jq snapd screen ncdu nano fuse ufw --yes
Install
go
usingsnap
.
sudo snap install go --classic && \
echo 'export GOPATH="$HOME/go"' >> ~/.profile && \
echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile && \
echo 'export PATH="$GOBIN:$PATH"' >> ~/.profile && \
source ~/.profile && \
go version
Build the binary from source.
git clone https://github.com/Pylons-tech/pylons
cd pylons
git checkout v1.1.4
make install
pylonsd version
Initialize your node.
pylonsd init <node_name> --chain-id=pylons-mainnet-1
Download genesis.
curl -s https://raw.githubusercontent.com/Pylons-tech/pylons/main/networks/pylons-mainnet-1/genesis.json > ~/.pylons/config/genesis.json
Add persistent peers to
config.toml
.
PEERS="[email protected]:26656,[email protected]:26666,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26666,[email protected]:26656,[email protected]:26156,[email protected]:26656,[email protected]:26606,[email protected]:26656,[email protected]:11221,[email protected]:26656,[email protected]:37656,[email protected]:26656,[email protected]:26616,[email protected]:9656,[email protected]:20256,[email protected]:26656,[email protected]:26656,[email protected]:28656,[email protected]:36656,[email protected]:46656,[email protected]:46656,[email protected]:30656,,[email protected]:21116,[email protected]:27656,[email protected]:11223,[email protected]:46656,[email protected]:26651,[email protected]:26656,[email protected]:26656,[email protected]:61356,[email protected]:12213,[email protected]:26656"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.pylons/config/config.toml
Set up pruning (optional).
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.pylons/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.pylons/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.pylons/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.pylons/config/app.toml
Create service file.
sudo tee /etc/systemd/system/pylonsd.service > /dev/null <<EOF
[Unit]
Description=Pylons Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which pylonsd) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Enable and start service.
systemctl daemon-reload
systemctl enable pylonsd
systemctl restart pylonsd
journalctl -u pylonsd -f -o cat
Last updated