Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Getting Started

Deploy an EVM blockchain indexer on AWS in under 10 minutes. This guide uses the simplest example: EC2 + Docker Compose + external ClickHouse.

~5 min to deploy

$0/mo (AWS free tier)

EC2 (free tier) + Docker + ClickHouse

What You're About to Build

You Provide
rindexer.yaml
Indexer config
erpc.yaml
RPC proxy config
Contract ABIs
Event definitions
terraform.tfvars
Infra settings
RPC endpoints
Or BYO node
Terraform Creates
VPC + Networking
Subnets, SGs, bastion
Compute
EC2 / EKS / k3s / bare metal
Database
PostgreSQL (RDS) or BYODB ClickHouse
Secrets
AWS Secrets Manager / K8s secrets
Config Injection
YAML + ABIs delivered to containers
You Get
eRPC Proxy
Multi-upstream failover + caching
rindexer
Indexing EVM events to your DB
Queryable Data
Events, txs, logs in SQL
SSH / kubectl
Full access to your infra

Prerequisites

ToolVersionInstall
Terraform>= 1.5.0terraform.io/downloads
AWS CLIv2docs.aws.amazon.com/cli
jqanybrew install jq or apt install jq
SSH key pairEd25519 or RSAssh-keygen -t ed25519

Optional (for development/QA):

ToolPurposeInstall
tflintTerraform lintingbrew install tflint
checkovSecurity scanningpip install checkov
DockerLocalStack testingdocker.com

AWS Credentials

Configure AWS CLI with credentials that have EC2, VPC, IAM, and Secrets Manager permissions:

aws configure
# Or export environment variables:
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret
export AWS_DEFAULT_REGION=us-east-1

SSH Key

If you don't have one:

ssh-keygen -t ed25519 -C "evm-cloud" -f ~/.ssh/evm-cloud
# Public key: ~/.ssh/evm-cloud.pub
# Private key: ~/.ssh/evm-cloud

Your First Deployment

We'll use the minimal_aws_byo_clickhouse example — EC2 instance running eRPC + rindexer with an external ClickHouse database.

1. Clone and Navigate

git clone https://github.com/ExoMonk/evm-cloud.git
cd evm-cloud/examples/minimal_aws_byo_clickhouse

2. Configure Secrets

cp secrets.auto.tfvars.example secrets.auto.tfvars

Edit secrets.auto.tfvars with your values:

# SSH key (the public key content, not the path)
ssh_public_key = "ssh-ed25519 AAAA... your-email"
 
# ClickHouse connection (from ClickHouse Cloud or your own instance)
indexer_clickhouse_url      = "https://your-instance.clickhouse.cloud:8443"
indexer_clickhouse_password = "your-password"

Don't have ClickHouse? Sign up for ClickHouse Cloud free tier, or use the minimal_aws_rds example instead (uses managed PostgreSQL, no external DB needed).

3. Initialize and Plan

terraform init
terraform plan -var-file=minimal_clickhouse.tfvars

Review the plan. You should see resources for:

  • VPC, subnets, security groups
  • EC2 instance (t3.micro — AWS free tier eligible)
  • IAM role + Secrets Manager secret
  • Docker Compose services (eRPC + rindexer)

4. Apply

terraform apply -var-file=minimal_clickhouse.tfvars

This takes 3-5 minutes. Terraform will:

  1. Create a VPC with public subnets
  2. Launch an EC2 instance with Docker pre-installed
  3. Deploy eRPC (RPC proxy) and rindexer (indexer) as Docker containers
  4. Wire rindexer to your ClickHouse database via Secrets Manager

5. Verify

# Get the instance IP
terraform output -json workload_handoff | jq -r '.runtime.ec2.public_ip'
 
# SSH into the instance
ssh -i ~/.ssh/evm-cloud ubuntu@<public-ip>
 
# Check containers are running
sudo docker compose -f /opt/evm-cloud/docker-compose.yml ps

You should see erpc and rindexer containers in running state.

6. Teardown

terraform destroy -var-file=minimal_clickhouse.tfvars

What Just Happened

Here's what Terraform created and how data flows:

Upstream RPCs (Infura, Alchemy, public)inbound
AWS VPCEC2 Instance (t3.micro — free tier)
eRPC Proxy
Aggregates upstream RPCs with failover + caching
rindexer
Reads blocks via eRPC, decodes events, writes to DB
Secrets Manager
DB credentials injected at runtime via .env
ClickHouse Cloud (your database)outbound
Key components:
  • eRPC aggregates multiple RPC endpoints with automatic failover, caching, and load balancing
  • rindexer reads your rindexer.yaml config to index specific contracts/events into your database
  • Secrets Manager securely stores database credentials and injects them at runtime

Next Steps

Other Starting Points

If you want...Use this example
Managed PostgreSQL (no external DB)minimal_aws_rds
Kubernetes (EKS)aws_eks_BYO_clickhouse
Lightweight Kubernetes (k3s, no EKS fee)minimal_aws_k3s_byo_clickhouse
Any VPS, no AWSbare_metal_byo_clickhouse
Infra only (deploy workloads yourself)minimal_aws_external_ec2_byo or external_eks