Deploying ENSNode with Docker
The Docker images are the easiest way to run or deploy the ENSNode suite of services, both locally and in the cloud.
ENSIndexer runs CREATE EXTENSION IF NOT EXISTS pg_trgm at startup to back partial-name search indexes. If you’re swapping out the bundled postgres:17 image for a managed or custom Postgres, make sure the pg_trgm extension is available for installation (it ships with stock Postgres contrib and is available for installation on most managed providers).
ENSNode provides several Docker Compose files for different use cases:
docker/docker-compose.yml— base stack for mainnet/sepolia: ensindexer, ensapi, ensrainbow, ensadmin, postgresdocker/docker-compose.devnet.yml— full stack against local devnet (ens-test-env), works out of the box with no configuration required
Mainnet / Sepolia
Section titled “Mainnet / Sepolia”Copy the example env file and configure it:
cp docker/envs/.env.docker.example docker/envs/.env.docker.localEdit docker/envs/.env.docker.local to set your NAMESPACE, PLUGINS, and RPC endpoints (e.g. ALCHEMY_API_KEY or RPC_URL_1), then run:
docker compose -f docker/docker-compose.yml up -dLocal devnet
Section titled “Local devnet”Configuration is optional. To customize defaults (e.g. change PLUGINS), copy the example as in previous step and edit it.
Otherwise, skip setup and run directly:
docker compose -f docker/docker-compose.devnet.yml up -dNote that while the default docker-compose.yml exposes each container’s port to the host machine (useful for development), you may only wish to expose ENSApi’s 4334 and avoid exposing services like ENSRainbow, ENSAdmin, and Postgres to the wider internet.