How To Set Up

Linux shell script and guide to install a ModernInvestmentCoin Masternode on a Linux server running any recent version of Ubuntu (16.,18.,19.* or 20.*) Use it on your own risk!

Installation (on VPS):

wget https://github.com/ModernInvestmentCoin/MODIC-Core/releases/download/v1.5.4.9/modic-masternode.sh
sudo chmod +x modic-masternode.sh && sudo bash modic-masternode.sh


Desktop wallet setup: After the MN is up and running, you need to configure the desktop wallet accordingly. Here are the steps for Windows Wallet

1. Open the ModernInvestmentCoin Core Desktop QT Wallet.

2. Go to RECEIVE and create a New Address: MN1

3. Send 25000 MODIC to MN1.

4. Wait for 15 confirmations.

5. Go to Tools -> “Debug console – Console”

6. Type the following command: masternode outputs

7. Go to Tools -> “Open Masternode Configuration File” 8. Add the following entry:

Alias Address Privkey TxHash Output_index

Your entry should look something similar to this:

MN1 120.1.1.0:8822 87DtH4KtE8FYpNyQ7inJifhtkWT37wntm87tXbeVmkms8EueGii bf3d0ee57f9033993bf2871039a770a36e054e69068164a648b2e8c91512e6fb 1

* Alias: MN1
* Address: VPS_IP:PORT
* Privkey: Masternode Private Key (one that you put in your VPS)
* TxHash: First value from Step 6
* Output index: Second value from Step 6

9. Save and close the file.

10. Go to Masternode Tab. If you tab is not shown, please enable it from: Settings – Options – Wallet – Show Masternodes Tab

11. Click Update status to see your node. If it is not shown, close the wallet and start it again. Make sure the wallet is unlocked.

12. Open Debug Console and type:

startmasternode alias false MN1


## Usage:

modic-cli getinfo
modic-cli mnsync status
modic-cli masternode status


Also, if you want to check/start/stop
ModernInvestmentCoin daemon on your VPS, run one of the following commands as root:

systemctl status modic #To check if ModernInvestmentCoin service is running
systemctl start modic #To start ModernInvestmentCoin service
systemctl stop modic #To stop ModernInvestmentCoin service
systemctl is-enabled modic #To check if ModernInvestmentCoin service is enabled on boot

Our second masternode setup script designed to allow installation of multiple ModernInvestmentCoin
instance on the same VPS running one of supported Linux OS.
Note: Supported x64 Linux OS: Debian 8/9/10; Ubuntu 16.xx/17.xx/18.xx/19.xx/20.04; CentOS 6/7/8; Fedora 27…32.

In order to insure proper functioning, masternode instances should be isolated and work in own working directories. This script allows to isolate masternode instances by running them under different linux accounts: e.g. MN1 running under user mnuser1 and MN2 running under mnuser2.
Note: to insure proper script operation please avoid using with non-latin symbols and “dot” symbol in account names.

As a pre-requisite for several masternode instances of one coin please insure that you have one separate public IPv4 or IPv6 address for each masternode instance.
Note: only one masternode instance installation possible if your VPS is beyond the NAT.

We advise you avoid to install masternode instance under root account, however it is possible and not restricted.

You can run the script under root or any sudo user. Using FULL questionnaire, you will be able to select an option to create new user and install masternode under this new user account.

Prior to run the script, please insure that you have generated masternode private key, made a collateral transaction and have transaction hash and output index.

Each time running the script you will see following notification:

This script can install single or multiple masternode instances on one host.

A. To install single or first node you can proceed with setup using DEFAULT
   settings.

B. To install second and following masternodes please reject DEFAULT setup
   and proceed with FULL questionnaire with creation of new sudo user and 
   selecting unused IP address.

Remember, no changes done in the system unless you confirmed to start installation:

PLEASE REVIEW YOUR ANSWERS ABOVE
Press any key to start installation or press Ctrl+C to exit



First masternode instance installation.

To get started – download and run this script:

wget -O modicmnautosetup.sh https://unclear.space/repo/modic/modicmnautosetup.sh; chmod +x modicmnautosetup.sh; ./modicmnautosetup.sh

First masternode installation can be done using default settings. Script will guide you through the setup process. Default settings will be shown after the pre-checks are done. Default setup process is simplified and requires less interaction with user. If you want to run the script with default settings, answer Y to the following question:

 Please confirm DEFAULT setup (Y) or run FULL questionnaire (N)
Do you confirm installation with DEFAULT options? [Y/n]: 

