Skip to Content
MCN Blockchain

Node configuration

Configure data storage, service environment, RPC ports and NAT for start-mcn.

The launcher reads configuration from the cloned start-mcn directory and runtime settings from environment variables. Keep the same runtime settings in interactive commands and the systemd service.

Files and directories

Path relative to start-mcnPurpose
network/genesis.jsonExecution genesis
network/genesis.sszConsensus genesis state
network/config.yamlMCN consensus parameters
network/identity.jsonChain and genesis identifiers; client versions
execution/bootnodes.txt, execution/peers.tomlExecution peers
network/peers.jsonConsensus peers
tools/clients.jsonClient download locations and SHA-256 hashes
.mcn-data/execution/Geth database
.mcn-data/beacon/Prysm database
.mcn-data/jwt.hexShared local Engine API authentication secret
.mcn-data/.launcher/logs/Launcher and client logs

Do not edit genesis or consensus parameters to customize a server. The launcher checks the network files against SHA256SUMS.

Environment variables

VariableDefault / use
MCN_DATA_DIR.mcn-data inside the repository; absolute custom data path
MCN_PUBLIC_IPOptional public IP advertised by Geth and Prysm
MCN_CHECKPOINT_URLhttps://rpc.mcnblockchain.com; trusted Beacon API base URL
MCN_GETHOverride the Geth binary path
MCN_BEACONOverride the Prysm Beacon Chain binary path

For a new node, choose storage before its first start:

cd "$HOME/start-mcn"
export MCN_DATA_DIR="$HOME/mcn-data"
./start
./start status

Use these exports again in new shells. If a node already has data, changing the variable selects a different directory; it does not move the existing database.

Persist settings in systemd

After creating the service in the installation guide, create a drop-in. This example expands your home directory when writing the file:

mkdir -p "$HOME/.config/systemd/user/mcn-node.service.d"
cat > "$HOME/.config/systemd/user/mcn-node.service.d/environment.conf" <<UNIT
[Service]
Environment="MCN_DATA_DIR=$HOME/mcn-data"
UNIT
systemctl --user daemon-reload

Use this only when the directory matches the one selected for the node. To relocate an existing database, stop its service, copy the whole data directory with ownership and permissions preserved, set the new path, then restart and inspect status. Keep the old copy until recovery is confirmed. Never copy a live database as if it were a consistent backup.

Ports

InterfaceDefaultExposure
Geth JSON-RPCTCP 8545 on 127.0.0.1Local applications or private access
Engine APITCP 8551 on 127.0.0.1Local, JWT authenticated
Beacon RESTTCP 3500 on 127.0.0.1Local
Beacon gRPCTCP 4000 on 127.0.0.1Local validator client
Prysm metricsTCP 8080 on 127.0.0.1Local monitoring
Geth P2PTCP/UDP 30303Public peer connectivity
Prysm P2PTCP/UDP 13000 and UDP 12000Public peer connectivity

Change the execution RPC port

Geth's setting is --http.port. In the current launcher, change both --http.port=8545 inside geth_options() and LOCAL_RPC near the top of mcn-node to the new port. Stop the node before editing, restart afterwards, and check ./start status. Keep the address bound to 127.0.0.1 for local custody access.

There is no MCN_RPC_PORT environment setting in this release. Keep local port changes when reviewing subsequent repository updates. The Engine API port is separate; changing it also requires updating Prysm's execution endpoint.

NAT and access

NAT is supported. Allow outgoing P2P traffic and HTTPS; forward the P2P ports if you want inbound peers. Set MCN_PUBLIC_IP to the external address when needed. Add it to the service environment as well as your shell.

Public peer synchronization requires no operator IP whitelist. Wallet RPC need not be public. Use localhost, a private network or authenticated restricted access for exchange applications; do not expose the Engine API or validator interfaces to the Internet.

On this page