Viction
  • Getting Started
  • General
    • Overview
    • Viction Blockchain
      • PoSV Consensus
      • Comparison
    • Staking
      • Staking Requirements
      • Staking Rewards
      • How to stake on Viction Wallet
    • Network Information
      • Viction Mainnet
      • Viction Testnet
    • Viction RPC API
  • Smart Contract Development
    • Solidity
      • A Simple Smart Contract
      • Solidity by Example
    • Standards & Specification
      • VRC25 Specification
      • VRC725 Specification
    • IDEs and Tools
      • Remix
      • Ethers.js
      • web3.js
      • thirdweb CLI
    • Deployment & Verification
      • Hardhat
      • Foundry
  • DApp Development
    • Integration
      • Exchange/Wallet integration
      • VRC25 Exchange/Wallet integration
      • Viction Staking Governance
      • VIC ZeroGas
      • VRRF
    • Data and analytics
    • Embedded Wallet (MPC)
    • Walkthrough: Build a Dapp on Viction
      • Setup Environment
      • Write the Smart Contract
      • Interacting with the Dapp in a browser
  • Masternode
    • Requirements
    • Run a Full Node
      • Binary
      • Create a Viction Masternode
      • Tmn
      • Docker
    • Apply Your Node
    • Slashing Mechanism
    • Chain Data Snapshots
    • Troubleshooting
  • Viction Wallet
    • User Guide
      • Authentication
      • How to create a new wallet
      • How to restore a wallet?
      • Wallet settings
      • Send & Receive Tokens
      • Add custom token
      • Manage Tokens
      • Send NFT
      • General settings
    • Developer Guide
    • Privacy Policy
    • Term and Services
  • Viction Bridge
    • Spacegate
    • Arken Bridge
    • Hyperlane
  • Viction Data Availability
    • Viction DA RPC API
    • DA Integration Use cases
      • Simple Guide for Integrating OP Stack Rollup with Viction DA Layer
  • How to
    • How to Connect to Viction Blockchain
      • Coin98 Super Wallet
      • Metamask
      • Ledger
    • How to troubleshoot when the node is up but couldn't begin to sync block
    • How to Vote for Viction Saigon Network Upgrade Proposal
    • How to issue a token via VICIssuer
    • How to verify if a contract has been issued via VICIssuer
    • How to deploy the VRC725 contract
    • How to apply ZeroGas for VRC725 contract
    • How to Migrate Dapps from Ethereum
    • How to register Token or NFT logo on Vicscan
    • How to verify a contract on Vicscan
    • How to confirm a project on Vicscan
    • How to check if a token is gas sponsored on Viction
    • How to verify gas sponsored transactions
    • How to create Telegram Mini Apps
    • How to use VictionSafe (Multisig)
  • FAQ
    • APIs
    • General
      • Viction
      • Ecosystem
      • VIC - Economics
      • Contact & Support
    • Masternodes and Voting
      • Masternodes
      • Voter
    • Products
      • VicScan (Explorer)
      • VicMaster
      • VicStats
      • VicIssuer
        • How to Verify & Publish Contract Source Code on VicScan
      • Viction Wallet
      • Viction Data Availability Network
  • Legal
    • Terms of Use
    • Privacy Policy
  • Whitepaper and Research
  • Archive
    • TOMOE
    • How to Deploy a VRC25 Token on Viction
    • How to deploy an ICO smart contract on Viction
    • How to deploy an NFT token
    • An Example of Building a Dapp on Viction
    • Migrate Ethereum Dapp to Viction
    • TomoMasterDAO
      • Introduction
      • Governance model
        • On-Chain vs Off-Chain Voting
        • Board
        • Proposals
        • Voting and Outcome
      • Tokenomics
      • How to utilize and trade tDAO
      • Proposal guidelines for TomoMasterDAO
    • Old Viction Testnet
    • Deploy on Viction
      • CLI Commands
      • Viction Private Testnet Setup
Powered by GitBook
On this page
  • Prerequisites
  • Installation
  • Usage
  • Migrating from tmn
  • Troubleshooting
  1. Masternode
  2. Run a Full Node

Create a Viction Masternode

This tool aims to help beginner/intermediate Masternode owners. It acts as a terminal wizard which helps the user generate a working configuration for docker-compose to run the node.

