> For the complete documentation index, see [llms.txt](https://bitcore-btx.gitbook.io/bitcore-btx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bitcore-btx.gitbook.io/bitcore-btx/privatekey-1/bitcore-masternodes-1/bitcore-masternode-guide.md).

# BitCore Masternode Guide

Welcome to official BitCore BTX Masternode Quick Guide

## **Some important notes:**

* Always do a backup of your **wallet.dat** file
* Encrypt your wallet
* Never enter any commands in debug console if anyone is asking you to do it

**What you need to run a masternode:**

* Linux VPS (Ubuntu 18.04) from your favorite provider (e.g. Vultr, Scaleway, OVH, ...) with 2GB RAM (1GB physical, 1GB swap possible!)
* IPv4 address from your Linux VPS
* 2,100 BitCore BTX coins for a masternode collateral (Important: Send Coins in one(!) piece)
* BitCore BTX QT Wallet (min. Version 0.90.9.10)

Wallet Setup

1. Download BitCore BTX QT Wallet from our [GitHub](https://github.com/bitcore-btx/BitCore/releases/latest)
2. Start your BitCore BTX QT Wallet and wait until it's fully synchronized
3. **OPTIONAL:** Encrypt your wallet (best with a strong password)
4. Create a new wallet address for your masternode collateral (save it in a text file, you need it later)\
   **Debug Console command:** `getnewaddress "mn01" "legacy"`
5. Send 2100 BTX Coins to your new generated wallet address and wait for 15 confirmations
6. Generate a private key for your masternode (save it in a text file, you need it later)\
   **Debug Console command:** `masternode genkey`
7. Get your masternode collateral output (save it in a text file, you need it later)\
   **Debug Console command:** `masternode outputs`
8. Open the masternode.conf file (here are 2 possibilities):

* In wallet: Tools -> Open Masternode Configuration File
* Via Windows Explorer this path -> `%appdata%\BitCore` and open the file with Editor\
  \
  and enter all needed information, e.g.\
  `MN_ALIAS VPS_IP:8555 MASTERNODE_PRIVKEY TX_ID TX_INDEX`\
  **For Example:**\
  `mn01 1.2.3.4:8555 5Jgo9G7vNJxzmZdvJR5uiifHx3RGzmTF9SBiAKzzbTPpfToNuQw 23e029a26068fc77aa1000a003e0b4ef8273a09fd79b7646d0da87e44fdbb1db 1`\
  \
  Here a short overview of all needed informations:

| OPTION              | NEEDED INFORMATION               |
| ------------------- | -------------------------------- |
| MN\_ALIAS           | Enter any alias, e.g. mn01       |
| VPS\_IP             | Your VPS IPv4 address            |
| MASTERNODE\_PRIVKEY | Output from `masternode genkey`  |
| TX\_ID TX\_INDEX    | Output from `masternode outputs` |

9\. Activate Masternode Tab\
Goto Settings -> Options -> Wallet and set **Show Masternode Tab**\
Restart your Wallet, then you should see the **Masternodes** Tab in your Wallet.VPS Setup

1. Connect to your VPS via SSH (I prefer [PuTTY](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html))
2. Download BitCore BTX binary files for Linux, unpack them and copy to required location\
   **SSH Commands:**\
   `cd ~`\
   `wget https://github.com/bitcore-btx/BitCore/releases/download/0.90.9.8.12/bitcore-x86_64-linux-gnu_no-wallet.tar.gz`\
   `tar -xzvf bitcore-x86_64-linux-gnu_no-wallet.tar.gz`\
   `cp bin/bitcore{d,-cli} /usr/local/bin`\
   `rm -r bin/ lib/ bitcore*.tar.gz`\
   &#x20;
3. Create bitcore.conf and enter all required informations (replace with your values)\
   **SSH Commands:**\
   `mkdir .bitcore`\
   `cd .bitcore`\
   `echo "externalip=VPS_IP`\
   `masternodeaddr=VPS_IP:8555`\
   `listen=1`\
   `daemon=0`\
   `logtimestamps=1`\
   `maxconnections=64`\
   `masternode=1`\
   `masternodeprivkey=MASTERNODE_PRIVKEY" > bitcore.conf`\
   &#x20;
4. Start your masternode and wait until blockchain is syncronized\
   **SSH Command:**\
   `bitcored -daemon`\
   &#x20;
5. Check if blockchain is synchronized and masternode ready to be activated\
   **SSH Command:**\
   `bitcore-cli mnsync status`\
   \
   and wait until these values are ***true***\
   `"IsBlockchainSynced": true,`\
   `"IsMasternodeListSynced": true,`\
   `"IsWinnersListSynced": true,`\
   `"IsSynced": true,`\
   \
   **PLEASE NOTE:** It's very important to wait until all values a **true** our your masternode will not be able to start !!\
   &#x20;
6. Activate your Masternode via BitCore BTX QT Wallet\
   Goto your Wallet, open Masternodes Tab, select your Masternode and start it with **Start Alias** button.\
   \
   **NOTICE:** If your wallet is encrypted, you have to enter your password.\
   \
   Now your Masternode Status will be **PRE\_ENABLED**. It normally takes about 20 minutes until the masternode is set to **ENABLED**, but it can also take longer.

How to update your Masternode:

**IMPORTANT NOTE:** This described procedure only works if you have set up your masternode using this guide.

**SSH Commands:**\
`bitcore-cli stop`\
\
`cd ~`\
`wget https://github.com/bitcore-btx/BitCore/releases/download/0.90.9.8.12/bitcore-x86_64-linux-gnu_no-wallet.tar.gz`\
`tar -xzvf bitcore-x86_64-linux-gnu_no-wallet.tar.gz`\
`cp bin/bitcore{d,-cli} /usr/local/bin`\
`rm -r bin/ lib/ bitcore*.tar.gz`\
\
`bitcored -daemon`\
\
Now check if blockchain is synchronized and masternode ready to be activated\
**SSH Command:**\
`bitcore-cli mnsync status`\
\
and wait until these values are ***true***\
`"IsBlockchainSynced": true,`\
`"IsMasternodeListSynced": true,`\
`"IsWinnersListSynced": true,`\
`"IsSynced": true,`\
\
**PLEASE NOTE:** It's very important to wait until all values a **true** our your masternode will not be able to start !!
