๐Ÿ› ๏ธ Tronsell Wiki

How to Install a TRON Full Node

Complete, step-by-step guide to installing a TRON full node on Ubuntu 22.04 LTS. From prerequisites to configuration, syncing, and systemd service setup โ€” everything you need to get your node running.

โšก Installation Overview
OS Ubuntu 22.04 LTS
Java OpenJDK 11
Client Java-Tron (latest)
Sync Time 4โ€“6 hours (with snapshot)
Disk Space 1+ TB SSD
RAM 32 GB (min 16 GB)

๐Ÿ“‹ Prerequisites

Before you begin, ensure your server meets the minimum hardware and software requirements. This guide assumes you have:

  • A dedicated server or VM running Ubuntu 22.04 LTS (fresh installation recommended).
  • Root or sudo access to install packages and configure the system.
  • At least 16 GB RAM (32 GB recommended for production).
  • At least 500 GB NVMe SSD (1 TB+ recommended).
  • Stable internet connection with 500+ Mbps bandwidth.
  • Open ports: 18888 (P2P), 50051 (gRPC), 8090 (HTTP) โ€” adjust firewall accordingly.
๐Ÿ”‘ Important

Never run a full node on a machine with less than 16 GB RAM. Insufficient memory will cause the Java process to crash or sync to fail.

1๏ธโƒฃ Step 1: Prepare the Server

Log in to your server and update the package index. Install essential build tools and utilities.

sudo apt update && sudo apt upgrade -y sudo apt install -y git curl wget maven openjdk-11-jdk-headless sudo apt install -y build-essential libssl-dev pkg-config

Verify Java installation:

java -version # Should display OpenJDK 11.x
๐Ÿ’ก Use OpenJDK 11

Java-Tron is tested with OpenJDK 11. Avoid using newer versions like Java 17 or 21 unless you are sure they are compatible.

2๏ธโƒฃ Step 2: Download and Build Java-Tron

Clone the official Java-Tron repository from GitHub and build the executable JAR file.

cd /opt sudo git clone https://github.com/tronprotocol/java-tron.git cd java-tron sudo ./gradlew build -x test

After a successful build, the JAR file will be located at:

/opt/java-tron/build/libs/FullNode.jar

Alternatively, you can download a pre-built JAR from the official releases page for faster deployment.

โšก Fast Track

If you don't want to build from source, download the latest release JAR directly:

wget https://github.com/tronprotocol/java-tron/releases/latest/download/FullNode.jar

3๏ธโƒฃ Step 3: Configure the Node

The configuration file config.conf controls network settings, database engine, API endpoints, and logging. Create a working directory and copy the default configuration.

sudo mkdir -p /opt/tron-node sudo cp /opt/java-tron/src/main/resources/config.conf /opt/tron-node/ sudo chown -R $USER:$USER /opt/tron-node

Edit /opt/tron-node/config.conf with your preferred settings. Key parameters:

Parameter Recommended Value Description
db.engine ROCKSDB Faster sync, better I/O performance
node.p2p.version 11111 P2P protocol version (mainnet)
node.p2p.listen.port 18888 P2P listening port
node.rpc.port 50051 gRPC API port
node.http.port 8090 HTTP JSON-RPC port
log.level WARN Reduce log verbosity
๐Ÿ“ก Network Selection

For mainnet, keep node.p2p.version = 11111. For testnet, use node.p2p.version = 22222.

4๏ธโƒฃ Step 4: Start the Node and Sync

Launch the full node with the configuration file. The node will begin synchronizing from the genesis block.

java -Xmx16G -Xms16G -jar /opt/java-tron/build/libs/FullNode.jar \ -c /opt/tron-node/config.conf \ --log-config /opt/tron-node/logback.xml

Sync time: Without a snapshot, full sync can take 7โ€“10 days. To speed this up, use a database snapshot.

โšก Fast Sync with Snapshot

Download a recent snapshot from a trusted source and extract it to the database directory before starting the node:

wget https://snapshot.tronscan.org/latest/chain.tar.gz tar -xzf chain.tar.gz -C /opt/tron-node/database

Then start the node normally โ€” it will pick up from the snapshot height.

Monitor sync progress by checking the logs or using tail -f on the log file:

tail -f /opt/tron-node/logs/tron.log

5๏ธโƒฃ Step 5: Create a Systemd Service (Auto-Start)

To ensure your node restarts automatically after reboots or crashes, create a systemd service.

Create a service file:

sudo nano /etc/systemd/system/tron-node.service

Add the following content (adjust paths to match your setup):

[Unit] Description=TRON Full Node After=network.target [Service] User=root WorkingDirectory=/opt/tron-node ExecStart=/usr/bin/java -Xmx16G -Xms16G -jar /opt/java-tron/build/libs/FullNode.jar -c /opt/tron-node/config.conf --log-config /opt/tron-node/logback.xml Restart=always RestartSec=30 LimitNOFILE=65536 [Install] WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload sudo systemctl enable tron-node sudo systemctl start tron-node sudo systemctl status tron-node
๐Ÿ” Monitoring

Use journalctl -u tron-node -f to view real-time logs. For advanced monitoring, consider Prometheus + Grafana.

โœ… Step 6: Verify Your Node

Once the node is synced, verify it is working correctly by querying the API.

curl -X GET http://localhost:8090/wallet/getnowblock

You should receive a JSON response with the current block number. Compare it with Tronscan to confirm you are on the correct chain.

๐ŸŽ‰ Node Ready

Your TRON full node is now running! You can use it as a private RPC endpoint for your dApps, indexers, or analytics tools.

โš ๏ธ Common Troubleshooting

  • Out of Memory: Increase -Xmx value or reduce db.maxOpenFiles in config.
  • Sync stuck: Check network connectivity and peer count. Add node.p2p.seedIP with trusted seeds.
  • Port conflicts: Ensure ports 18888, 50051, 8090 are open and not used by other processes.
  • Slow sync: Use RocksDB and a recent snapshot. Also check disk I/O and network bandwidth.

โ“ Frequently Asked Questions

How long does it take to install a TRON full node?

The installation process (excluding sync) takes about 15โ€“30 minutes on a fast server. Sync time depends on hardware: with a snapshot, 4โ€“6 hours; without, up to 10 days.

Can I run a full node on a VPS with 8 GB RAM?

8 GB is not recommended. The Java-Tron process alone often uses 10โ€“14 GB. A node with less than 16 GB will likely crash or fail to sync.

What ports need to be open for a TRON full node?

18888 (TCP) for P2P communication, 50051 for gRPC, and 8090 for HTTP API. Restrict RPC ports to trusted IPs for security.

Should I use LevelDB or RocksDB?

RocksDB is strongly recommended for production. It offers better compression, faster sync, and lower I/O compared to LevelDB.

How can I speed up initial sync?

Use a recent database snapshot, set db.engine = ROCKSDB, and allocate sufficient JVM heap (-Xmx20G). Also ensure your disk has high IOPS (NVMe).

โšก Run Your Node with Confidence

Need TRON Energy for your node or dApp? Tronsell provides reliable Energy rental to keep your transactions cheap and fast.