Skip to main content

Configuration

Bee uses the Toml standard as a configuration file. If you are unsure about syntax, you can have a look at the official Toml specifications.

The default configuration file is config.toml. You can change the configuration file's path or name by using the -c or --config flag.

For example:

bee -c config_example.toml

Node#

NameDescriptionType
identityhex representation of an Ed25519 keypair. Can be generated with the bee p2pidentity toolstring
aliasalias for your node. Shows up in dashboardstring
bech32_hrpnetwork address identifierstring
network_idnetwork identifierstring

Logger#

NameDescriptionType
color_enabledstdout it colored if enabledbool
target_widthwidth of the target section of a loginteger[usize]
level_widthwidth of the level section of a loginteger[usize]
outputsconfig for different log filtersarray

Outputs#

NameDescriptionType
namestandard stream or filestring
level_filterlog level filter of an outputstring
target_filterlog target filters of an outputarray of strings

Example:

[logger]color_enabled = truetarget_width = 42level_width = 5[[logger.outputs]]name           = "stdout"level_filter   = "info" # other possible values are: "error", "warn", "info", "debug", "trace"target_filters = ["bee_network"] [[logger.outputs]]name           = "error.log"level_filter   = "error"

Network#

NameDescriptionType
bind_addressthe address/es the networking layer tries binding tostring[Multiaddr]
reconnect_interval_secsthe automatic reconnect interval in seconds for known peersinteger[u64]
max_unknown_peersmax count of allowed unknown peersinteger[usize]
peeringarray of static peersarray of tables

Peering#

NameDescriptionType
addresslibp2p formatted address(PeerID can be found on the dashboard or in the logs. It starts with 12D3)string
aliasalias of the peerstring

Example:

[network]bind_address             = "/ip4/0.0.0.0/tcp/15600"reconnect_interval_secs  = 30max_unknown_peers        = 4
[network.peering][[network.peering.peers]]address = "/ip4/192.0.2.0/tcp/15600/p2p/PeerID"alias   = "some peer"[[network.peering.peers]]address = "/ip6/2001:db8::/tcp/15600/p2p/PeerID"alias   = "another peer"[[network.peering.peers]]address = "/dns/example.com/tcp/15600/p2p/PeerID"alias   = "yet another peer"

Protocol#

NameDescriptionType
minimum_pow_scorethe minimum pow scorefloat[f64]
coordinatorcoordinator configstable
workersworker configstable

Coordinator#

NameDescriptionType
public_key_countnumber of public keysinteger[usize]
public_key_rangespublic key rangesarray of tables

public_key_ranges#

NameDescriptionType
public_keypublic keystring
startstartinteger[u32]
endendinteger[u32]

Workers#

NameDescriptionType
message_worker_cacheTO-DOinteger[usize]
status_intervalstatus interval in msinteger[u64]
ms_sync_countmilestone sync countinteger[u32]

Example:

[protocol]minimum_pow_score = 4000handshake_window = 10[protocol.coordinator]public_key_count  = 2[[protocol.coordinator.public_key_ranges]]public_key  = "7205c145525cee64f1c9363696811d239919d830ad964b4e29359e6475848f5a"start       = 0end         = 0[[protocol.coordinator.public_key_ranges]]public_key  = "e468e82df33d10dea3bd0eadcd7867946a674d207c39f5af4cc44365d268a7e6"start       = 0end         = 0[[protocol.coordinator.public_key_ranges]]public_key  = "0758028d34508079ba1f223907ac3bb5ce8f6bdccc6b961c7c85a2f460b30c1d"start       = 0end         = 0[protocol.workers]message_worker_cache = 10000status_interval = 10ms_sync_count = 200

REST API#

NameDescriptionType
binding_portbinding port for rest APIinteger[u16]
binding_ip_addrbinding address for rest APIstring[IpAddr]
feature_proof_of_workenable powbool
white_flag_solidification_timeoutwhite flag solidification timeoutinteger[u64]
public_routesAPI routes which should be publicarray of strings
allowed_ipslist of whitelisted IPsstring[IpAddr]

Example:

[rest_api]binding_port          = 14265binding_ip_addr       = "0.0.0.0"feature_proof_of_work = truepublic_routes         = [    "/api/v1/peers",    "/api/v1/addresses/:address",    "/api/v1/addresses/ed25519/:address",    "/health",    "/api/v1/info",    "/api/v1/messages/:messageId",    "/api/v1/messages/:messageId/children",    "/api/v1/messages/:messageId/metadata",    "/api/v1/messages/:messageId/raw",    "/api/v1/messages",    "/api/v1/milestones/:milestoneIndex",    "/api/v1/milestones/:milestoneIndex/utxo-changes",    "/api/v1/outputs/:outputId",    "/api/v1/addresses/:address/outputs",    "/api/v1/addresses/ed25519/:address/outputs",    "/api/v1/peers/:peerId",    "/api/v1/peers",    "/api/v1/peers/:peerId",    "/api/v1/messages",    "/api/v1/messages",    "/api/v1/tips",    "/api/v1/receipts",    "/api/v1/receipts/:milestoneIndex",    "/api/v1/treasury",    "/api/v1/transactions/:transactionId/included-message",    "/api/plugins/debug/whiteflag",]allowed_ips = [    "127.0.0.1",    "::1"]white_flag_solidification_timeout = 2

