TRON Developer Guide — TRON-CLI


TRON-CLI is a command line tool which allows developers to quickly set up and manage TRON Nodes and service.


  • Python 3.6+
  • JDK 1.8
  • MongoDB (for event server)
  • MacOS or Linux


In the destination directory, optionally set up the python virtual environment and activate the environment. Then perform the pip install for troncli.

Why Python Virtual Environments?

TRON-CLI, like many Python programs, contains essential dependency files. In the absence of a Python Virtual Environment, a pip install command by default downloads the required package into your local machine's lib/python/site-packages directory. If another Python program checks for a different version of the same package dependency, that program may end up using the wrong package since there exists no indication of version number. With a Python Virtual Environment, all the required dependencies are neatly packaged into a venvdirectory that conveniently resides on the same level as your working directory. This eliminates any potential confusion stemming from package name overlap, as well as making the package easier to locate.

A successful pip install within the virtual environment produces the following output:

Successful pip install output

TRON-CLI Interactive Mode

Quickly set up what you want by answering a few questions:

TRON-CLI Quickstart

For those wanting to start up a local private network, you can run the command tron-cli quick. This command sets up the tron_nodes directory and sub-folders, moves the .jar files into the folders, sets up the configuration files on default ports, runs the node, and outputs the status details.

By default, it will set up a private test-net full node.

  • You can also type --nettype main to set up a Full Node that syncs to the Mainnet.
  • Type --reset True to reset all.

TRON-CLI Mainnet

The following procedures allow for advanced users to customize their setup and connect to the Mainnet. The process consists of initialization, settings configuration, and running the node.


Run the ‘tron-cli init’ command to set up the directories, download the .jar files, and move the .jar files into the directories:

This command creates a directory called tron_nodes in the working directory and then creates the four folders fullnode, soliditynode, eventnode, and gridapi. The command then downloads full.jar and solidity.jar, and places these executable files within their respective folders.

Successful TRON-CLI init output


TRON-CLI allows users to easily configure HTTP and gRPC IP ports for Full and Solidity nodes. The default settings are:

Full Node HTTP: 8500
Solidity Node HTTP: 8600
Event-Node HTTP: 8400
Full Node RPC: 58500
Solidity Node RPC: 58600
Event-Node RPC: 58400

To customize a setting, simply execute the tron-cli config --nettype command. For example, to set Full Node HTTP port to 8090, run tron-cli config --fullhttpport 8090:

Full Node HTTP port set to 8090

Run Node

To launch a full node only, execute tron-cli run:

Running the full node

You can then check the overall node status with tron-cli status:

Checking TRON-CLI overall node status

To run a solidity node, run the command tron-cli run --nodetype sol. For event node, run the command tron-cli run --nodetype event:

Running TRON-CLI Solidity Node

Check Logs

Once both a Full Node and Solidity Node are running, you can view the synchronization logs. The Full Node log is located under tron_nodes/fullnode/logs/tron.log, while Solidity Node log is located under tron_nodes/soliditynode/logs/tron.log. The logs are updated dynamically, with the Solidity Node 1 block behind the Full Node due to syncing.

Full Node (left) and Solidity Node (right) logs.

Stop Node

Stop a node easily by running the following command:

Common Use Cases

Note: It is highly suggested to first take a look at tron-cli i, as Interactive Mode should cover most use cases.

1. Private Net Nodes Setup

Setup Full Node

Add Solidity Node

2. Mainnet Nodes Setup


Config to Mainnet

Run Full Node


3. Advanced Config to Start Nodes


Detail Configuration (Specify parameter to overwrite default)

Run Full/Sol

4. Private Full Node + Event Node + Tron-Grid

Install MongoDB and create User and Database. Then initialize.

Config (Specify parameter to overwrite default) dbname, dbusername, and dbpassword are required to set

Run Full Node, Event Node, and Tron-Grid

5. Mainnet Event Node + Tron-Grid

Install MongoDB and create User and Database. Then initialize

Config (Specify parameter to overwrite default) dbname, dbusername, and dbpassword are required to set

Run Event Node

Run Tron-Grid

Commands Overview

Installation FAQs

  1. How to fix “fail to build a wheel for psutil” error?

a. Please check if clang is installed correctly, or install it using Homebrew:

b. Please check if you are using Python 3.x

  1. How to test in a virtual environment?

a. Create Virtual Environment

b. Activate VENV

c. Install TRON-CLI in VENV

d. Deactivate the VENV when done testing or using

GitHub Link



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


The official Medium of Tron Foundation. Learn more: