Besu

Installing and configuring Hyperledger Besu as a systemd service.

Besu

Hyperledger Besu is an Ethereum client designed with enterprise-grade use cases in mind. It is developed under the Hyperledger umbrella and is written in Java, making it the most mature choice for corporate environments familiar with the JVM (Java Virtual Machine).


🛡️ Role: Besu is an excellent choice for Client Diversity. It implements unique storage features like "Bonsai Tries," which optimize data storage and access speeds significantly compared to older archive node structures.


1. Install Dependencies (Java)

Besu requires a Java Runtime Environment (JRE). We recommend Java 21 LTS for the best performance and compatibility with recent Besu releases.

# Update repositories
sudo apt update

# Install OpenJDK 21
sudo apt install -y openjdk-21-jre-headless

# Verify Java installation
java -version

2. Download & Install

We will download the latest binary release from the official Hyperledger repository.

A. Create the Application Directory

B. Set Permissions

Ensure the ethereum user owns the directory.


3. Configure Systemd Service

We will configure Besu to run as a background service.

Create the service file:

Paste the following configuration:

🔍 Flag Explanation:

  • --data-storage-format=BONSAI: Enables Besu's optimized storage format (Essential for performance).

  • --sync-mode=SNAP: Uses Snap Sync to download the state quickly. (Note: the older X_SNAP prefix has been removed — use SNAP directly.)

  • --engine-jwt-secret: Path to the shared JWT secret for Engine API authentication. JWT auth is enabled by default, so --engine-jwt-enabled is no longer needed.

  • --rpc-http-api=ETH,NET,WEB3,ADMIN: The available JSON-RPC APIs. CLIQUE and MINER have been removed — Besu no longer supports PoW mining operations on mainnet.

  • JAVA_OPTS=-Xmx8g: Limits Java to 8GB of Heap RAM. Adjust this based on your total system RAM (keep it to ~50% of available RAM).


4. Start the Service

Reload the systemd daemon and start the node.


5. Verify Status

Check the logs to ensure Besu is initializing correctly.

Expected Output:

  • Bonsai: You should see logs referencing Bonsai storage initialization.

  • Engine API: Look for WebSocketService or JsonRpcHttpService starting on ports 8551/8545.

  • Waiting: Similar to other clients, it will wait for the Consensus Client to begin the sync process.

Last updated