VeChain Docs
  • Welcome to VeChain
  • Blockchain Basics
    • Introduction to blockchain
    • Introduction to digital property
    • The evolution of the internet
  • Introduction to VeChain
    • About the VeChain blockchain
      • Consensus Deep Dive
      • Governance
    • Dual-Token Economic Model
      • VeChain (VET)
      • VeThor (VTHO)
    • Acquire VeChain Assets
    • Sustainability
  • Core Concepts
    • Networks
      • Thor Solo Node
      • Testnet
      • Mainnet
    • Nodes
      • Node Rewards Programme
    • Blocks
      • Block Model
    • Transactions
      • Transaction Model
      • Transaction Fees
      • Transaction Calculation
      • Meta Transaction Features
        • Transaction Uniqueness
        • Controllable Transaction Lifecycle
        • Clauses (Multi-Task Transaction)
        • Fee Delegation
          • Multi-Party Payment (MPP)
          • Designated Gas Payer (VIP-191)
        • Transaction Dependency
    • Block Explorers
    • Wallets
      • VeWorld
        • User Guide
          • Setup
          • Wallet
          • Signing
          • Activities
          • Settings
        • FAQ
      • Sync2
        • User Guide
          • Setup
          • Wallet
          • Signing
          • Activities
          • Settings
        • FAQ
      • Sync
        • User Guide
          • Wallet
          • Ledger Device
          • Browser dApps and web
          • Interact with dApps
          • Activities
          • Settings
          • Report an Issue
          • Contributing
        • FAQ
    • EVM Compatibility
      • VeChain Modifications
      • Methodology
      • Test Coverage
        • Gas model
        • Raw transaction
        • hardhat specific
          • Ganache failures
          • evm_increaseTime
        • Failures in constructor
        • eth_sign
        • Contract address prediction
        • BadBeacon proxy address at 0x1
      • How to Recreate
      • Additional Information
        • Using Governance Contracts
        • ERC1820/ERC777 Testnet
        • Delegate Options
    • Account Abstraction
      • UserOperation
      • Bundler
      • EntryPoint Contract
      • Account Factory Contract
      • Paymaster Contract
    • Token Bound Accounts
  • How to run a node
    • Nodes
    • How to run a Thor Solo Node
    • Custom Network
    • Connect Sync2 to a Thor Solo Node
  • Developer Resources
    • Getting Started
    • How to build on VeChain
      • Connect to the Network
      • Read Data
        • Read Blocks
        • Read Transactions
        • Read Accounts
        • States & Views
        • Events & Logs
        • VET Transfers
      • Write Data
        • Transactions
        • Fee Delegation
      • Listen to Changes
        • Events
        • VET Transfers
        • Transactions
        • Blocks
        • Beats
      • Build with Hardhat
      • Utilities
        • BigInt and Unit-Handling
        • Name Service Lookups
    • Example dApps
      • Buy me a Coffee
      • Token Bound Accounts
      • PWA with Privy and Account Abstraction
    • EVM Compatibility for Developers
      • Key Architectural Differences and Optimizations
      • Practical Implications for Developers: Key Considerations
      • RPC Methods (Detailed Breakdown)
      • Frequently Asked Questions (FAQs)
      • VeChain Blockchain Specifications
      • Key Differences Between VeChain and Ethereum (Summary)
      • Best Practices for Developing on VeChainThor
    • How to verify Address-Ownership
      • Next.js Session Verification
    • Debug Reverted Transactions
    • Account Abstraction
    • VIP-191: Designated Gas Payer
      • How to Integrate VIP-191 (I)
      • How to Integrate VIP-191 (II)
      • How to Integrate VIP-191 (III)
    • Index with Graph Node
      • Setup with Docker
      • Index with OpenZeppelin
        • Create Subgraph Project
        • Configure Contracts
        • Deploy Subgraph and start Indexing
        • Track Subgraph Indexing
        • Access Subgraph
        • Update Subgraph
    • SDKs & Providers
      • SDK
        • Architecture
        • Accounts
        • Bloom Filter
        • Certificates
        • Contracts
        • Cryptography
        • Debug
        • Encoding
        • Polls
        • Subscriptions
        • Thor Client
        • Transactions
      • Thor DevKit
        • Installation
        • Usage
          • Cryptography
          • Accounts
          • Encoding
          • Transactions
          • Certificates
          • Bloom Filter
      • DApp Kit
        • v2
          • Installation
          • React
            • Installation
            • Usage
          • Vanilla JS
            • Installation
            • Usage
          • Core
            • Installation
            • Usage
          • Theme Variables
          • i18n
        • v1
          • Installation
          • React
            • Installation
            • Usage
          • Vanilla JS
            • Installation
            • Usage
          • Core
            • Installation
            • Usage
          • Theme Variables
          • i18n
          • Node Polyfills
          • V0 to V1
        • v0
          • Installation
          • Usage
          • React
            • Installation
            • Usage
          • Vanilla (UI)
            • Installation
            • Usage
          • Styles (UI)
          • i18n
      • DevPal
      • Web3-Providers-Connex
        • Installation
        • Usage
      • Connex
        • Installation
        • API Specification
    • Frameworks & IDEs
      • Hardhat
      • Remix
    • Built-in Contracts
    • VORJ
    • Useful Links
  • How to contribute
