This guide explains how to set up a Tron full node using Docker, including configuration, data persistence, and optional snapshot usage to speed up sync.
TRX/
βββ compose.yml
βββ trx.conf
βββ trx-data/
# compose.yml
services:
java-tron:
image: tronprotocol/java-tron
container_name: tron-node
command: -c /java-tron/config/trx.conf
ports:
- "8090:8090" # HTTP API
- "50051:50051" # gRPC
- "18888:18888" # P2P
volumes:
- ./trx.conf:/java-tron/config/trx.conf
- ./trx-data/output:/java-tron/output-directory
- ./trx-data/logs:/java-tron/logsStart the Tron node container
docker compose up -dStop the Tron node container
docker compose downRestart the node container
docker compose down && docker compose up -dView real-time logs from the node
tail -f trx-data/logs/tron.logCheck latest block
curl http://localhost:8090/wallet/getnowblockCheck peer connections
curl http://localhost:8090/network/peerlist-
To speed up initial sync download a Tron blockchain snapshot from a trusted source. Link
-
Replace the contents of:
trx-data/output/- Then run:
docker compose up -d- Then run:
tail -f trx-data/logs/tron.logstart:
docker compose up -d
down:
docker compose down
restart:
docker compose down && docker compose up -d
logs:
tail -f trx-data/logs/tron.log
status:
curl http://localhost:8090/wallet/getnowblock
peers:
curl http://localhost:8090/network/peerlist