NodersUA Team
  • Intoduction
    • About NodersUA
    • Supported Networks
    • Our Comunity
  • Testnet
    • Gensyn
    • LayerEdge
    • Pipe
    • Multiple
    • Privasea
    • OpenLedger
    • Nexus
    • Cysic
    • Titan
      • Installation (Validator Node)
      • Update (Validator Node)
      • Installation (L1 Node Operation Tutorial)
      • Useful Commands
      • Delete
    • Hemi
      • Install
      • Update
    • Gaia
    • Rivalz
      • Install
      • Update
    • Allora
      • Install
      • Update
    • 0G Network
      • Installation (Validator Node)
      • Update (Validator Node)
      • Installation (Storage Node And DA Services)
      • Useful Commands
      • Delete
    • Shardeum
      • Installation
      • Update
      • Useful Commands
  • Mainnet
    • Forta
      • Installation
    • Gitopia
      • Installation
      • Update
      • Useful Commands
  • Archive
    • Midnight
      • Install
      • New Install
    • ICN
    • Cat Protcol
    • Morphl2
    • Elixir
      • Update to mainnet
    • Subspace / Gemini-3h (Advanced CLI)
      • Installation
      • Operators guide
      • Update
      • Useful commands
      • Delete
    • Dill
    • Aleo
      • Install
    • Union
      • Install
    • Analog
      • Install
    • Babylon
      • Installation
      • Useful Commands
      • Delete
    • Penumbra
      • Installation
      • Update
      • Useful Commands
      • Delete
    • Fleek (Lightning)
      • Installation
      • Update
      • Useful Commands
    • Farcastr
      • Install
    • 5ire
      • Installation
      • Useful Commands
    • Andromeda
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • Avail
      • Installation (Validator)
      • Update (Validator)
      • Installation (Light node)
      • Update (Light node)
      • Useful Commands
      • Delete
    • Bundlr
      • Installation
      • Useful Commands
    • Cascadia
      • Installation
      • Update
      • Useful Commands
    • Composible
      • Installation
      • Useful Commands
    • DeFund
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful Commands
      • Delete
    • Dymension
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • EmpowerChain
      • Installation
      • Update
      • Useful Commands
      • Task
    • Fleek (Ursa)
      • Installation
      • Update
      • Delete
      • Useful Commands
    • Gear
      • Installation
      • Update
      • Useful Commands
      • Remove
    • Gitopia
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful Commands
    • Holograph
      • Installation
      • Useful Commands
      • Delete
    • Iron Fish
      • Installation
      • Wallet
      • Update
      • Useful Commands
    • Lava
      • Installation (Lava-testnet)
      • Installation (Axelar-testnet+mainnet)
      • Provider
      • Useful Commands
    • Lava Network
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful commands
    • Masa
      • Installation
      • Update
      • Delete
    • Namada
      • Installation
      • Update
      • Delete
    • Nibiru
      • Installation
      • Update
      • SnapShot/StateSync/AddrBook
      • Smart Contract Tasks
      • Useful Commands
    • Nolus
      • Installation
      • Update
      • SnapShot/StateSync/AddrBook
      • Useful Commands
    • OJO
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • Realio
      • Installation
      • Update
      • StateSync/Snapshot/AddrBook
      • Useful Commands
      • Delete
    • SAO
      • Installation
      • Update
      • Snapshot/StateSync/AddrBook
      • Useful Commands
    • StarkNet
      • Installation
      • Update
      • Useful Commands
    • Streamr
      • Installation
    • Subspace / Gemini-3f (Pulsar)
      • Installation
      • Update
      • Useful commands
      • Delete
    • Taiko
      • Installation
      • Update
      • Enable an SGX prover
      • Delete
    • Tangle
      • Installation
      • Useful Commands
      • Delete
    • Sui (Devnet)
      • Installation (Linux)
      • Installation (Docker)
      • Update (Linux)
      • Useful commands
      • Delete (Linux)
      • Delete (Docker)
      • Wallets
    • Sui (Tesnet)
      • Installation (Linux)
      • Useful commands
      • Update (Linux)
      • Delete (Linux)
    • Story
    • Nubit
      • Install (Light Node)
      • Install (Validator Node)
      • Update (Light Node)
    • Waku
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Archive
  2. Union

Install

Setting up a Union node

# Set the variables

# Come up with the name of your node and replace it instead <your_moniker>
MONIKER=<your_moniker>

echo 'export MONIKER='$MONIKER >> $HOME/.bash_profile
echo "export UNION_PORT=48" >> $HOME/.bash_profile
echo "export UNION_CHAIN_ID=union-testnet-8" >> $HOME/.bash_profile
source $HOME/.bash_profile
# check whether the last command was executed
# Install Docker
if ! [ -x "$(command -v docker)" ]; then
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
sudo usermod -aG docker $USER
docker --version
else
echo $(docker --version)
fi
UNIOND_VERSION=v0.23.0
docker pull ghcr.io/unionlabs/uniond-release:$UNIOND_VERSION
mkdir ~/.union
docker run \
  --user $(id -u):$(id -g) \
  --volume ~/.union:/.union \
  --volume /tmp:/tmp \
  -it ghcr.io/unionlabs/uniond-release:$UNIOND_VERSION init $MONIKER \
  --home /.union
