1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Upgrading from Plugin Node V2 to V2.4 while Keeping the Same Node Address

Last updated at Posted at 2025-04-10

Introduction

This guide explains how to upgrade Plugin Node from version 2.0 to 2.4 while migrating from Ubuntu 20.04 to 24.04 and maintaining the same node address. Typically, after a hard reset and installation, a new node address is assigned. However, retaining the existing node address offers several benefits:

  • No need to transfer or withdraw funds
  • Continued use of deposited XDC and PLI
  • Smooth understanding and application of Plugin 2.4’s new features

Migrating to Ubuntu 24.04 is a crucial step for future support and security. For node operators, this method reduces operational burden and ensures a more efficient upgrade process.

【日本語】

このガイドでは、Ubuntu 20.04から24.04へ移行しながら同じノードアドレスを維持したまま、Plugin Nodeを2.0から2.4へハードリセットを行いアップグレードする方法を説明します。通常、ハードリセット後のインストールでは新しいノードアドレスが割り当てられますが、既存のノードアドレスを保持することで、以下のメリットがあります。

  • 資金の移動や引き出し手続きが不要
  • デポジット済みのXDCとPLIをそのまま利用可能
  • Plugin 2.4の新機能をスムーズに理解・適用できる

Ubuntu 24.04への移行は、今後のサポートやセキュリティを考慮すると重要なステップです。ノードオペレーターにとって、この方法は負担を軽減し、効率的なアップグレードを可能にする有益な選択肢となります。

1. Processing on V2 nodes

On Plugin Node 2.0, we perform the following five steps:

Pluginノード2.0上で、以下の5つの手順を実行します:

  1. Node Address Keystore File Output
  2. Setup Backup Directory and Permissions for Plugin Node V2.0
  3. Store the necessary files in the backup directory
  4. Use SFTP or similar methods to back up locally
【日本語】
  1. ノードアドレスのキーストアファイルを出力
  2. Plugin Node V2.0用のバックアップディレクトリの作成と権限の初期設定
  3. バックアップディレクトリに必要なファイルを保存
  4. SFTP等を使ってローカルにバックアップ

The V2 node address has a deposit of 1 XDC and 1 PLI.

V2ノードアドレスには、1 XDCと1 PLIが入金されています。

Screenshot by Dropbox Capture.png

1-1. Node Address Keystore File Output

ノードアドレスのキーストアファイルを出力

The command outputs the node address keystore file to the home directory.

ノードアドレスのキーストアファイルをホームディレクトリに出力します。

1-1
cd ~/pluginV2Install/ && ./pli_node_scripts.sh keys

1-2. Initializing Backup Directory and Permissions Setup

バックアップディレクトリの作成と権限の初期設定

Let's now run the setup script to ensure that the backup directory & permissions are in place.

バックアップフォルダと権限が整っていることを確認するために、セットアップスクリプトを実行しましょう。

1-2
./_plinode_setup_bkup.sh

1-3. Store the necessary files in the backup directory

バックアップディレクトリに必要なファイルを保存

Perform Full Backup Before Upgrading to Plugin Node 2.0

Before upgrading to Plugin Node 2.4, it is recommended to perform a full backup in Plugin Node 2.0 (using commands 1-3-1). Additionally, create a directory named originals/pluginV2 within the /plinode_backups/ directory and copy the relevant files from Plugin Node 2.0 (using commands 1-3-2).

【日本語】

Plugin Node 2.4にアップグレードする前に、2.0でフルバックアップを実行し(コマンド1-3-1)、さらに/plinode_backups/ディレクトリ内にoriginals/pluginV2ディレクトリを作成し、Plugin Node 2.0の関連するファイルをコピー(コマンド1-3-2)しておくことをお勧めします。

1-3-1
cd ~/pluginV2Install/ && ./_plinode_backup.sh -full
1-3-2
mkdir -p /plinode_backups/originals/pluginV2 && \
cd ~/pluginV2/ && cp -u ~/pluginV2/apicredentials.txt config.toml secrets.toml /plinode_backups/originals/pluginV2/ && \
cd ~ && cp -u ~/plinode_$(hostname -f).vars plinode_$(hostname -f)_keys*.json /plinode_backups/originals/pluginV2/ && \
tree -a /plinode_backups/

Important Files Copying

