๐ 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.
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.
Verify Java installation:
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.
After a successful build, the JAR file will be located at:
Alternatively, you can download a pre-built JAR from the official releases page for faster deployment.
If you don't want to build from source, download the latest release JAR directly:
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.
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 |
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.
Sync time: Without a snapshot, full sync can take 7โ10 days. To speed this up, use a database snapshot.
Download a recent snapshot from a trusted source and extract it to the database directory before starting the node:
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:
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:
Add the following content (adjust paths to match your setup):
Enable and start the service:
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.
You should receive a JSON response with the current block number. Compare it with Tronscan to confirm you are on the correct chain.
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.