ord can be configured with the command line, environment variables, a configuration file, and default values.

The command line takes precedence over environment variables, which take precedence over the configuration file, which takes precedence over defaults.

The path to the configuration file can be given with --config <CONFIG_PATH>. ord will error if <CONFIG_PATH> doesn't exist.

The path to a directory containing a configuration file name named ord.yaml can be given with --config-dir <CONFIG_DIR_PATH> or --datadir <DATA_DIR_PATH> in which case the config path is <CONFIG_DIR_PATH>/ord.yaml or <DATA_DIR_PATH>/ord.yaml. It is not an error if it does not exist.

If none of --config, --config-dir, or --datadir are given, and a file named ord.yaml exists in the default data directory, it will be loaded.

For a setting named --setting-name on the command line, the environment variable will be named ORD_SETTING_NAME, and the config file field will be named setting_name. For example, the data directory can be configured with --datadir on the command line, the ORD_DATA_DIR environment variable, or data_dir in the config file.

See ord --help for documentation of all the settings.

ord's current configuration can be viewed as JSON with the ord settings command.

Example Configuration

# example config

# see `ord --help` for setting documentation

bitcoin_data_dir: /var/lib/bitcoin
bitcoin_rpc_password: bar
bitcoin_rpc_url: https://localhost:8000
bitcoin_rpc_username: foo
chain: mainnet
commit_interval: 10000
config: /var/lib/ord/ord.yaml
config_dir: /var/lib/ord
cookie_file: /var/lib/bitcoin/.cookie
data_dir: /var/lib/ord
first_inscription_height: 100
height_limit: 1000
- 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0
- 703e5f7c49d82aab99e605af306b9a30e991e57d42f982908a962a81ac439832i0
index: /var/lib/ord/index.redb
index_cache_size: 1000000000
index_runes: true
index_sats: true
index_spent_sats: true
index_transactions: true
integration_test: true
no_index_inscriptions: true
server_password: bar
server_url: http://localhost:8888
server_username: foo

Hiding Inscription Content

Inscription content can be selectively prevented from being served by ord server.

Unlike other settings, this can only be configured with the configuration file or environment variables.

To hide inscriptions with an environment variable:

export ORD_HIDDEN='6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0 703e5f7c49d82aab99e605af306b9a30e991e57d42f982908a962a81ac439832i0'

Or with the configuration file:

- 6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0
- 703e5f7c49d82aab99e605af306b9a30e991e57d42f982908a962a81ac439832i0