# Node Installation

### Hardware requirements The following requirements are recommended for running PRYZMD:

* **4 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 8GB of memory (RAM)**
* **At least 100mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install clang pkg-config libssl-dev curl git wget htop tmux build-essential jq make lz4 gcc unzip -y


# Install Go
cd $HOME
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.4.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export PRYZM_CHAIN_ID="indigo-1"" >> $HOME/.bash_profile
echo "export PRYZM_PORT="27"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
wget https://storage.googleapis.com/pryzm-zone/core/0.15.0/pryzmd-0.15.0-linux-amd64.tar.gz
tar -xzvf $HOME/pryzmd-0.15.0-linux-amd64.tar.gz
mv pryzmd $HOME/go/bin


# Config and Init App
pryzmd config node tcp://localhost:${PRYZM_PORT}657
pryzmd config keyring-backend test
pryzmd config chain-id $PRYZM_CHAIN_ID
pryzmd init $MONIKER --chain-id $PRYZM_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.pryzm/config/genesis.json https://syanodes.my.id/pryzmd/genesis.json
wget -O $HOME/.pryzm/config/addrbook.json https://syanodes.my.id/pryzmd/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="9bd9f155bb57d3ad2a8fb03e93c29da5ffd47751@[2a01:4f9:c011:a7e6::1]:23256,5d00ca94af3b6bde01f5684b81b9fd9a03fa0eeb@84.247.190.189:656,21086ec6fe14f8dc3f45886a9891ac8ec6f27da2@194.87.25.108:656,1453780780f5915db04e951458a07fec817daa11@62.171.154.213:31656,794b538577a59f789ce942fd393730da3e8c0ffe@34.65.224.175:26656,6e0ac6daac63bc2bedbad8c783b20bd3141c0556@79.133.57.214:26656,f53beda64d780fdee9da10aae7b5aa92636b10e0@207.180.210.65:41656,0e236d748212fcf9de89c8882f44e682f93475dc@159.69.193.68:36656,cdcd86ca01858275d0e78ee66b82109ee06df454@65.108.72.253:40656,2b4795eced0fe74bb866c6096731db1db10c4ec6@162.55.4.42:32656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.pryzm/config/config.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.pryzm/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.pryzm/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0upryzm\"/" $HOME/.pryzm/config/app.toml


# Config Pruning
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="19"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.pryzm/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.pryzm/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.pryzm/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.pryzm/config/app.toml


# Set Custom Port
sed -i.bak -e "s%:1317%:${PRYZM_PORT}317%g;
s%:8080%:${PRYZM_PORT}080%g;
s%:9090%:${PRYZM_PORT}090%g;
s%:9091%:${PRYZM_PORT}091%g;
s%:8545%:${PRYZM_PORT}545%g;
s%:8546%:${PRYZM_PORT}546%g;
s%:6065%:${PRYZM_PORT}065%g" $HOME/.pryzm/config/app.toml
sed -i.bak -e "s%:26658%:${PRYZM_PORT}658%g;
s%:26657%:${PRYZM_PORT}657%g;
s%:6060%:${PRYZM_PORT}060%g;
s%:26656%:${PRYZM_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${PRYZM_PORT}656\"%;
s%:26660%:${PRYZM_PORT}660%g" $HOME/.pryzm/config/config.toml

# Set Service File
sudo tee /etc/systemd/system/pryzmd.service > /dev/null <<EOF
[Unit]
Description=pryzmd-testnet
After=network-online.target

[Service]
User=$USER
ExecStart=$(which pryzmd) start --home $HOME/.pryzm
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable pryzmd
sudo systemctl start pryzmd
sudo journalctl -fu pryzmd -o cat
```