After obtaining this backup, perform a hard reset to Ubuntu 24.04. Then, use the saved data during the setup of Plugin Node 2.4. Please execute the following commands.

このバックアップを取得した後、Ubuntu 24.04へのハードリセットを行い、その後のPlugin Node 2.4のセットアップ時に、保存したデータを使用します。次に示すコマンドを実行してください。

1-3-3
cp ~/plinode_$(hostname -f).vars /plinode_backups/plinode_V2.vars
cp $(ls -t ~/plinode_$(hostname -f)_keys_* | head -n 1) /plinode_backups/plinode_V2_keys.json
grep "Keystore\s*=" ~/pluginV2/secrets.toml | sed "s/.*Keystore\s*=\s*'//;s/'$//" > /plinode_backups/.env.password
tree -a /plinode_backups/

The files to be copied are as follows.

  1. Node configuration file
  2. json file where Node Address information is defined
  3. Keystore file required when importing Node Address
【日本語】

コピーするファイルは下記のとおりです。

  1. Nodeの設定ファイル
  2. Node Address情報が定義されているjsonファイル
  3. Node Addressインポート時に必要となるkeystoreファイル

1-4. Use SFTP or similar methods to back up locally

SFTP等を使ってローカルにバックアップ

To ensure a safe upgrade, back up all necessary files from your server to your local machine. This step will help restore the Plugin Node settings after migrating to Ubuntu 24.04.

Using an SFTP Client (Turmius Example)
One convenient way to transfer files is by using an SFTP client like Turmius. This tool allows for easy file transfers between your server and local machine via an intuitive GUI.

How to use Turmius for backup:

  1. Open Turmius and connect to your server via SFTP.
  2. Navigate to the /plinode_backups/ directory on the server.
  3. Select the backup files you want to save and download them to a local directory (e.g., C:\Users\YourName\plinode_backups).
  4. Verify that all files are successfully downloaded before proceeding.

Alternative SFTP clients:

【日本語】

安全にアップグレードを行うため、サーバー上の必要なファイルをローカルPCにバックアップ しておきます。この手順を実行することで、Ubuntu 24.04への移行後に、Plugin Node の設定を復元することができます。

SFTPクライアントを使用する(Turmiusの例)
サーバーとローカルPCの間でファイルを転送する方法として、SFTPクライアント(Turmius など) を使用するのが便利です。GUIを備えたツールで、ファイルを簡単に管理できます。

Turmiusを使ったバックアップ手順:

  1. Turmiusを開き、SFTPでサーバーに接続します。
  2. サーバーの /plinode_backups/ ディレクトリに移動します。
  3. バックアップしたいファイルを選択し、ローカルPCのディレクトリ(例: C:\Users\YourName\plinode_backups\)へダウンロードします。
  4. すべてのファイルが正常に保存されたことを確認してください。

代替のSFTPクライアント:

The following screenshot demonstrates the backup process using Turmius:
以下のスクリーンショットは、Turmiusを使用したバックアッププロセスを示しています。
Screenshot by Dropbox Capture.png

2. Setting Up Plugin Node V2.4

Plugin Node V2.4のセットアップ

Upgrade to V2.4 Node.

  1. Perform a hard reset to Ubuntu 24.04
  2. Plugin Node Preparation Commands
  3. Clone PluginV2.4 Repository and Set Permissions
  4. Setup Backup Directory and Permissions for V2.4
  5. Restore Backup and Configure Plugin Node V2.4
  6. Deploy Plugin Node V2.4
【日本語】

V2.4ノードへのアップグレード

  1. Ubuntu 24.04へのハードリセットを実施
  2. Pluginノードの準備コマンドを実行
  3. PluginV2.4のリポジトリをクローンし、権限を設定
  4. V2.4用バックアップディレクトリと権限の設定
  5. バックアップの復元とPlugin Node V2.4の設定
  6. Plugin Node V2.4のデプロイ

2-1. Perform a hard reset to Ubuntu 24.04

Ubuntu 24.04へのハードリセットを実施

Hard Reset Procedure for Ubuntu 24.04 (VPS/Dedicated Server)

  1. Log in to the provider's management dashboard.
  2. Open the "OS Reinstallation" or "Reinstall" menu.
  3. Select Ubuntu 24.04 and start the installation.
  4. 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.
  • Ensure you have backed up all necessary data before proceeding.
