# 2 - Installation and Configuration of Plugin Node V2.4

* 2.1 Perform a Hard Reset to Ubuntu 24.04
* 2.2 Execute Plugin Node Preparation Commands
* 2.3 Clone the Plugin V2.4 Repository and Set Permissions
* 2.4 Set Up Backup Directory and Permissions for V2.4
* 2.5 Restore Backup and Configure Plugin Node V2.4
* 2.6 Deploy Plugin Node V2.4

<mark style="color:red;">**2.1 Perform a Hard Reset to Ubuntu 24.04**</mark>

Reinstalling Ubuntu 24.04 on the Server

* Log in to the provider's management dashboard.
* Navigate to the "OS Reinstallation" or "Reinstall" menu.
* Select Ubuntu 24.04 and initiate the installation.
* Once the installation is complete, connect to the server via SSH and perform the necessary initial setup.
* #### ⚠ Caution
* Reinstalling the OS will erase all data on the server.
* Make sure to back up all necessary data before proceeding.

<mark style="color:red;">**2.2 Execute Plugin Node Preparation Commands**</mark>

Commands for Updating, Installing, Configuring, and Cleaning for Plugin Node Setup

```
sudo apt update -y && sudo apt upgrade -y && sudo apt install -y git nano ufw curl tree htop && sudo apt autoremove -y && sudo apt autoclean -y && sudo timedatectl set-timezone UTC
```

Allow permissions on below ports.

```
sudo ufw allow 6688
sudo ufw allow 6689
```

Create a new admin user account and login

```
sudo groupadd my_new_user
sudo useradd -p $(openssl passwd -6 my_new_password) my_new_user -m -s /bin/bash -g my_new_user  -G sudo
sudo -i -u my_new_user
```

<mark style="color:red;">**2.3 Clone the Plugin V2.4 Repository and Set Permissions**</mark>

```
cd && git clone https://github.com/GoPlugin/pluginV2.4Install.git
cd ~/pluginV2.4Install
chmod +x *sh
```

<mark style="color:red;">**2.4 Set Up Backup Directory and Permissions for V2.4**</mark>

Now, execute the setup script to verify the backup directory and permissions are correctly configured.

```
./_plinode_setup_bkup.sh
```

<mark style="color:red;">**2.5 Restore Backup and Configure Plugin Node V2.4**</mark>

Backup Restoration and Cleanup Steps

* Transfer and Merge Backup Data via SFTP (2.5.1)
* Update sample.vars File (2.5.2)
* Remove V2 Node Files from the Home Directory (2.5.3)

<mark style="color:red;">**2.5.1 Transfer and Merge Backup Data via SFTP**</mark>

Now that Plugin Node V2.4 is set up, the next step is to restore the previously backed-up files. This ensures that the node retains its original configurations and credentials.

Steps to Restore Backup Data (Using Turmius)

* Open Turmius and connect to your server via SFTP.
* Navigate to the local backup directory (e.g., *C:\Users\YourName\plinode\_backups*).
* Transfer the files to the */plinode\_backups/* directory on the server.
* When prompted, select "Merge" instead of "Replace" or "Skip".

Why Choose "Merge"?

* Ensures that existing files are not overwritten or deleted, and only new or modified files are added.
* Choosing "Replace" might unintentionally overwrite critical configuration files.
* Verify that all necessary files have been successfully transferred before proceeding.

The following screenshot demonstrates the "Merge" selection process in Turmius:

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeHcjoiA5fZWg4U0UzEaNpjoM7fs2klD1Rpv9cAFZAHHid3Fz3VwFFmLS6srOOPu-YQTy-mBehuGogLjFLBTQt9-A27JakJ0ctaQoKBhGQXWnjRaUCzNwymRNnVAXOEUyQiqGIoZA?key=mn_fIPfVH025DNDvRj6RUVtQ)

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXf-QOYQThRV_fOdMOKig3PCNJehyGkPgiqPH7tVmzoxWcAbOxBfmcceznVC3keRg9evOirhhqRMjnR6LwjJVcxdddS5s8PB-Y6O9MC9umYtta9UlQZHTri2fqwcI8M-bfxn9svfxw?key=mn_fIPfVH025DNDvRj6RUVtQ)

<mark style="color:red;">**2.5.2 Update sample.vars File**</mark>

To inherit the settings from the V2 Node, read the vars file of the V2 Node and update the sample.vars file accordingly.

The following items should be carried over:

* API\_EMAIL: Dashboard login user ID
* API\_PASS: Dashboard login password
* PASS\_KEYSTORE: Keystore
* DB\_PWD\_NEW: PostgreSQL DB password

```
source /plinode_backups/plinode_V2.vars && \
sed -i "/API_EMAIL=/c\API_EMAIL=\"$API_EMAIL\"" ~/pluginV2.4Install/sample.vars && \
sed -i "/API_PASS=/c\API_PASS='$API_PASS'" ~/pluginV2.4Install/sample.vars && \
sed -i "/PASS_KEYSTORE=/c\PASS_KEYSTORE='$PASS_KEYSTORE'" ~/pluginV2.4Install/sample.vars && \
sed -i "/DB_PWD_NEW=/c\DB_PWD_NEW=\"$DB_PWD_NEW\"" ~/pluginV2.4Install/sample.vars
```

Ensure the sample.vars file is updated with data from pluginv2.0 node

```
cd  ~/pluginV2.4Install
git diff sample.vars
```

<mark style="color:red;">**2.5.3 Remove V2 Node Files from the Home Directory**</mark>

Delete unnecessary files related to the V2 Node from the home directory.

`rm -rf ~/plinode_$(hostname -f)*`

<mark style="color:red;">**2.6 Deploy Plugin Node V2.4**</mark>

Mainnet:

`cd ~/pluginV2.4Install/ && ./pli_node_scripts.sh mainnet`

Apothem:

`cd ~/pluginV2.4Install/ && ./pli_node_scripts.sh apothem`

Ensure the new node address is generated

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfjF-ITHmVEP_PZqn9sJuQsLChz8J0_TO_CH0DY-SGB0RyA5KaBZSELFH9MNAocvby03NUn-vFMG9iLrR1r7hZL_Cywdw9lGmtZrMwqKnrlQBX8FPHxwARsmsTTK2dnk67JHr8NDg?key=mn_fIPfVH025DNDvRj6RUVtQ)

\
Important

Confirm the script is complete and follow the instructions to run the command below.

`source ~/.profile`

<br>
