# Node Installation

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

* **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


# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw enable


# 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 CASCADIA_CHAIN_ID="cascadia_6102-1"" >> $HOME/.bash_profile
echo "export CASCADIA_PORT="24"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf cascadia
git clone https://github.com/cascadiafoundation/cascadia
cd cascadia
git checkout v0.1.6
make install


# Config and Init App
cascadiad config node tcp://localhost:${CASCADIA_PORT}657
cascadiad config keyring-backend test
cascadiad config chain-id $CASCADIA_CHAIN_ID
cascadiad init $MONIKER --chain-id $CASCADIA_CHAIN_ID


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


#Configure Seeds and Peers
SEEDS=""
PEERS="14b12718d09f889b79d023ef1cf64043047b3f17@89.117.49.163:26656,9e44042d58362be4899b64f9d90d9cf7503af1bb@82.208.22.201:26656,040d0b6ffefba3283b5763e26c352c7b1b232c1f@65.109.90.171:34656,19aeea9bd152faf333d74b17c3fff041fcc89de2@173.249.11.84:26656,1d61222b7b8e180aacebfd57fbd2d8ab95ebdc4c@65.109.93.152:35656,bf78149289d7095836e83fb80330a05356e5b500@91.230.110.182:26656,d5ba7a2288ed176ae2e73d9ae3c0edffec3caed5@65.21.134.202:16756,e85f72848ba9586c6704445d1118fb35e2ca5804@65.109.84.33:38656,f4242842d8ab0ba390d16b583ae97d962484e223@38.242.220.255:26656,15fd4cbbf12040dceb194e8d3a0c17d5febd69ea@38.242.243.144:26656,6452c82f6e479b764a23a5886855cdd67ba0d01b@84.46.247.94:26656,a2b41b91da1a6bb58a2dbf94daa8df088e591791@46.4.226.215:26656,5ca7c4f7b14ab5e2403f7e03e0ecda80b91f7daf@38.242.153.185:26656,7ef72cf63cb3d9acf111048f576e9a7e9c63fa8f@38.242.197.52:26656,00b2b583789421f2e157c98fb0e7e5b2a88abae2@161.97.106.246:26656,3ae7f63ee1cf8ea10a4596c4d5d46bb2074500fb@65.109.99.123:26656,8d5ba44f84fd5d94345fe52609d4d6e43344f34b@207.180.222.33:26656,a7f34f76f9a31796faf77219117112366d5e876c@65.109.236.77:26656,a5177bf3b72a946cca9e55bb834f079a565c728e@158.220.103.125:26656,f673bf30ddf117dd6064bdee79aec088ffb41856@167.235.7.34:33656,f9229b340f9a1ea2d9bfcee1622aedc03240130f@161.97.69.102:36656,2f0f98db7eb4addb2895085962c70f1fde29f80d@217.76.50.195:26656,f88ec43f46bf2e20e9ef8560c9e3e484d78fa6b5@194.163.187.112:26656,5acadb3a04bb635cf0d7ed3041ceb5a7d538047c@95.216.144.188:26656,c8d5ed2ce985364551b2bf11fe78770d5caafa62@82.208.22.200:26656,5ccd775c710730dab7bc70b1958a4022c2b0da71@185.234.69.178:26656,e25bf22448e62faca2359985303ec4557f662444@95.217.11.20:26656,096c0d1ea94f205c62c4b282f4d4ff5ae97e28de@78.27.236.220:656,21ca2712116138429aed3d72422379397c53fa86@65.109.65.248:34656,cd8db9754f4468021ee9aec018861763e29acf35@65.109.92.60:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.cascadiad/config/config.toml
sed -i 's/minimum-gas-prices =.*/minimum-gas-prices = "0.025aCC"/g' $HOME/.cascadiad/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.cascadiad/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.cascadiad/config/config.toml


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


# Set Custom Port
sed -i.bak -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CASCADIA_PORT}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CASCADIA_PORT}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CASCADIA_PORT}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CASCADIA_PORT}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CASCADIA_PORT}660\"%" $HOME/.cascadiad/config/config.toml
sed -i.bak -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CASCADIA_PORT}317\"%; s%^address = \":8080\"%address = \":${CASCADIA_PORT}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CASCADIA_PORT}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${CASCADIA_PORT}091\"%" $HOME/.cascadiad/config/app.toml


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

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

[Install]
WantedBy=multi-user.target
EOF


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