alias uniond='docker run -v ~/.union:/.union -v /tmp:/tmp --network host -it ghcr.io/unionlabs/uniond-release:$UNIOND_VERSION --home /.union'
cd $HOME
wget -O uniond https://snapshots.nodes.guru/union/uniond
sudo chmod +x uniond
sudo mv ./uniond /usr/local/bin/
#uniond init $MONIKER --chain-id $UNION_CHAIN_ID
seeds="c2bf0d5b2ad3a1df0f4e9cc32debffa239c0af90@testnet.seed.poisonphang.com:26656"
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" ~/.union/config/config.toml

Change ports (Optional)

# Customize if you need
EXTERNAL_IP=$(wget -qO- eth0.me) \
RPC_PORT=${UNION_PORT}657 \
PROXY_APP_PORT=${UNION_PORT}658 \
P2P_PORT=${UNION_PORT}656 \
PPROF_PORT=60${UNION_PORT} \
API_PORT=13${UNION_PORT} \
GRPC_PORT=9${UNION_PORT}0 \
GRPC_WEB_PORT=9${UNION_PORT}1
sed -i \
    -e "s/\(proxy_app = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$PROXY_APP_PORT\"/" \
    -e "s/\(laddr = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$RPC_PORT\"/" \
    -e "s/\(pprof_laddr = \"\)\([^:]*\):\([0-9]*\).*/\1localhost:$PPROF_PORT\"/" \
    -e "/\[p2p\]/,/^\[/{s/\(laddr = \"tcp:\/\/\)\([^:]*\):\([0-9]*\).*/\1\2:$P2P_PORT\"/}" \
    -e "/\[p2p\]/,/^\[/{s/\(external_address = \"\)\([^:]*\):\([0-9]*\).*/\1${EXTERNAL_IP}:$P2P_PORT\"/; t; s/\(external_address = \"\).*/\1${EXTERNAL_IP}:$P2P_PORT\"/}" \
    $HOME/.union/config/config.toml

sed -i \
    -e "/\[api\]/,/^\[/{s/\(address = \"tcp:\/\/\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$API_PORT\4/}" \
    -e "/\[grpc\]/,/^\[/{s/\(address = \"\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$GRPC_PORT\4/}" \
    -e "/\[grpc-web\]/,/^\[/{s/\(address = \"\)\([^:]*\):\([0-9]*\)\(\".*\)/\1\2:$GRPC_WEB_PORT\4/}" \
    $HOME/.union/config/app.toml
    
#uniond config node tcp://127.0.0.1:${UNION_PORT}657
curl "https://snapshots.nodes.guru/union/genesis.json" > ~/.union/config/genesis.json
// Some code# Set the minimum price for gas
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0muno\"/" ~/.union/config/app.toml

# Set up filter for "bad" peers
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.union/config/config.toml

# Set up pruning
pruning="default"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.union/config/app.toml
# Create service file (One command)
sudo tee /etc/systemd/system/uniond.service > /dev/null <<EOF
[Unit]
Description=Union Node
After=network.target
 
[Service]
Type=simple
User=$USER
WorkingDirectory=$HOME/.union
ExecStart=$(which uniond) start --home $HOME/.union
Restart=on-failure
StartLimitInterval=0
RestartSec=3
LimitNOFILE=65535
LimitMEMLOCK=209715200
 
[Install]
WantedBy=multi-user.target
EOF
# Start the node
systemctl daemon-reload
systemctl enable uniond
systemctl restart uniond && journalctl -u uniond -f -o cat

# Escape from logs ctrl+c

Wallet

# Create wallet
uniond keys add wallet --keyring-backend test --home ~/.union/

The wallet has been created. In the last line there will be a phrase that must be written down

# If the wallet was already there, restore it
uniond keys add wallet --recover --keyring-backend test --home ~/.union/
# Insert the seed phrase from your wallet
# If everything is correct, you will see your wallet data
uniond q bank balances $(uniond keys show wallet -a --keyring-backend test --home $HOME/.union) --node https://rpc-1.testnet.union.nodes.guru:443

# Check your EVM Address
echo "0x$(0gchaind debug addr $(0gchaind keys show wallet -a) | grep hex | awk '{print $3}')"
# Save the wallet address
OG_ADDRESS=$(0gchaind keys show wallet -a)
OG_VALOPER=$(0gchaind keys show wallet --bech val -a)
echo "export OG_ADDRESS="${OG_ADDRESS} >> $HOME/.bash_profile
echo "export OG_VALOPER="${OG_VALOPER} >> $HOME/.bash_profile
source $HOME/.bash_profile
# Check the ballance
0gchaind query bank balances $(0gchaind keys show wallet -a)

PreviousUnionNextAnalog

Last updated 10 months ago

Was this helpful?

Go to the and request tokens to your evm address

faucet