Snapshot#

NameDescriptionType
full_pathpath to the full snapshot filestring
delta_pathpath to the delta snapshot filestring
download_urlslist of download URLs for the snapshotarray of strings
depththe depth, respectively the starting point, at which a snapshot of the ledger is generatedinteger[u32]
interval_syncedinterval, in milestones, at which snapshot files are created if the node is syncinteger[u32]
interval_unsyncedinterval, in milestones, at which snapshot files are created if the node is unsyncinteger[u32]

Example:

[snapshot]full_path         = "./snapshots/alphanet/full_snapshot.bin"delta_path        = "./snapshots/alphanet/delta_snapshot.bin"download_urls     = [  "https://dbfiles.testnet.chrysalis2.com/",]depth             = 50interval_synced   = 50interval_unsynced = 1000

Pruning#

NameDescriptionType
enabledenable pruningbool
delayamount of milestone cones to keep in the databaseinteger[u32]
prune_receiptswhether to delete old receipts data from the databasebool

Example:

[pruning]enabled         = truedelay           = 60480prune_receipts  = false

Storage#

NameDescriptionType
pathpath to the databasestring
create_if_missingTO-DObool
create_missing_column_familiesTO-DObool
enable_statisticsTO-DObool
increase_parallelismTO-DOinteger[i32]
optimize_for_point_lookupTO-DOinteger[u64]
optimize_level_style_compactionTO-DOinteger[usize]
optimize_universal_style_compactionTO-DOinteger[usize]
set_advise_random_on_openTO-DObool
set_allow_concurrent_memtable_writeTO-DObool
set_allow_mmap_readsTO-DObool
set_allow_mmap_writesTO-DObool
set_atomic_flushTO-DObool
set_bytes_per_syncTO-DOinteger[u64]
set_compaction_readahead_sizeTO-DOinteger[usize]
set_max_write_buffer_numberTO-DOinteger[i32]
set_write_buffer_sizeTO-DOinteger[usize]
set_db_write_buffer_sizeTO-DOinteger[usize]
set_disable_auto_compactionsTO-DObool
set_unordered_writeTO-DObool
set_use_direct_io_for_flush_and_compactionTO-DObool
storageTO-DOtable
set_compaction_styleTO-DOstring
set_compression_typeTO-DOstring
envTO-DOtable

Storage#

NameDescriptionType
fetch_edge_limitTO-DOinteger[usize]
fetch_index_limitTO-DOinteger[usize]
fetch_output_id_limitTO-DOinteger[usize]
iteration_budgetTO-DOinteger[usize]

Env#

NameDescriptionType
set_background_threadsTO-DOinteger[i32]
set_high_priority_background_threadsTO-DOinteger[i32]

Example:

[storage]path = "./storage/alphanet"create_if_missing = truecreate_missing_column_families = trueenable_statistics = falseincrease_parallelism = 4 # defaults to the number of cpu coresoptimize_for_point_lookup = 67108864 # 64 MiBoptimize_level_style_compaction = 0optimize_universal_style_compaction = 0set_advise_random_on_open = trueset_allow_concurrent_memtable_write = trueset_allow_mmap_reads = falseset_allow_mmap_writes = falseset_atomic_flush = falseset_bytes_per_sync = 0set_compaction_readahead_size = 0set_max_write_buffer_number = 2set_write_buffer_size = 67108864 # 64 MiBset_db_write_buffer_size = 67108864 # 64 MiBset_disable_auto_compactions = falseset_unordered_write = trueset_use_direct_io_for_flush_and_compaction = trueset_compaction_style = "Fifo" # other possible values are: "Level", "Universal"set_compression_type = "None" # other possible values are: "Snappy", "Zlib", "Bz2", "Lz4", "Lz4hc", "Zstd"[storage.storage]fetch_edge_limit = 1000fetch_index_limit = 1000fetch_output_id_limit = 1000iteration_budget = 100[storage.env]set_background_threads = 4 # defaults to the number of cpu coresset_high_priority_background_threads = 2

Tangle#

NameDescriptionType
below_max_depthTO-DOstring

Example

[tangle]below_max_depth = 15

Mqtt#

NameDescriptionType
addressaddressstring

Example:

[mqtt]address = "tcp://localhost:1883"

Dashboard#

NameDescriptionType
portdashboard portinteger[u16]
authdashboard authtable

Auth#

NameDescriptionType
session_timeoutexpiration time of the authentication in secondsinteger[u64]
useruserString
password_saltpassword salt. Can be generated with the bee password toolString
password_hashpassword hash. Can be generated with the bee password toolString

Example:

[dashboard]port  = 8081[dashboard.auth]session_timeout = 86400user            = "admin"password_salt   = "0000000000000000000000000000000000000000000000000000000000000000"password_hash   = "0000000000000000000000000000000000000000000000000000000000000000"