【日本語】

Ubuntu 24.04へのハードリセット手順(VPS/専用サーバー)

  1. プロバイダーの管理画面(ダッシュボード)にログイン
  2. 「OS再インストール」または「リインストール」のメニューを開く
  3. Ubuntu 24.04を選択し、インストールを開始
  4. インストール完了後、SSHでサーバーに接続し、必要な初期設定を行う

⚠ 注意

  • OSを再インストールすると、サーバー内のデータはすべて削除されます。
  • バックアップを取得した上で実行してください。

2-2. Plugin Node Preparation Commands

Pluginノードの準備コマンドを実行

Commands for updating Linux systems, installing tools, configuring security, and cleaning for plugin node setup.

プラグインノード用のLinuxシステム更新、ツールインストール、セキュリティ設定、クリーニングのコマンド群

2-2-1
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

Create a new admin user account

新しい管理者ユーザーアカウントを作成します

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

In this guide, you will set up as follows:

このガイドでは、次のように設定を行います。

  • Username : Doraemon
  • Password : Nobita10Shizuka
2-2-3
sudo groupadd Doraemon
sudo useradd -p $(openssl passwd -6 Nobita10Shizuka) Doraemon -m -s /bin/bash -g Doraemon -G sudo

Now open a new terminal session to your VPS and logon with your new admin user account and complete the rest of the steps.

新しいターミナルセッションを開いてVPSに接続し、先ほど作成した管理者ユーザーアカウントでログインして、残りの手順を完了させてください。

2-3. Clone PluginV2.4 Repository and Set Permissions

PluginV2.4のリポジトリをクローンし、権限を設定

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

2-4. Initializing Backup Directory and Permissions Setup for Plugin Node V2.4

Plugin Node V2.4用のバックアップディレクトリの作成と権限の初期設定

Let's now run the setup script to ensure that the backup directory & permissions are in place;

セットアップスクリプトを実行して、バックアップディレクトリとアクセス許可が適切であることを確認します。

2-4
./_plinode_setup_bkup.sh 

2-5. Restore Backup and Configure Plugin Node V2.4

バックアップの復元とPlugin Node V2.4の設定

2-5-1. Transfer Backup Data via SFTP and Merge

SFTPでバックアップデータを転送し、統合

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

Steps to Restore Backup Data (Using Turmius)

  1. Open Turmius and connect to your server via SFTP.

  2. Navigate to the local backup directory (e.g., C:\Users\YourName\plinode_backups).

  3. Transfer the files to the /plinode_backups/ directory on the server.

  4. When prompted, select "Merge" instead of "Replace" or "Skip."

    Why choose Merge?

    • This 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.
  5. Verify that all necessary files have been successfully transferred before proceeding.

【日本語】 Plugin Node V2.4のセットアップが完了したら、以前バックアップしたデータを復元 する必要があります。この作業により、ノードが元の設定や認証情報を保持したまま動作するようになります。

バックアップデータの復元手順(Turmiusを使用)

  1. Turmiusを開き、SFTPでサーバーに接続します。

  2. ローカルのバックアップディレクトリ(例: C:\Users\YourName\plinode_backups\)へ移動します。

  3. サーバーの /plinode_backups/ ディレクトリにファイルを転送します。

  4. 上書きの確認画面が表示されたら、「Merge(統合)」を選択してください。

    なぜ「Merge」を選択するのか?

    • 既存のファイルを削除せず、新しいファイルや変更されたファイルのみを追加できるため。
    • 「Replace(上書き)」を選択すると、重要な設定ファイルが上書きされてしまう 可能性があるため注意。
  5. すべての必要なファイルが正常に転送されたことを確認してください。

The following screenshot demonstrates the "Merge" selection process in Turmius:
以下のスクリーンショットは、「Merge(統合)」を選択するプロセスを示しています。
Screenshot by Dropbox Capture.png

Screenshot by Dropbox Capture.png

2-5-2. Update sample.vars

sample.vars を更新

In order to inherit the settings of V2 Node, read the vars file of V2 Node and edit sample.vars.

V2 Nodeの設定を引き継ぐために、V2 Nodeのvarsファイルを読み込んでsample.varsを編集します。

