Quick start

Your first node

TLDR: Just run mcc init and follow the instructions.

# start and enable on boot
systemctl enable --now mcc
# get status
systemctl status mcc
# restart
systemctl restart mcc
# view logs
journalctl -u mcc -e
# start and enable on boot
service mcc enable
service mcc start
# get status
service mcc status
# restart
service mcc restart
# view the last 50 lines of logs
logread -e mcc -l 50
# start
sudo launchctl start io.staex.mcc
# get status
sudo launchctl list io.staex.mcc
# restart (restarts automatically after stopping)
sudo launchctl stop io.staex.mcc
# fully stop
sudo launchctl unload /Library/LaunchDaemons/io.staex.mcc.plist
sudo launchctl stop io.staex.mcc
# view logs
sudo less +G /Library/Logs/mcc.log
# enable on boot
# add <key>RunAtLoad</key><true/> to /Library/LaunchDaemons/io.staex.mcc.plist

On OpenWRT you need to run these additional commands to configure Dnsmasq to resolved node IDs.

uci set dhcp.@dnsmasq[-1].domainneeded=0
uci set dhcp.@dnsmasq[-1].rebind_protection=0
uci set dhcp.@dnsmasq[-1].confdir=/etc/dnsmasq.d
uci commit dhcp
service dnsmasq restart
service firewall reload

Other nodes

Run the following command substituting x.x.x.x with the IP address/DNS name of the first node and network-certificate-base64 with the network certificate in BASE64 format.

mcc init --parents x.x.x.x:9376 network-certificate-base64
# for public network use
# mcc init --parents public.staex.io:9376 network-certificate-base64

Usually a parent node has public IP address but this is not required. You can chain-link nodes to create multi-hop network. Staex ensures global connectivity even if a child node can only "see" its parent but not the other nodes.

Don't forget to open port 9376 for UDP traffic on each node.

If everything went well your new nodes should be visible in the output of the following command on the parent node.

mcc nodes

They will also be visible on Networks page in self-service portal.