Skip to main content

Configuration

Here, you will find the more technical references of Bee.

Bee uses the JSON standard as a configuration file. If you are unsure about syntax, you can have a look at the official JSON specifications.
The default configuration file is config.json. You can change the configuration file's path or name by using the -c or --config flag.

For example:

bee -c config_example.json
info

Bee supports the TOML standard for the configuration file too. Just use a config.toml file. If you are unsure about syntax, you can have a look at the official TOML specifications.

Node

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

Logger

NameDescriptionType
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
target_exclusionslog target exclusions of an outputarray of strings
color_enabledoutput is colored if enabledbool

Example:

  "logger": {
"target_width": 42,
"level_width": 5,
"outputs": [
{
"name": "stdout",
"levelFilter": "info",
"targetFilters": ["bee_network"],
"targetExclusions": [],
"colorEnabled": true
},
{
"name": "error.log",
"levelFilter": "error",
"targetFilters": [],
"targetExclusions": ["bee_network"]
}
]
},

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": {
"bindAddress": "/ip4/0.0.0.0/tcp/15600",
"reconnectIntervalSecs": 30,
"maxUnknownPeers": 4,
"maxDiscoveredPeers": 8,
"peering": {
"peers": [
{
"address": "/ip4/192.0.2.0/tcp/15600/p2p/PeerID",
"alias": "some peer"
},
{
"address": "/ip6/2001:db8::/tcp/15600/p2p/PeerID",
"alias": "another peer"
},
{
"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": 4000,
"handshake_window": 10,
"coordinator": {
"public_key_count": 2,
"public_key_ranges": [
{
"public_key": "7205c145525cee64f1c9363696811d239919d830ad964b4e29359e6475848f5a",
"start": 0,
"end": 0
},
{
"public_key": "e468e82df33d10dea3bd0eadcd7867946a674d207c39f5af4cc44365d268a7e6",
"start": 0,
"end": 0
},
{
"public_key": "0758028d34508079ba1f223907ac3bb5ce8f6bdccc6b961c7c85a2f460b30c1d",
"start": 0,
"end": 0
}
]
},
"workers": {
"message_worker_cache": 10000,
"status_interval": 10,
"ms_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": 14265,
"binding_ip_addr": "0.0.0.0",
"feature_proof_of_work": true,
"public_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": 50,
"interval_synced": 50,
"interval_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": true,
"delay": 60480,
"prune_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": true,
"create_missing_column_families": true,
"enable_statistics": false,
"increase_parallelism": 4,
"optimize_for_point_lookup": 67108864,
"optimize_level_style_compaction": 0,
"optimize_universal_style_compaction": 0,
"set_advise_random_on_open": true,
"set_allow_concurrent_memtable_write": true,
"set_allow_mmap_reads": false,
"set_allow_mmap_writes": false,
"set_atomic_flush": false,
"set_bytes_per_sync": 0,
"set_compaction_readahead_size": 0,
"set_max_write_buffer_number": 2,
"set_write_buffer_size": 67108864,
"set_db_write_buffer_size": 67108864,
"set_disable_auto_compactions": false,
"set_unordered_write": true,
"set_use_direct_io_for_flush_and_compaction": true,
"set_compaction_style": "Fifo",
"set_compression_type": "None",
"storage": {
"fetch_edge_limit": 1000,
"fetch_index_limit": 1000,
"fetch_output_id_limit": 1000,
"iteration_budget": 100
},
"env": {
"set_background_threads": 4,
"set_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,
"auth": {
"session_timeout": 86400,
"user": "admin",
"password_salt": "0000000000000000000000000000000000000000000000000000000000000000",
"password_hash": "0000000000000000000000000000000000000000000000000000000000000000"
}
}