The items to be carried over are as follows.

  1. API_EMAIL : Dashboard login user ID
  2. API_PASS : Dashboard login password
  3. PASS_KEYSTORE : keystore
  4. DB_PWD_NEW : PostgreSQL DB password
【日本語】

引き継ぐ項目は下記のとおりです。

  1. API_EMAIL : ダッシュボードのログインユーザID
  2. API_PASS : ダッシュボードのログインパスワード
  3. PASS_KEYSTORE : キーストア
  4. DB_PWD_NEW : PostgreSQL DBのパスワード
2-5-2
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

Use the following command to check if the V2 node’s vars configuration is loaded in sample.vars.

次のコマンドを使って、sample.vars に V2ノードの vars 設定が反映されているかを確認します。

2-5-3
cd ~/pluginV2.4Install && \
git diff sample.vars

The following is an example.
一例
CS 20250416_08.54.36@2x.png

2-5-3. Delete V2 Node files from Home Directory

ホームディレクトリからV2ノードの不要なファイルを削除

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

ホームディレクトリからV2ノードの不要なファイルを削除します。

2-5-4
rm -rf ~/plinode_$(hostname -f)*

2-6. Deploy Plugin Node V2.4

2-6-1 Mainnet
cd ~/pluginV2.4Install/ && ./pli_node_scripts.sh mainnet
2-6-2 Apothem
cd ~/pluginV2.4Install/ && ./pli_node_scripts.sh apothem

Screenshot by Dropbox Capture.png

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

重要
スクリプトが完了していることを確認して、指示に従って下記コマンドを実行してください。

2-6-3
source ~/.profile

3. V2 Node Address Import into V2.4

V2ノードアドレスをV2.4にインポート

Import the V2 node address into V2.4.

  1. Importing V2 node addresses
  2. Remove Unnecessary Node Address from V2.4
  3. Restart Plugin Node Process with PM2
  4. Logging into the Dashboard
  5. Output Imported Node Address Keystore File
【日本語】 V2ノードアドレスをV2.4にインポートします。
  1. V2ノードアドレスのインポート
  2. 不要なノードアドレスを削除
  3. PM2を使用してPluginノードプロセスを再起動
  4. ダッシュボードにログイン
  5. インポートしたノードアドレスのキーストアファイルを出力

3-1. Importing V2 node addresses

V2ノードアドレスのインポート

Using the JSON file (keystore) outputted by command 1-3-3, import the V2 node address into V2.4.

コマンド1-3-3で出力したJSONファイル(キーストア)を使用して、V2ノードアドレスをV2.4にインポートします。

3-1-2 Mainnet
cd ~/pluginv3.0/
plugin admin login -f ~/pluginv3.0/apicredentials.txt
plugin keys eth import /plinode_backups/plinode_V2_keys.json --evmChainID 50 --oldpassword /plinode_backups/.env.password
3-1-2 Apothem
cd ~/pluginv3.0/
plugin admin login -f ~/pluginv3.0/apicredentials.txt
plugin keys eth import /plinode_backups/plinode_V2_keys.json --evmChainID 51 --oldpassword /plinode_backups/.env.password

Screenshot by Dropbox Capture.png

3-2. Remove Unnecessary Node Address from V2.4

不要なノードアドレスを削除

Let's start by displaying a list of node addresses, and then we'll proceed to delete the new node address created during the unnecessary V3 setup.

まず、ノードアドレスのリストを表示し、その後、不要なV3セットアップ中に作成された新しいノードアドレスを削除します。

3-2-1
plugin keys eth list

Screenshot by Dropbox Capture.png

Next, let's delete the new node address created during the V2.4 setup (with a token value of 0).

次に、V2.4のセットアップ中に作成された新しいノードアドレス(トークンの値が0になっています)を削除します。

3-2-2
plugin keys eth delete TARGET_FOR_DELETEION_ADDRESS

Please enter yes in response to the prompt. It would be a good idea to run plugin keys eth list again for confirmation.

プロンプトには**yes**と入力してください。確認のために、もう一度plugin keys eth listを実行するとよいでしょう。

Screenshot by Dropbox Capture.png

3-3. Restart Plugin Node Process with PM2

PM2を使用してPluginノードプロセスを再起動

Restart the process and confirm that the address inherited from V2 Node is displayed on the dashboard.

