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
| Variable | Description |
|---|---|
ETHEREUM_JSONRPC_HTTP_URL | Primary JSON-RPC endpoint |
ETHEREUM_JSONRPC_TRACE_URL | Endpoint with trace_*/debug_* support (for internal txs) |
ETHEREUM_JSONRPC_WS_URL | WebSocket endpoint for real-time block following |
CHAIN_ID | Numeric chain ID (e.g. 50 for XDC Network) |
Example — XDC Network mainnet:
ETHEREUM_JSONRPC_HTTP_URL=https://rpc.xdc.orgETHEREUM_JSONRPC_TRACE_URL=https://rpc.xdc.orgETHEREUM_JSONRPC_WS_URL=wss://ws.xdc.orgCHAIN_ID=50Instance identity
| Variable | Description |
|---|---|
NETWORK | Network name shown in the UI header |
SUBNETWORK | Instance name (e.g. “XDC Mainnet”) |
COIN | Native coin symbol (e.g. XDC) |
COIN_NAME | Native coin display name |
LOGO | Path/URL to the header logo |
FOOTER_LOGO | Path/URL to the footer logo |
Database
| Variable | Description |
|---|---|
DATABASE_URL | Full PostgreSQL connection string |
DATABASE_URL=postgresql://openscan:secret@db:5432/blockscoutUse 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
| Variable | Description |
|---|---|
API_RATE_LIMIT | Global anonymous rate limit (requests/second) |
API_RATE_LIMIT_BY_KEY | Limit for keyed requests |
API_V2_ENABLED | Enable the v2 API (default: enabled) |
Indexer tuning
| Variable | Description |
|---|---|
INDEXER_DISABLE_PENDING_FETCHER | Disable pending transaction fetching |
INDEXER_MEMORY_LIMIT | Memory ceiling for indexer processes |
FIRST_BLOCK / LAST_BLOCK | Bound 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_*):
NEXT_PUBLIC_API_HOST=explorer.example.comNEXT_PUBLIC_API_BASE_PATH=/api/v2NEXT_PUBLIC_NETWORK_NAME="XDC Mainnet"NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=XDCApplying changes
Docker Compose:
docker compose up -d --force-recreate backend frontendSource install: restart the server process. Database migrations run automatically on boot when required.
Next steps
- Connecting to a Network — RPC endpoints for supported chains
- Production Deployment
- Operations Command Reference