Skip to content

Node Configuration

Magi nodes may be configured through a set of JSON files located in the config/ directory of the node’s data directory. These files are created automatically when running the node with the -init flag.

Configures the MongoDB connection used by the node.

FieldTypeDefaultDescription
DbURIstringmongodb://localhost:27017MongoDB connection URI
DbNamestringgo-vscName of the database
dbConfig.json
{
"DbURI": "mongodb://localhost:27017",
"DbName": "go-vsc"
}

Configures the GraphQL API server.

FieldTypeDefaultDescription
HostAddrstring0.0.0.0:8080Host address and port to bind the GraphQL server to
MaxComplexityint10000Maximum query complexity allowed per request. Requests exceeding this limit are rejected
gqlConfig.json
{
"HostAddr": "0.0.0.0:8080",
"MaxComplexity": 10000
}

The GraphQL sandbox is available at http://<HostAddr>/sandbox when the node is running.

Configures the Hive API endpoints used for block streaming and transaction broadcasting.

FieldTypeDefaultDescription
HiveURIsstring[]See belowList of Hive API node URLs. The node will use these endpoints for reading Hive blockchain data
hiveConfig.json
{
"HiveURIs": [
"https://api.hive.blog",
"https://techcoderx.com",
"https://hive-api.3speak.tv",
"https://api.openhive.network",
"https://api.deathwing.me"
]
}

Configures the node’s cryptographic identity and Hive account credentials.

FieldTypeDefaultDescription
HiveUsernamestring(empty)Hive account username for the witness
HiveActiveKeystring(empty)Hive account active key in WIF format, used for signing transactions on the Hive blockchain
BlsPrivKeySeedstring(generated)BLS private key seed used for threshold signatures. Generated automatically on -init
Libp2pPrivKeystring(generated)libp2p private key for P2P network identity. Generated automatically on -init
identityConfig.json
{
"BlsPrivKeySeed": "<generated>",
"HiveActiveKey": "ADD_YOUR_PRIVATE_WIF",
"HiveUsername": "ADD_YOUR_USERNAME",
"Libp2pPrivKey": "<generated>"
}

Configures external chain RPC connections used by the oracle module.

FieldTypeDescription
ChainsobjectMap of chain identifiers to their RPC configuration
Chains.<ID>.RpcHoststringRPC host and port for the chain (e.g. bitcoind:48332)
Chains.<ID>.RpcUserstringRPC username
Chains.<ID>.RpcPassstringRPC password
oracleConfig.json
{
"Chains": {
"BTC": {
"RpcHost": "bitcoind:48332",
"RpcUser": "vsc-node-user",
"RpcPass": "vsc-node-pass"
}
}
}

Currently BTC is the only supported chain identifier.

Configures the libp2p networking layer.

FieldTypeDefaultDescription
Portint10720TCP port to listen on for P2P connections
ServerModeboolfalseWhen true, runs the Kademlia DHT in server mode, making this node reachable for peer discovery. Recommended for nodes with a stable public IP
AllowPrivateboolfalseWhen true, allows connections to and announcement of private/LAN IP addresses. Useful for local devnets
Bootnodesstring[][]List of bootstrap peer multiaddresses used for initial peer discovery. If empty, the node falls back to the built-in default bootnodes
AnnounceAddrsstring[][]Explicit multiaddresses to announce to the network. When set, overrides automatic address detection
p2pConfig.json
{
"Port": 10720,
"ServerMode": false,
"AllowPrivate": false,
"Bootnodes": [],
"AnnounceAddrs": []
}

Bootnodes are specified as libp2p multiaddresses, for example:

/ip4/1.2.3.4/tcp/10720/p2p/12D3KooW...