Run your mirror node using S3
- Check to see if you have it installed from your terminal:
docker --version && docker-compose --version
- For mirror node versions
0.35.0
and higher you will need dockerv3.3.3+
- You will be prompted to download the repo in the following steps
- Download PostgreSQL to be able to access the database.
Note: Create an IAM user with either an administrator or custom policy.
- This sets up an IAM user with Administrator Access Policy
- This user has full access and can delegate permissions to every service and resource in AWS.
- Once that is complete, select Users from the left IAM navigation bar
- Select the Administrator from the User name column
- Select the Security credentials tab
- Select Create access key
- Copy or download your Access key ID and Secret access key
- Enable access to billing data
- From the IAM left navigation bar select Polices
- Click on Create policy
- Service
- Enter S3 as your service
- Actions
- Access level
- Select List and Read
- Resources
- Select Specify bucket resource ARN for the GetBucketLocation
- Add ARN
- hedera-mainnet-streams
- Add ARN
- hedera-mainnet-streams/*
- Click Next:Tags
- Click Next: Review
- Enter a name for the policy
- Click Create policy
- From the left navigation bar on the IAM console select User Groups
- Click Create group
- Enter a user group name
- Select the policy that was created in the previous step
- Click Create Group
- Click Users from the IAM console left navigation bar
- Click on Add user
- Enter username
- Select Programmatic access for Access type
- Click Next: Permissions
- Select the group that was created in the previous step
- Click Next: Tags
- Click Next: Review
- Click Create user
- Copy or download your Access key ID and Secret access key
git clone https://github.com/hashgraph/hedera-mirror-node.git
cd hedera-mirror-node/
cd
into thehedera-mirror-node
directory from your terminal or IDE- Uncomment each field as shown below (except
gcpProjectId
) and update theapplication.yml
file in the root folder with the following:
Item | Description |
---|---|
accessKey | AWS access key |
cloudProvider | s3 |
secretKey | AWS secret key |
network | Enter a network to run a mirror node for |
Sample application.yml file
hedera:
mirror:
importer:
downloader:
accessKey: ENTER ACCESS KEY HERE
cloudProvider: "s3"
secretKey: ENTER SECRET KEY HERE
# gcpProjectId: For GCP only
network: PREVIEWNET/TESTNET/MAINNET #Pick one network
- From the
hedera-mirror-node
directory, run the following command:
docker-compose up
To access the mirror node data now available to you, enter the
hedera-mirror-node_db_1
container.- Open a new terminal
- To view the list of containers, enter the following command:
docker ps
- Enter the following command to enter the
hedera-mirror-node_db_1
container
docker exec -it hedera-mirror-node_db_1 bash
- Enter the following command to access the database
psql "dbname=mirror_node host=localhost user=mirror_node password=mirror_node_pass port=5432"
- Enter the following command to view the complete list of tables
\dt

You have successfully deployed a Hedera mirror node !
🥳
Last modified 1mo ago