Using create-Viction-masternode and docker-compose offers you benefits like:

  • working "out of the box" docker-compose configuration

  • auto-restarting your node on failure

  • flexible configuration (storage, logging, ports)

Prerequisites

  • Docker

  • Docker-compose

Installation of Docker CE

To install Docker, first update the apt package index.

sudo apt update

Then install packages to allow apt to use a repository over HTTPS.

sudo apt install apt-transport-https ca-certificates curl software-properties-common dirmngr gnupg

Add Docker’s official GPG key.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

apt-key fingerprint 0EBFCD88

Set up the stable Docker repository.

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Update the apt package index, then install the latest version of Docker CE.

sudo apt update

sudo apt install docker-ce

Once installed, add your current user to the Docker group.

sudo usermod -aG docker $(whoami)

Warning

You need to relog into your account for this to take effect. Until then, you will not be able to access the Docker deamon.

Verify that Docker CE is installed correctly by running the hello-world image:

docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message starting by "Hello from Docker!" and exits.

Installation of Docker-compose

To install docker-compose, start by downloading the executable.

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Make it executable.

sudo chmod +x /usr/local/bin/docker-compose

Optional: install bash completion.

sudo curl -L https://raw.githubusercontent.com/docker/compose/1.23.2/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose

Verify that docker-compose is correctly installed by running the version command.

docker-compose version

Installation

Make it executable.

chmod +x create-Viction-masternode

Move it in your path.

sudo mv create-Viction-masternode /usr/local/bin/

Usage

Simply run create-Viction-masternode with the name of your Masternode as argument.

create-Viction-masternode mymasternode

Follow the wizard by replying to the following questions:

  • Coinbase private key: Your Masternode coinbase account private key. A Viction node uses an account to be uniquely identified and to receive transaction fee.

Important note:

We advise for security measures to use a fresh new account for your Masternode. This is not the account which will receive the rewards. The rewards are sent to the account which will make the initial deposit.

  • Storage: The storage location for your node data (chaindata). Either docker volume if you want to use the default docker volume location, or host directory if you want to define specific location on your filesystem (usefull when extending storage).

  • Chaindata: The name of the docker volume that will be used or the path to the directory containing the chaindata, depending on your answer to the last question.

  • The volume already exists: If you selected "docker volume", this will determine if the volume already exists or if it needs to be created.

  • Expose RPC: If you want to expose or not port 8545. It is the RPC api to your node. It should be only exposed if you have a specific reason to access the Viction JSON-RPC Protocol. The Masternode owner is responsible of proxing and securing the RPC api as it should not be directly exposed to the internet.

  • Expose WebSocket: If you want to expose or not port 8546. It is the WebSocket api to your node. It should only be exposed if you have a specific reason to access the Viction Protocol via WebSocket. The Masternode owner is responsible of proxing and securing the WebSocket api as it should not be directly exposed to the internet.

  • Logging level: Set the logging level of the Viction container to error, info or debug. Info or Error is usually a good logging level. Only use the debug level if you have a good reason to do so, it will generate a lot of output and increase resource usage.

Once finished, you will get a folder named after your Masternode (in our case "mymasternode") with two files.

  • .env Which contains the configuration generated from your answers to the question.

  • docker-compose.yml Which tells docker-compose how and which container run for your node. Your specific configuration will be read from the .env file.

Now that we have generated the correct initial configuration for docker-compose, we just need to start our node.

docker-compose up -d

You can check that your Masternode is running with the ps sub-command.

docker-compose ps

Migrating from tmn

For the long time Masternode runners who started with our older tool, tmn, here are the commands to achieve the same actions.

tmn start:

docker-compose up -d

tmn stop:

docker-compose stop

tmn update:

docker-compose pull
docker-compose up -d

tmn remove:

docker-compose down

Troubleshooting

error: could not access the docker daemon

If you have installed Docker, you probably forgot to add your user to the docker group. Please run this, close your session and open it again.

usermod -aG docker $your_user_name
PreviousBinaryNextTmn

Last updated 11 months ago

Download create-Viction-masternode from the .

For more docker-compose commands, use docker-compose --help or refer to their .

You can find a guide on migrating from tmn in the .

latest release
documentation
wiki