Plugin,a Decentralized Oracle built on XDC Network
  • Migrating from Plugin Node V2 to V2.4 Without Changing the Node Address
    • 1 - Backup on Plugin Node V2.0
    • 2 - Installation and Configuration of Plugin Node V2.4
    • 3 - Importing PluginV2 Node Address into PluginV2.4
    • 4. Backup After Plugin V2.4 Upgrade
  • Plugin 2.0 - Node Operators
    • Introduction
    • Unstake PLI Tokens from Plugin 1.0 Node
    • Plugin 2.0 Set Up Requirements
    • Node Installation
      • Node Fulfillment
      • Job Setup
        • Steps to Setup Direct Request Job
      • Process of Approval
    • How to Update Your Plugin Node for the Latest XDC Gas Fee
  • PLUGIN 2.0 - Validators
    • Introduction
    • Set-up Requirements
    • Job Setup
      • Steps to Setup Direct Request Job
      • Flux Monitor Job
        • Idle Timer
        • Drum Beat
        • Poll Timer
        • POLL TIMER + IDLE TIMER (Recommended)
      • Process Of Approval
      • Rewards Information
    • OCR Set-up
    • How to Update Your Plugin Node for the Latest XDC Gas Fee
  • WALLET
    • XDCPay - Apothem
    • XDCPay - Mainnet
  • PLUGIN VRF SUBSCRIPTION
    • Introduction
    • Guidance on Utilizing Random Values
    • Creation and Deployment of VRF-Consumer Contract
    • Requesting Random Values
  • Multichain
    • PLISwap - How to instructions
  • Plugin Data Feeds platform
    • Introduction
    • End data consumers - Mainnet
    • End data consumers - Apothem
    • Benefits
  • Restaking Model
    • Introduction
      • Scenarios in Re-staking Model
      • Benefits To Node Members
      • Steps for Restaking
  • Tips and tricks
    • Known-Issues
    • Open-Issues
  • Plugin 1.0 Installations - Deprecated
    • How to install Plugin 1.0 Node
      • Modular Method Deployment (Recommended Approach)
      • Script Method (Legacy)
        • Script - Phase 1
        • Script - Phase 2
      • Docker Method
        • Docker - Phase 1
        • Docker - Phase 2
    • Core Adapters
    • Fund your Node
  • External Initiators - Deprecated
    • Introduction
    • Installation
    • Setup & Build
  • Oracle Plugin 1.0 - Deprecated
    • Deployment
    • Fulfillment Request
    • Job-Setup
    • Testing
  • Job-Tasks Plugin 1.0 Deprecated
    • Sleep
    • Get > Bytes32
    • HttpGet
    • CRON
    • Web
  • External Adapters Plugin 1.0 - Deprecated
    • Introduction
    • Implement External -Adapters
    • Define Bridge
    • Add Bridge to Job Spec
  • Deprecated
    • How to use
  • Use Cases
    • Plugin WFN Use Case
      • Plugin WFN Data Review
      • Plugin WFN Use Case - FAQ
      • Plugin WFN - Ambient Weather Unit Onboarding Instructions
      • Plugin WFN - Acurite Weather Unit Onboarding Instructions - LEGACY
      • Unlock WFN Node
    • Crypto Compare - Pricing Index
  • Node Operators
    • How to Register / Sign-up
    • How to enable 2FA
    • How to update profile
    • How to add XDC Wallet Address
    • How to Navigate Dashboards
    • How to submit Node Details
    • How to stake PLI token for Plugin Node
    • How to add Job to your node
    • View the node details
    • De-Activate / Re-activate my nodes
    • Withdraw staked PLI
    • Withdraw PLI from Plugin Node
    • Withdraw PLI from Oracle contract
    • How to add more stake in Node?
    • How to Migrate my Plugin Node to New Server?
    • How to Un-Stake the node.
    • How a Reputation is calculated?
    • Node Maintenance Instructions for node operators
  • FEATURES
    • PLI Yield Farming
      • Steps for Staking in Plugin Yield Farming (PLIYF)
      • PLIYF - FAQ
  • Support
    • FAQ
  • RESOURCES
    • Node Setup Video Tutorials
    • Community Supports
    • How to Submit your node details - Video Tutorial
  • CHANGELOG
    • v1.0.1
    • V1.0.2
    • V1.0.3
    • V1.0.4
    • V1.05
  • Terms and Conditions
Powered by GitBook
On this page
  1. Plugin 1.0 Installations - Deprecated
  2. How to install Plugin 1.0 Node
  3. Docker Method

Docker - Phase 1

Setup Postgres, Docker, Pull Plugin Docker Image & Setup Plugin Node

Please ensure, you have git & curl command installed already. If not, use the following command

sudo apt install git

sudo apt install curl

Step 1 - Download the Plugin Installation Script

NOTE: If you are having root access, please don't install from /root folder, better start from /home

