Skip to content

Deploying ENSNode with Terraform

This guide will help you deploy ENSNode using Terraform to Render. The Terraform configuration provides a complete infrastructure setup including database, ENSIndexer, ENSRainbow, and other required services.

Copy .env.sample to .env.local and fill in your configuration values:

Terminal window
# ENSNode configuration
ensnode_version = "0.0.0" # pin to the specific version you want to use as found at https://github.com/namehash/ensnode/releases
ensrainbow_searchlight_label_set_version = "0" # pint to the specific version, see https://ensnode.io/ensrainbow/concepts/glossary/#label_set_version
anthropic_api_key = "your_anthropic_api_key"
# Render configuration
render_api_key = "your_render_api_key"
render_owner_id = "your_render_owner_id"
render_environment = "your_render_environment"
# Mainnet RPC URLs
ethereum_mainnet_rpc_url = "your_ethereum_mainnet_rpc_url"
base_mainnet_rpc_url = "your_base_mainnet_rpc_url"
linea_mainnet_rpc_url = "your_linea_mainnet_rpc_url"
arbitrum_mainnet_rpc_url = "your_arbitrum_mainnet_rpc_url"
scroll_mainnet_rpc_url = "your_scroll_mainnet_rpc_url"
# Sepolia RPC URLs
ethereum_sepolia_rpc_url = "your_ethereum_sepolia_rpc_url"
base_sepolia_rpc_url = "your_base_sepolia_rpc_url"
linea_sepolia_rpc_url = "your_linea_sepolia_rpc_url"
optimism_sepolia_rpc_url = "your_optimism_sepolia_rpc_url"
arbitrum_sepolia_rpc_url = "your_arbitrum_sepolia_rpc_url"
scroll_sepolia_rpc_url = "your_scroll_sepolia_rpc_url"

The Terraform configuration sets up the following components:

  • Render
    • Render project and environment
    • PostgreSQL database
    • ENSIndexer services
    • ENSRainbow service
  • AWS
    • DNS configuration
  1. Initialize Terraform:
Terminal window
terraform init
  1. Review the planned changes:
Terminal window
terraform plan
  1. Apply the configuration:
Terminal window
terraform apply

To destroy the infrastructure:

Terminal window
terraform destroy