Powered by GitBook
On this page
  • Installation Process
  • Key Command-line Options
  • Advanced Configuration
  • Sub-Commands for Enhanced Control
  • Enabling Remote Access
  • Debugging with Increased Verbosity
  • Master Key Management
  • RESTful API: A Developer's Playground
  • Launching Your Solo Node
  • Docker: Containerized Convenience
  • Conclusion

Was this helpful?

  1. How to run a node

How to run a Thor Solo Node

A thor solo node is a VeChainThor blockchain node running in a sandbox, particularly useful for developers who might need to wait for a specific condition to be met, that in a living environment would

PreviousNodesNextCustom Network

Last updated 1 month ago

Was this helpful?

A Solo Node is a powerful tool for developers, offering a sandbox environment to interact with the VeChainThor blockchain. This guide will walk you through the setup and operation of your own Thor Solo Node, enabling you to test and develop applications in a controlled setting.

Installation Process

Clone the Thor repository:

git clone https://github.com/vechain/thor

Navigate to the Thor directory and build:

cd thor
make

Upon successful compilation, you'll find the thor binary in the bin directory.

Key Command-line Options

Explore Thor's capabilities with ./bin/thor -h. Essential options include:

  • --api-cors '*': Accept cross-origin requests from any domain.

  • --api-addr value: Set API service listening address (default: "localhost:8669").

  • --api-call-gas-limit value: Limit contract call gas (default: 50000000).

  • --verbosity value log verbosity (0-9) (default: 3).

Advanced Configuration

Sub-Commands for Enhanced Control

Thor offers versatile sub-commands:

./bin/thor solo --on-demand            # Create new blocks for pending transactions
./bin/thor solo --persist              # Save blockchain data to disk
./bin/thor solo --persist --on-demand  # The two options can work together

Enabling Remote Access

If Thor node is not running on the same machine of the development environment, then you need to provide an API listening address using the --api-addr command-line option. For example, to make Thor accept any remote connection:

./bin/thor solo --on-demand --api-addr 0.0.0.0:8669

Debugging with Increased Verbosity

The default verbosity option in Thor (3) might not be providing enough debug information. Using the --verbosity command-line option, you can increase the amount of information Thor prints out in stdout. For example:

./bin/thor solo --on-demand --verbosity 4

Master Key Management

Secure your node with master key commands:

# View master address
./bin/thor master-key

# Export master key to keystore
./bin/thor master-key --export > keystore.json

# Import master key from keystore
cat keystore.json | ./bin/thor master-key --import

RESTful API: A Developer's Playground

Thor's RESTful API offers a user-friendly interface for blockchain interaction. Access the Stoplight UI at:

http://127.0.0.1:8669/doc/stoplight-ui/

Or the Swagger UI at:

http://127.0.0.1:8669/doc/swagger-ui/

If Thor is running on a different host, make sure to run it using the IP of said host instead of the localhost, as well as the --api-addr command-line option.

Launching Your Solo Node

To run the node in solo mode which is what we need for development purposes use the following:

./bin/thor solo --on-demand

Thor can also be run with a test or main network by passing the command

--network test | main

A custom network can also be created by passing the command

--network <custom-net-genesis.json>

For development purposes the following flags are recommended

The below command runs thor solo allowing all remote connections. Remove the argument --api-addr 0.0.0.0:8669 to prevent all remote connections.

./bin/thor solo --on-demand --api-addr 0.0.0.0:8669 --gas-limit 10000000000000 --api-call-gas-li

Docker: Containerized Convenience

The most convenient way can be to use a Docker container. You can run your solo node as follows:

docker run -p 127.0.0.1:8669:8669 vechain/thor:latest solo --api-cors '*' --api-addr 0.0.0.0:8669

This sets up a containerized node with:

  • Localhost access on port 8669

  • Latest Thor Solo release

  • Unrestricted cross-origin requests

  • Remote connection capability

Conclusion

With your Thor Solo Node up and running, you're ready to dive into VeChainThor development. This powerful tool provides a flexible, controlled environment for building and testing blockchain applications. Happy coding!

An example genesis config file can be found at .

Thor
genesis/example.json