Skip to main content

Getting Started

Set up and run an Airnode in under 5 minutes.

Who should run an Airnode

Airnode is designed for API providers to serve their own data on-chain. You should be the API provider or an authorized representative of the API provider. This is what makes Airnode a first-party oracle — the entity that controls the data source also controls the signing key.

If you are not the API provider, the trust properties change fundamentally. Consumers cannot verify that you are honestly relaying data from the upstream API, and DNS identity verification will only prove your domain — not the API provider's. See the Trust Model for details.

1. Generate a key

airnode generate-mnemonic

This outputs a private key and its corresponding Ethereum address. The address is your Airnode's on-chain identity.

2. Create config.yaml

version: '1.0'

server:
port: 3000

settings:
proof: none

apis:
- name: MyAPI
url: https://api.example.com
endpoints:
- name: getPrice
path: /price
method: GET
parameters:
- name: symbol
in: query
required: true
encoding:
type: int256
path: $.price
times: '1e18'

See the Config Reference for all available fields.

3. Create .env

AIRNODE_PRIVATE_KEY=0x...  # from step 1

Add any environment variables referenced in your config (e.g., ${COINGECKO_API_KEY}).

4. Validate

airnode config validate -c config.yaml

Fix any schema errors before starting.

5. Start

airnode start

The server starts and logs the airnode address, port, and number of endpoints.

6. Test

curl http://localhost:3000/health

Expected response:

{
"status": "ok",
"version": "2.0.0-alpha.0",
"airnode": "0x..."
}

Environment variables

VariableRequiredDescription
AIRNODE_PRIVATE_KEYYesHex-encoded private key (with 0x prefix). Signs all responses.
LOG_FORMATNotext (default) or json.
LOG_LEVELNodebug, info (default), warn, or error.

Bun automatically loads .env files from the working directory.

CLI flags

FlagDefaultDescription
-c, --config <path>config.yamlPath to the config file.
-e, --env <path>.envPath to the .env file.

Next steps

  • Deployment -- run in production with systemd, Docker, or Docker Compose
  • Config Reference -- full configuration documentation
  • Plugins -- extend Airnode with custom hooks