# Environmental Variables
# Overview
The AR.IO Gateway allows configuration customization through environmental variables. These variables dictate the gateway's behavior, from block synchronization settings to log formatting. Detailed below is a table enumerating all available environmental variables, their respective types, default values, and a brief description. Note that certain variables, such as SANDBOX_PROTOCOL
, rely on others (e.g., ARNS_ROOT_HOST
) to function effectively. Ensure proper understanding of these dependencies when configuring.
# Variables
ENV Name | Type | Default Value | Description |
---|---|---|---|
START_HEIGHT | Number or "Infinity" | 0 | Starting block height for node synchronization (0 = start from genesis block) |
STOP_HEIGHT | Number or "Infinity" | "Infinity" | Stop block height for node synchronization (Infinity = keep syncing until stopped) |
TRUSTED_NODE_URL | String | "https://arweave.net" | Arweave node to use for fetching data |
TRUSTED_GATEWAY_URL | String | "https://arweave.net" | Arweave node to use for proxying reqeusts |
TRUSTED_ARNS_GATEWAY_URL | String | https://NAME.arweave.dev | ArNS gateway |
INSTANCE_ID | String | "" | Adds an "INSTANCE_ID" field to output logs |
LOG_FORMAT | String | "simple" | Sets the format of output logs, accepts "simple" and "json" |
SKIP_CACHE | Boolean | false | If true, skips the local cache and always fetches headers from the node |
PORT | Number | 4000 | AR.IO node exposed port number |
SIMULATED_REQUEST_FAILURE_RATE | Number | 0 | Number from 0 to 1, representing the probability of a request failing |
AR_IO_WALLET | String | "" | Arweave wallet address used for staking and rewards |
ADMIN_API_KEY | String | Generated | API key used for admin API requests (if not set, it is generated and logged into the console) |
BACKFILL_BUNDLE_RECORDS | Boolean | false | If true, AR.IO node will start indexing missing bundles |
FILTER_CHANGE_REPROCESS | Boolean | false | If true, all indexed bundles will be reprocessed with the new filters (you can use this when you change the filters) |
ANS104_UNBUNDLE_FILTER | String | {"never": true} | Only bundles compliant with this filter will be unbundled |
ANS104_INDEX_FILTER | String | {"never": true} | Only bundles compliant with this filter will be indexed |
ARNS_ROOT_HOST | String | undefined | Domain name for ArNS host |
SANDBOX_PROTOCOL | String | undefined | Protocol setting in process of creating sandbox domains in ArNS (ARNS_ROOT_HOST needs to be set for this env to have any effect) accepts "http" or "https" |
START_WRITERS | Boolean | true | If true, start indexing blocks, tx, ANS104 bundles |
RUN_OBSERVER | Boolean | true | If true, runs the Observer alongside the gateway to generate Network compliance reports |
MIN_RELEASE_NUMBER | string | "0" | Sets the minimum Gateway release version to check while doing a gateway version assessment|
AR_IO_NODE_RELEASE | string | "0" | Sets the current ar.io node version to be set on X-AR-IO-Node-Release header on requests to the reference gateway|
OBSERVER_WALLET | String | undefined | The public wallet address of the wallet being used to sign report upload transactions for Observer |
CHUNKS_DATA_PATH | string | "data/chunks" | Sets the location for chunked data to be saved. If omitted, chunked data will be stored in the `data` directory|
CONTIGUOUS_DATA_PATH | string | "data/contiguous" | Sets the location for contiguous data to be saved. If omitted, contiguous data will be stored in the `data` directory|
HEADERS_DATA_PATH | string | "data/headers" | Sets the location for header data to be saved. If omitted, header data will be stored in the `data` directory|
SQLITE_DATA_PATH | string | "data/sqlite" | Sets the location for sqlite indexed data to be saved. If omitted, sqlite data will be stored in the `data` directory|
TEMP_DATA_PATH | string | "data/tmp" | Sets the location for temporary data to be saved. If omitted, temporary data will be stored in the `data` directory|
LMDB_DATA_PATH | string | "data/LMDB" | Sets the location for LMDB data to be saved. If omitted, LMDB data will be stored in the `data` directory|
CHAIN_CACHE_TYPE | String | "redis" | Sets the method for caching chain data, defaults to redis if gateway is started with docker-compose, otherwise defaults to LMDB |
REDIS_CACHE_URL | String (URL) | "redis://localhost:6379" | URL of Redis database to be used for caching |
REDIS_CACHE_TTL_SECONDS | Number | 28800 | TTL value for Redis cache, defaults to 8 hours (28800 seconds) |
ENABLE_FS_HEADER_CACHE_CLEANUP | Boolean | false | If true, periodically deletes cached header data |
NODE_JS_MAX_OLD_SPACE_SIZE | Number | system default | Sets the memory limit, in Megabytes, for NodeJs. Default value depends on hardware |
SUBMIT_CONTRACT_INTERACTIONS | Boolean | true | If true, Observer will submit its generated reports to the ar.io Network. If false, reports will be generated but not submitted |
REDIS_MAX_MEMORY | String | 256mb | Sets the max memory allocated to Redis |
REDIS_EXTRA_FLAGS | String | --save "" --appendonly no | Additional CLI flags passed to Redis |
WEBHOOK_TARGET_SERVERS | String | undefined | Target servers for webhooks |
WEBHOOK_INDEX_FILTER | String | {"never": true} | Only emit webhooks for transactions and data items compliant with this filter |
WEBHOOK_BLOCK_FILTER | String | {"never": true} | Only emit webhooks for blocks compliant with this filter |
CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD | Number | undefined | Sets the age threshold in seconds; files older than this are candidates for contiguous data cache cleanup |
RUN_RESOLVER | Boolean | false | If true, enables the experimental local ArNS resolver service |
TRUSTED_ARNS_RESOLVER_TYPE | String | gateway | Sets the type of ArNS resolver the gateway will use, either `gateway` or `resolver`. Set `resolver` to use experimental local ArNS resolver. |
TRUSTED_ARNS_RESOLVER_URL | String | https:__NAME__.arweave.dev | Sets the url a gateway will use to request ArNS name resolution when type is set to `resolver` |
ENABLE_MEMPOOL_WATCHER | Boolean | false | If true, the gateway will start indexing pending tx from the mempool |
MEMPOOL_POLLING_INTERVAL_MS | Number | 30000 | Sets the mempool Polling interval, in milliseconds |