Configuration

October 26, 2024 ยท View on GitHub

The following files can be modified to personalize your node configuration, but generally most of them should be left as-is. All these files will be created from a sample copy if they don't exist at runtime (for example .env is created from sample.env ).
Note: Burnchchain environment variables defined in ./env will overwrite values in Config.toml files for mainnet/testnet when services are started

  • .env
  • ./conf/mainnet/Config.toml
  • ./conf/mainnet/Signer.toml
  • ./conf/testnet/Config.toml
  • ./conf/testnet/Signer.toml

Environment Variables

Most variables in .env shouldn't be modified, but there are a few you may wish to change before starting the services.

Global Settings

NameDescriptionDefault Value
VERBOSEEnables verbose logging when ./manage.sh is invokedfalse
DOCKER_NETWORKName of docker network used to launch servicesstacks
EXPOSE_POSTGRESExpose postgres service to the host OSfalse
STACKS_BLOCKCHAIN_VERSIONStacks Blockchain Docker image versionlatest released version
STACKS_SIGNER_VERSIONStacks Signer Docker image versionlatest released version
STACKS_BLOCKCHAIN_API_VERSIONStacks Blockchain API Docker image versionlatest released version
POSTGRES_VERSIONPostgres Docker image version14
NGINX_PROXY_PORTHTTP port for the nginx proxy80

Stacks Signer Settings

You must set values for the SIGNER_PRIVATE_KEY on the specific network if you're running a signer, otherwise they can be left empty.

NameDescriptionDefault Value
AUTH_TOKENAuthorization token for HTTP requests made from the signer to your Stacks node1234
SIGNER_PRIVATE_KEYThe private key of the signer, on mainnet.
TESTNET_SIGNER_PRIVATE_KEYThe private key of the signer, on testnet.
STACKS_SIGNER_PORTThe port where the signer will expose an RPC endpoint for receiving events from your Stacks node30000
SIGNER_METRICS_PORTThe port where the signer will expose an endpoint for reading metrics9154

API Settings

Recommened to leave these settings as is

NameDescriptionDefault Value
NODE_ENVApplication environment the API is runningproduction
GIT_TAGApplication Git tagmaster
PG_HOSTHost of the postgres instance for the API's datastorepostgres
PG_PORTPort of the postgres service5432
PG_USERPostgres usernamepostgres
PG_PASSWORDPostgres passwordpostgres
PG_DATABASEPostgres database namepostgres
PG_SHMSIZEShared memory size for Postgres256MB
STACKS_CORE_EVENT_PORTPort to accept incoming Stacks Blockchain events3700
STACKS_CORE_EVENT_HOSTIPv4 to accept incoming Stacks Blockchain events0.0.0.0
STACKS_BLOCKCHAIN_API_PORTPort to run the HTTP interface3999
STACKS_BLOCKCHAIN_API_HOSTIPv4 to run the HTTP interface0.0.0.0
STACKS_BLOCKCHAIN_API_DBDatabase type to store datapg
STACKS_CORE_RPC_HOSTFQDN of the Stacks Blockchain service for RPC proxy requestsstacks-blockchain
STACKS_CORE_RPC_PORTRPC port of the Stacks Blockchain service20443
STACKS_CORE_P2P_PORTP2P port of the Stacks Blockchain service20444
STACKS_EXPORT_EVENTS_FILEFile to store the API events file.
Locally this is stored at ./persistent-data/<network>/event-replay/
/tmp/event-replay/stacks-node-events.tsv

Options commented out by default

NameDescriptionDefault Value
STACKS_API_ENABLE_FT_METADATAEnables storing metadata for fungible events0
STACKS_API_ENABLE_NFT_METADATAEnables storing metadata for non-fungible events0
STACKS_API_TOKEN_METADATA_ERROR_MODEToken metadata error handling levelwarning
BNS_IMPORT_DIRRequired with a path to import/use legacy BNS data/bns-data

Stacks Blockchain Settings

NameDescriptionValue
RUST_BACKTRACEDisplay full rust backtrace on unexepcted binary exitfull
STACKS_LOG_DEBUGVerbose output logs0
STACKS_LOG_JSONOutput logs in json format0
STACKS_SHUTDOWN_TIMEOUTTime to wait for Stacks Blockchain to shutdown properly.
recommended to leave this at the default
1200
NODE_METRICS_PORTThe port where the node will expose an endpoint for reading metrics9153

Burnchain Settings

Mainnet Burnchain Defaults

NameDescriptionDefault Value
BTC_HOSTFQDN of bitcoin mainnnet hostbitcoin.mainnet.stacks.org
BTC_RPC_USERRPC username for bitcoin mainnet hoststacks
BTC_RPC_PASSRPC password for bitcoin mainnet hostfoundation
BTC_RPC_PORTRPC port for bitcoin mainnet host8332
BTC_P2P_PORTP2P port for bitcoin mainnet host8333

Testnet Burnchain Defaults

NameDescriptionDefault Value
TBTC_HOSTFQDN of bitcoin testnet hostbitcoin.regtest.hiro.so
TBTC_RPC_PORTRPC port for bitcoin testnet host18332
TBTC_P2P_PORTP2P port for bitcoin testnet host18333