docker volume create mongovol && docker run -d --name mongodb -v mongovol:/data/db --network host -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=mongopass mongo --bind_ip 0.0.0.0
git clone https://github.com/gravitl/netmaker.git
cd netmaker && source defaultvars.sh
Run the server: go run ./
Create Group: ./test/groupcreate.sh
Create Key: ./test/keycreate.sh
(save the response for step 3)
Open ./test/nodescreate.sh and replace ACCESSKEY with value from #2
Create Nodes: ./test/nodescreate.sh
Check to see if nodes were created: curl -H "authorization: Bearer secretkey" localhost:8081/api/skynet/nodes | jq
Please see this repo for instructions on setting up your UI.
On each machine you would like to add to the network, do the following:
sudo apt install wireguard-tools
sysctl -w net.ipv4.ip_forward=1
sudo wget 52.55.6.84:8081/meshclient/files/meshclient
sudo chmod +x meshclient
sudo ./meshclient -c install -g <group name> -s <server:port> -k <key value>
This will install netclient.service and netclient.timer in systemd, which will run periodically to call the netclient binary, which will check to see if there are any updates that it needs and update WireGuard appropriately.
Protoc command for GRPC Compilation:
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative grpc/node.proto
Build binary: go build ./