TLDR: Just run mcc init
and follow the instructions.
mcc init network-certificate-base64
to generate node private key and certificate.
Here network-certificate-base64
is the network certificate in BASE64 format that you can copy from the Network page.
The command will ask for the network key that you've generated on the previous step.
Alternatively follow the instructions on New node page to do the same manually.mcc
service and enjoy your self-hosted, multi-hop network.# 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.
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.
# 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.
They will also be visible on Networks page in self-service portal.