Instance Configuration

Configure your OpenScan.AI instance with environment variables.

Prerequisite: Install the instance first. See the installation guide.

All configuration is via environment variables. With Docker Compose, set them in envs/common-blockscout.env; with a source install, export them or use a .env file before starting the server.


Chain connection

VariableDescription
ETHEREUM_JSONRPC_HTTP_URLPrimary JSON-RPC endpoint
ETHEREUM_JSONRPC_TRACE_URLEndpoint with trace_*/debug_* support (for internal txs)
ETHEREUM_JSONRPC_WS_URLWebSocket endpoint for real-time block following
CHAIN_IDNumeric chain ID (e.g. 50 for XDC Network)

Example — XDC Network mainnet:

Terminal window
ETHEREUM_JSONRPC_HTTP_URL=https://rpc.xdc.org
ETHEREUM_JSONRPC_TRACE_URL=https://rpc.xdc.org
ETHEREUM_JSONRPC_WS_URL=wss://ws.xdc.org
CHAIN_ID=50

Instance identity

VariableDescription
NETWORKNetwork name shown in the UI header
SUBNETWORKInstance name (e.g. “XDC Mainnet”)
COINNative coin symbol (e.g. XDC)
COIN_NAMENative coin display name
LOGOPath/URL to the header logo
FOOTER_LOGOPath/URL to the footer logo

Database

VariableDescription
DATABASE_URLFull PostgreSQL connection string
Terminal window
DATABASE_URL=postgresql://openscan:secret@db:5432/blockscout

Use a strong password and, in production, a database outside the compose stack or with persistent volumes and backups — see Maintenance & Operations.

API and rate limits

VariableDescription
API_RATE_LIMITGlobal anonymous rate limit (requests/second)
API_RATE_LIMIT_BY_KEYLimit for keyed requests
API_V2_ENABLEDEnable the v2 API (default: enabled)

Indexer tuning

VariableDescription
INDEXER_DISABLE_PENDING_FETCHERDisable pending transaction fetching
INDEXER_MEMORY_LIMITMemory ceiling for indexer processes
FIRST_BLOCK / LAST_BLOCKBound the indexed range (useful for dev/testing)

For a quick devnet instance, set FIRST_BLOCK=0 and leave LAST_BLOCK unset. For a test sync of a large chain, bounding the range keeps the database small.

Frontend

Frontend variables live in the frontend env file (NEXT_PUBLIC_*):

Terminal window
NEXT_PUBLIC_API_HOST=explorer.example.com
NEXT_PUBLIC_API_BASE_PATH=/api/v2
NEXT_PUBLIC_NETWORK_NAME="XDC Mainnet"
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=XDC

Applying changes

Docker Compose:

Terminal window
docker compose up -d --force-recreate backend frontend

Source install: restart the server process. Database migrations run automatically on boot when required.

Next steps