git clone -b docker_branch_v1 https://github.com/GoPlugin/plugin-deployment.git && cd plugin-deployment

Step 2 - Postgres Setup

To set up custom password for PostgreSQL database execute the below mentioned command in plugin-deployment directory. The user needs to change the word ‘password’ to their own password for the database.

perl -i -p -e 's/plugin1234/yourpassword/g' postgresInstall.bash plugin.env ei.env

For example, here the password we are setting is 'yourpassword', please change it to your custom password.

NOTE: Don't use any special characters, just alphanumeric password is sufficient

perl -i -p -e 's/plugin1234/mypassword/g' postgresInstall.bash plugin.env ei.env

What's inside the plugin.env?

ETH_CHAIN_ID=50
ETH_URL=wss://pluginws.blocksscan.io
MIN_OUTGOING_CONFIRMATIONS=2
PLI_CONTRACT_ADDRESS=0xff7412ea7c8445c46a8254dfb557ac1e48094391
PLUGIN_TLS_PORT=0
SECURE_COOKIES=false
ALLOW_ORIGINS=*
DATABASE_TIMEOUT=0
FEATURE_EXTERNAL_INITIATORS=true
PLUGIN_DEV=true
DATABASE_URL=postgresql://postgres:plugin1234@172.17.0.1:5432/plugin_mainnet_db?sslmode=disable
ENABLE_EXPERIMENTAL_ADAPTERS=true
POSTGRES_USER=postgres
POSTGRES_PASSWORD=plugin1234
POSTGRES_DB=plugin_mainnet_db

Install PostgreSQL & Config PostgreSQL: (Just copy and paste each line) and make sure there is no error before you move on to the next line of commands

1) /bin/bash postgresInstall.bash
2) sudo perl -i -p -e "s/^\#listen_addresses.*$/listen_addresses = \'172.17.0.1\'/" /etc/postgresql/12/main/postgresql.conf
3) sudo chmod 666 /etc/postgresql/12/main/pg_hba.conf
4) sudo echo "host    all     all             172.17.0.1/16                 md5" >>/etc/postgresql/12/main/pg_hba.conf
5) sudo pg_ctlcluster 12 main start

Step 3 - Setup Docker

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker

Step 4 - Pull Plugin image

sudo docker pull goplugin/pluginode:v1


For latest docker image(in which Pli balance will be reflecting in Keys), please
use the v2 version of docker image:
sudo docker pull goplugin/pluginode:v2

Step 5 - Copy down the image ID using below command

sudo docker images

Step 6 - Change your credentials

It is important to change the credentials in these two files, inside the plugin-deployment directory.

These files are hidden files and you can edit using below command

  • .env.password

    • This is the password that helps generate and secure the Keystore wallet. Basically, your Plugin node will generate a wallet and this password is key to the same.

    • It follows certain standards and password conditions which you can get it from here

      • #  *** KEYSTORE PASSWORD SHOULD FOLLOW THIS CONDITIONS ***	     #
        #   “must be longer than 12 characters”,			    
        #   “must contain at least 3 lowercase characters”,	     
        #   “must contain at least 3 uppercase characters”,	     
        #   “must contain at least 3 numbers”,			     
        #   “must contain at least 3 symbols”,			     
        #   “must not contain more than 3 identical consecutive 	 #characters”.

        For example -

  • .env.apicred

    • This file has credentials that allows you to log in to PLUGIN GUI

    • You can use your email ID & password of your choice

Once the above files are updated, then you can proceed to the next!

Step 7 - Override the Image ID in the below command and run the docker container

sudo docker run --env-file plugin.env -it -d -p 6688:6688 -p 8080:8080 -v <Absolute path of your plugin-deployment directory>:/pluginAdm --add-host=host:192.168.0.1 <IMAGE_ID>

For example, after you change the image ID, the command should be-

sudo docker run --env-file plugin.env -it -d -p 6688:6688 -p 8080:8080 -v /home/ubuntu/plugin-deployment:/pluginAdm --add-host=host:192.168.0.1 ac37806848a0

Once it is successful, you will see something like this

Step 8 - Get the container ID using the below command

sudo docker ps -a => Get the <container_ID>

Step 9 - Change the container_ID in below command and execute from your directory

sudo pg_ctlcluster 12 main restart
sudo docker exec -it <container_ID> /bin/bash -c ". ~/.profile && pm2 start /pluginAdm/startNode.sh"

For instance

sudo docker exec -it 59961fcd0f4f /bin/bash -c ". ~/.profile && pm2 start /pluginAdm/startNode.sh"

Your node will start with status as ‘online’.

If you want to probe your running node, then you can use the command format given below.

sudo docker exec -it <container_ID> /bin/bash -c ". ~/.profile && <YOUR_COMMAND>"

You can replace <YOUR_COMMAND> with

- pm2 status - pm2 logs 0

Video Tutorial for this section -

PreviousDocker MethodNextDocker - Phase 2

Last updated 2 years ago