プロセスをリスタートしてダッシュボードにV2 Nodeから引き継いだアドレスが表示されていることを確認します。

3-3
pm2 restart all

3-4. Logging into the Dashboard

ダッシュボードにログイン

Finally, log in to the dashboard.

最後にダッシュボードへログインします。

3-4
echo https://$(ip a | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v '127.0.0.1'):6689 && cat ~/pluginv3.0/apicredentials.txt 

Screenshot by Dropbox Capture.png

The upgrade of the plugin node is now complete.

以上でプラグインノードのアップグレードは完了です。

3-5. Output Imported Node Address Keystore File

インポートしたノードアドレスのキーストアファイルを出力

ホームディレクトリのjsonを削除し、インポートしたノードアドレスのjsonファイルを出力します

3-5
rm -f ~/plinode_$(hostname -f)_keys* && \
cd ~/pluginV2.4Install/ && ./pli_node_scripts.sh keys

4. Backup After Plugin V2.4 Upgrade

Plugin V2.4アップグレード後のバックアップ

Once you have confirmed the successful import of the V2 node address into the dashboard, it is recommended to perform a backup.

V2ノードアドレスがダッシュボードに正常にインポートされたことを確認したら、バックアップを実行することをおすすめします。

  1. Full Backup
  2. Organize Backup Files for Plugin Node V2.4
  3. Transferring the Backup Directory to Your Local PC
【日本語】
  1. フルバックアップの実行
  2. Plugin Node V2.4用のバックアップファイルを整理
  3. バックアップディレクトリをローカルPCに転送

4-1. Full Backup

フルバックアップの実行

Run the following commands to perform a FULL backup. As per the usage above this backups up both the conf files & the db.

以下のコマンドを実行して、完全なバックアップを実行してください。上記の使用法に従い、設定ファイルとデータベースの両方をバックアップします。

4-1
cd ~/pluginV2.4Install/ && ./_plinode_backup.sh -full

Screenshot by Dropbox Capture.png

4-2. Organize Backup Files for Plugin Node V2.4

Plugin Node V2.4用のバックアップファイルを整理

After a successful upgrade to Plugin Node 2.4, create a directory named originals/pluginV2.4 within the /plinode_backups/ directory and copy the relevant files from that moment into it.

Plugin Node 2.4のアップグレードが成功した場合、/plinode_backups/ディレクトリ内にoriginals/pluginV3ディレクトリを作成し、その時点で関連するファイルをコピーしてください。

4-2
mkdir -p /plinode_backups/originals/pluginV2.4 && \
cd ~/pluginv3.0/ && cp -u ~/pluginv3.0/apicredentials.txt config.toml secrets.toml /plinode_backups/originals/pluginV2.4/ && \
cd ~ && cp -u ~/plinode_$(hostname -f).vars plinode_$(hostname -f)_keys*.json /plinode_backups/originals/pluginV2.4/ && \
tree -a /plinode_backups/

4-3. Transferring the Backup Directory to Your Local PC

バックアップディレクトリをローカルPCに転送

To complete the upgrade, transfer the /plinode_backups/ directory from your server to your local PC. This ensures that all important data is safely stored.

Using an SFTP Client (Turmius Example)

  1. Open Turmius and connect to your server via SFTP.
  2. Navigate to the /plinode_backups/ directory on the server.
  3. Download the entire directory to your PC (e.g., C:\Users\YourName\plinode_backups).
  4. If prompted, select "Merge" to avoid overwriting existing files.
【日本語】

アップグレードを完了するために、サーバー上の /plinode_backups/ ディレクトリをローカルPCに転送し、安全に保存します。

SFTPクライアント(Turmius)の使用例

  1. Turmiusを開き、SFTPでサーバーに接続します。
  2. サーバーの /plinode_backups/ ディレクトリに移動します。
  3. ディレクトリ全体をPCにダウンロード(例: C:\Users\YourName\plinode_backups\)。
  4. 上書きの確認画面が表示されたら、「Merge」を選択して既存ファイルを保持します。

The following screenshot shows how to download the backup directory using Turmius:
以下のスクリーンショットは、Turmiusを使用してバックアップディレクトリをダウンロードする方法を示しています。
Screenshot by Dropbox Capture.png

And that's the end of the guide.

以上です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?