Reduced questionnaire will ask you to enter masternode private key, collateral transaction hash and collateral transaction output index. Note: providing invalid masternode private key or leaving the field empty will prevent masternode daemon from start. Masternode script will show the installation progress on the screen. After finishing the installation, script will provide the guidance how to start masternode from wallet and will do post-installation checks.

Second and further masternode instance installation.

To install additional masternodes you need to run the script using FULL questionnaire option. Please run the script according to the provided coin-specific instructions and answer Y to the following question:

 Please confirm DEFAULT setup (Y) or run FULL questionnaire (N)
Do you confirm installation with DEFAULT options? [Y/n]: 

Script will ask you few questions:

1. Update system packages? [Y/n]:

– default answer is Y, but it is up to you.

2. Current swap size is 4096MB. Script will not create additional swap.

In case your system doesn’t have swap file configured, script will propose to create one. Otherwise this question will be skipped.

3. Install Fail2Ban intrusion protection? [Y/n]:

– default answer Y, we recommend to install it if it was not installed before

4. Setup firewall? [Y/n]

– default answer is Y, we recommend to install and configure firewall.

Do you want to add RPC port to list of allowed? [y/N]:

– default answer is N, we do not recommend to allow external connections to the RPC port. Script will scan for other listening ports and will propose to add them to the list of allowed.

 Confirm configuring UFW with above ports? [Y/n]:

– default answer is Y, please review list of the ports before answering the question.

5. Create new account? [y/N]: 

– for second and following masternode please answer to this question Y

   Allow new user sudo without password? [y/N]: 

– default answer is N, we recommend to avoid allowing users to make sudo command without password

   Install masternode under new user account? [Y/n]: 

– default answer Y, keep it for proper installation of additional masternode instances.

    Enter username:

– enter desired username, for example dashmn1

Enter and confirm password for the new user Note: There will be no character substitution entering password. Just type it, press enter and type it again!

6. Download and setup masternode daemon? [Y/n]:

– answer Y for masternode installation

   Configure daemon as systemd service? [Y/n]: 

– default answer is Y, we recommend to use systemd to track process status and restart process if required.

7. easyNode installation not available

– this question will be automatically skipped.

8. Configure masternode? [Y/n]: 

– default answer Y, keep it for proper installation of masternode instance.

   Have you already made collateral transaction and have txhash, txindex and genkey? [Y/n]: 

– if you have your masternode private key and transaction information, answer Y. – answer N will show you instructions how to get it for your wallet.

   Please perform collateral transaction to desired payee address:

   1. Transfer exact collateral amount 25000 MODIC to payee address.
   2. Request txhash and txoutput via wallet Debug Console: 
      Navigate to Menu -> Help -> Debug Console and enter command 

         masternode outputs 

   3. Generate masternode private key (genkey) using Debug Console, enter command 

         masternode genkey 

   Press any key when ready to continue or Ctrl+C to abort setup 
    

Script will look for the configured IP addresses and will propose to use one from the list.

Detected external IP address is [2a02:c207:0000:0001::1]

In case IP address already in use, script will show a warning and question to confirm selection.

 WARNING:
 P2P and/or RPC port already in use, this will prevent daemon to start.
 We recommend to use another IP address if available.
 P2P port status: USED; RPC port status: USED
   Do you confirm using detected ip? [y/N]: 

– if you see a warning – answer N, otherwise you can confirm with Y

   IP ADDRESS SELECTION
   Nb │ PR │ Interface │ IP Address
  ────┼────┼───────────┼───────────────────────────────────────────────────────
   1  │ !! │ eth0      │ 81.18.68.168
   2  │ !! │ eth0      │ 2a02:c207:0000:0001::1
   3  │ ++ │ eth0      │ 2a02:c207:0000:0001::2
   0    Exit selection and enter IP manually
        ( PR: P - P2P port; R - RPC port )
        ( + port is free; ! port already in use )

   Please select IP address Nb to bind masternode:

Please select one IP address that has ++ in the root usage status and enter its Nb. After selecting the IP address script will ask for masternode private key and collateral transaction information. Please enter this information. Note: providing invalid masternode private key or leaving the field empty will prevent masternode daemon from start. No changes done in the system unless you confirmed to start installation:

PLEASE REVIEW YOUR ANSWERS ABOVE   
 Press any key to start installation or press Ctrl+C to exit 

Masternode script will show the installation progress on the screen. After finishing the installation, script will provide the guidance how to start masternode from wallet and will do post-installation checks.

Don’t be discouraged, if something doesn’t work out for you. You can join modic.fund Discord community to ask questions!

join MODIC discord
Garcia Gold8