Skip to main content

Configuration

filmine-relay's commands need correct parameters to run. For practical reasons, most of those parameters can be set through environment variables. This way you may ommit passing some mandatory configuration settings on each CLI command.

In a typical setup, you would need a lotus-miner rpc endpoint and admin token. Those can be eather passed as params or set as env vars.

Example 1: params:

Passing all props as CLI parameters might be long, hard and messy:

./filmine-relay healthcheck --lotus-miner-api="http://127.0.0.1:2345" --lotus-miner-token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.o8s1h8kfpIWgXX7cMAb6mLRTwidnvQBoACX5Mw60s74"

Example 2: env vars

Export vars once:

export FILMINE_RELAY_LOTUS_MINER_API_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0.o8s1h8kfpIWgXX7cMAb6mLRTwidnvQBoACX5Mw60s74

export FILMINE_RELAY_LOTUS_MINER_API=https://MY-MINERS-ADDRESS:2345/

and execute simple commans afterwars:

./filmine-relay healthcheck

Parameters:

List of common parameters and matching ENV variables:

CLI Param nameENV Variable nameDefault
lotus-miner-apiFILMINE_RELAY_LOTUS_MINER_APIhttp://127.0.0.1:2345
lotus-miner-tokenFILMINE_RELAY_LOTUS_MINER_API_TOKEN/