Skip to main content

Running a Node from Docker

This guide provides step-by-step instructions for setting up and running a full node on the Hedge network using Docker. Whether you're new to node operation or have prior experience, this guide is designed to make the setup process straightforward.

Follow these steps to build and run the Docker image for Hedge (Berberis).

Pre-requisites

Before you begin, ensure you have Docker installed on your machine. If not, you can download and install it from the official Docker website: Docker Installation Guide.

Create a Data Folder

Create a folder in the location with the minimum storage requirements to store the Hedge blockchain data. For example, create a folder named hedge_data:

mkdir /path/to/hedge_data

Ensure to replace /path/to/hedge_data with the actual path where you want to store the blockchain data.

Create an Environment File

Create a file named .env and specify the necessary environment variables. Here is an example:

Sample Environment Variable Settings
# Mandatory: Specify the RPC  value 
RPC=https://www.rpc-berberis.hedgeblock.io

# Optional: Specify the REST_PORT value
REST_PORT=1317

# Optional: Specify the MINIMUM_GAS_PRICES value
MINIMUM_GAS_PRICES=0.0025uhedge

# Optional: Specify the NODE_NAME value
NODE_NAME=my_node

# Optional: Specify the CHAIN_ID value
CHAIN_ID=berberis-1

# Optional: Specify the CHAIN_ROOT value
CHAIN_ROOT=/root/hedge

# Specify the PERSISTENT_PEERS value (if not set, it will be obtained dynamically)
PERSISTENT_PEERS=15c4b9e4c180dffe096d56aca0a084e551208c87@54.92.167.150:26656

# Optional: Specify the EXTERNAL_ADDRESS value (if not set, it will be obtained dynamically)
EXTERNAL_ADDRESS=210.18.155.21

# Set SWAGGER_ENABLE to true to enable Swagger documentation for the REST API
# The default value is false
SWAGGER_ENABLE=true