[{"data":1,"prerenderedAt":825},["ShallowReactive",2],{"\u002Fdocs\u002Fagents\u002Fmacos":3},{"id":4,"title":5,"body":6,"description":817,"extension":818,"meta":819,"navigation":820,"path":821,"seo":822,"stem":823,"__hash__":824},"docs\u002Fdocs\u002Fagents\u002Fmacos.md","macOS Agent",{"type":7,"value":8,"toc":805},"minimark",[9,13,33,43,48,67,71,93,138,141,183,200,217,222,407,411,414,434,445,449,454,507,569,573,579,608,615,619,691,705,708,740,749,753,801],[10,11,5],"h1",{"id":12},"macos-agent",[14,15,16,17,21,22,27,28,32],"p",{},"The NetIgnite agent runs on a Mac, too. The dashboard then sees whether the Mac is online and can\n",[18,19,20],"strong",{},"shut it down or restart it",". It's the same program as the ",[23,24,26],"a",{"href":25},"\u002Fdocs\u002Fagents\u002Flinux","Linux agent",", in\nhost mode; ",[23,29,31],{"href":30},"\u002Fdocs\u002Fagents\u002Flinux#wake-on-lan-mode","Wake-on-LAN mode"," (waking other devices) is only\navailable on Linux.",[14,34,35,36,42],{},"The agent runs in the background as its own hidden user without rights. It talks to the server\nover one outgoing WebSocket; nothing listens on the Mac. Source and releases:\n",[23,37,41],{"href":38,"rel":39},"https:\u002F\u002Fgithub.com\u002FNetIgnite-project\u002FAgent-Linux",[40],"nofollow","NetIgnite-project\u002FAgent-Linux",".",[44,45,47],"h2",{"id":46},"requirements","Requirements",[49,50,51,64],"ul",{},[52,53,54,55,59,60,63],"li",{},"macOS 13 (Ventura) or newer, on Apple silicon (",[56,57,58],"code",{},"netignite-agent-macos-arm64",") or an Intel Mac\n(",[56,61,62],{},"netignite-agent-macos-x64",").",[52,65,66],{},"An administrator account for the installation.",[44,68,70],{"id":69},"install","Install",[72,73,74,84,90],"ol",{},[52,75,76,77,80,81,63],{},"In the dashboard, create an agent of the kind ",[18,78,79],{},"macOS agent"," (",[18,82,83],{},"Agents → Add agent",[52,85,86,87,42],{},"On its page, click ",[18,88,89],{},"Create setup command",[52,91,92],{},"Run the command in Terminal on the Mac within 15 minutes:",[94,95,101],"pre",{"className":96,"code":97,"filename":98,"language":99,"meta":100,"style":100},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -fsSL https:\u002F\u002Fnetignite.example.com\u002Finstall\u002Fmacos.sh | sudo sh -s -- netignite_enroll_…\n","Terminal","bash","",[56,102,103],{"__ignoreMap":100},[104,105,108,112,116,119,123,126,129,132,135],"span",{"class":106,"line":107},"line",1,[104,109,111],{"class":110},"sBMFI","curl",[104,113,115],{"class":114},"sfazB"," -fsSL",[104,117,118],{"class":114}," https:\u002F\u002Fnetignite.example.com\u002Finstall\u002Fmacos.sh",[104,120,122],{"class":121},"sMK4o"," |",[104,124,125],{"class":110}," sudo",[104,127,128],{"class":114}," sh",[104,130,131],{"class":114}," -s",[104,133,134],{"class":114}," --",[104,136,137],{"class":114}," netignite_enroll_…\n",[14,139,140],{},"The script, served by your NetIgnite server:",[72,142,143,146,153,166,173,176],{},[52,144,145],{},"checks that it runs on macOS as root,",[52,147,148,149,152],{},"picks the binary for the CPU (",[56,150,151],{},"arm64"," on Apple silicon, also from a Terminal running under\nRosetta),",[52,154,155,156,159,160,165],{},"downloads it and ",[56,157,158],{},"SHA256SUMS"," from the\n",[23,161,164],{"href":162,"rel":163},"https:\u002F\u002Fgithub.com\u002FNetIgnite-project\u002FAgent-Linux\u002Freleases",[40],"GitHub releases"," and checks the\nchecksum,",[52,167,168,169,172],{},"signs it ad hoc (",[56,170,171],{},"codesign --force --sign -","): the binaries aren't signed by Apple, and macOS\nonly runs Apple silicon programs with a signature,",[52,174,175],{},"pairs the agent with the server using the token,",[52,177,178,182],{},[23,179,181],{"href":180},"#the-launchd-daemons","installs"," the agent and starts it.",[14,184,185,186,189,190,192,193,196,197,42],{},"The agent shows up as online on its page. Then open (or add) the device for this Mac, choose the\nagent under ",[18,187,188],{},"Agent on the device",", and choose the status check ",[18,191,188],{},". The\ndevice gets ",[18,194,195],{},"Shut down"," and ",[18,198,199],{},"Reboot",[14,201,202,203,206,207,196,210,213,214,63],{},"The release it installs is chosen like for the ",[23,204,26],{"href":205},"\u002Fdocs\u002Fagents\u002Flinux#install",", with the\nsame variables ",[56,208,209],{},"NETIGNITE_AGENT_VERSION",[56,211,212],{},"NETIGNITE_AGENT_BASE_URL"," (pass them through\n",[56,215,216],{},"sudo env",[218,219,221],"h3",{"id":220},"manual-install","Manual install",[94,223,225],{"className":96,"code":224,"filename":98,"language":99,"meta":100,"style":100},"arch=arm64   # or x64 for an Intel Mac\nbase=https:\u002F\u002Fgithub.com\u002FNetIgnite-project\u002FAgent-Linux\u002Freleases\u002Flatest\u002Fdownload\ncurl -fsSLO \"$base\u002Fnetignite-agent-macos-$arch\"\ncurl -fsSLO \"$base\u002FSHA256SUMS\"\ngrep \" netignite-agent-macos-$arch\\$\" SHA256SUMS | shasum -a 256 -c\nchmod +x \"netignite-agent-macos-$arch\"\ncodesign --force --sign - \"netignite-agent-macos-$arch\"\n\nsudo .\u002Fnetignite-agent-macos-$arch pair https:\u002F\u002Fnetignite.example.com netignite_enroll_…\nsudo .\u002Fnetignite-agent-macos-$arch install\n",[56,226,227,242,253,276,292,327,345,368,375,395],{"__ignoreMap":100},[104,228,229,233,236,238],{"class":106,"line":107},[104,230,232],{"class":231},"sTEyZ","arch",[104,234,235],{"class":121},"=",[104,237,151],{"class":114},[104,239,241],{"class":240},"sHwdD","   # or x64 for an Intel Mac\n",[104,243,245,248,250],{"class":106,"line":244},2,[104,246,247],{"class":231},"base",[104,249,235],{"class":121},[104,251,252],{"class":114},"https:\u002F\u002Fgithub.com\u002FNetIgnite-project\u002FAgent-Linux\u002Freleases\u002Flatest\u002Fdownload\n",[104,254,256,258,261,264,267,270,273],{"class":106,"line":255},3,[104,257,111],{"class":110},[104,259,260],{"class":114}," -fsSLO",[104,262,263],{"class":121}," \"",[104,265,266],{"class":231},"$base",[104,268,269],{"class":114},"\u002Fnetignite-agent-macos-",[104,271,272],{"class":231},"$arch",[104,274,275],{"class":121},"\"\n",[104,277,279,281,283,285,287,290],{"class":106,"line":278},4,[104,280,111],{"class":110},[104,282,260],{"class":114},[104,284,263],{"class":121},[104,286,266],{"class":231},[104,288,289],{"class":114},"\u002FSHA256SUMS",[104,291,275],{"class":121},[104,293,295,298,300,303,306,309,312,314,317,320,324],{"class":106,"line":294},5,[104,296,297],{"class":110},"grep",[104,299,263],{"class":121},[104,301,302],{"class":114}," netignite-agent-macos-",[104,304,305],{"class":231},"$arch\\$",[104,307,308],{"class":121},"\"",[104,310,311],{"class":114}," SHA256SUMS",[104,313,122],{"class":121},[104,315,316],{"class":110}," shasum",[104,318,319],{"class":114}," -a",[104,321,323],{"class":322},"sbssI"," 256",[104,325,326],{"class":114}," -c\n",[104,328,330,333,336,338,341,343],{"class":106,"line":329},6,[104,331,332],{"class":110},"chmod",[104,334,335],{"class":114}," +x",[104,337,263],{"class":121},[104,339,340],{"class":114},"netignite-agent-macos-",[104,342,272],{"class":231},[104,344,275],{"class":121},[104,346,348,351,354,357,360,362,364,366],{"class":106,"line":347},7,[104,349,350],{"class":110},"codesign",[104,352,353],{"class":114}," --force",[104,355,356],{"class":114}," --sign",[104,358,359],{"class":114}," -",[104,361,263],{"class":121},[104,363,340],{"class":114},[104,365,272],{"class":231},[104,367,275],{"class":121},[104,369,371],{"class":106,"line":370},8,[104,372,374],{"emptyLinePlaceholder":373},true,"\n",[104,376,378,381,384,387,390,393],{"class":106,"line":377},9,[104,379,380],{"class":110},"sudo",[104,382,383],{"class":114}," .\u002Fnetignite-agent-macos-",[104,385,386],{"class":231},"$arch ",[104,388,389],{"class":114},"pair",[104,391,392],{"class":114}," https:\u002F\u002Fnetignite.example.com",[104,394,137],{"class":114},[104,396,398,400,402,404],{"class":106,"line":397},10,[104,399,380],{"class":110},[104,401,383],{"class":114},[104,403,386],{"class":231},[104,405,406],{"class":114},"install\n",[218,408,410],{"id":409},"updating","Updating",[14,412,413],{},"Run the install script again without a token:",[94,415,417],{"className":96,"code":416,"filename":98,"language":99,"meta":100,"style":100},"curl -fsSL https:\u002F\u002Fnetignite.example.com\u002Finstall\u002Fmacos.sh | sudo sh\n",[56,418,419],{"__ignoreMap":100},[104,420,421,423,425,427,429,431],{"class":106,"line":107},[104,422,111],{"class":110},[104,424,115],{"class":114},[104,426,118],{"class":114},[104,428,122],{"class":121},[104,430,125],{"class":110},[104,432,433],{"class":114}," sh\n",[14,435,436,437,440,441,63],{},"If the agent is already installed, pair it again with ",[56,438,439],{},"sudo netignite-agent pair …"," (the agent's\npage shows the command under ",[442,443,444],"em",{},"Agent already installed?",[44,446,448],{"id":447},"the-launchd-daemons","The launchd daemons",[14,450,451,453],{},[56,452,69],{},":",[49,455,456,463,470,480,500],{},[52,457,458,459,462],{},"creates the hidden system user and group ",[56,460,461],{},"_netignite"," (an ID between 400 and 499, no shell, no\nhome folder),",[52,464,465,466,469],{},"copies the agent to ",[56,467,468],{},"\u002Fusr\u002Flocal\u002Fbin\u002Fnetignite-agent",",",[52,471,472,473,476,477,479],{},"makes the config ",[56,474,475],{},"\u002Fusr\u002Flocal\u002Fetc\u002Fnetignite\u002Fagent.json"," readable for ",[56,478,461],{}," only (besides\nroot),",[52,481,482,483,196,486,489,490,492,493,496,497,469],{},"creates the request folders ",[56,484,485],{},"\u002Fusr\u002Flocal\u002Fvar\u002Fnetignite-agent\u002Fshutdown",[56,487,488],{},"…\u002Freboot"," (owned by\n",[56,491,461],{},", mode ",[56,494,495],{},"0700",") and the log folder ",[56,498,499],{},"\u002Fusr\u002Flocal\u002Fvar\u002Flog\u002Fnetignite-agent",[52,501,502,503,506],{},"writes three daemons to ",[56,504,505],{},"\u002FLibrary\u002FLaunchDaemons"," and loads them:",[508,509,510,526],"table",{},[511,512,513],"thead",{},[514,515,516,520,523],"tr",{},[517,518,519],"th",{},"Daemon",[517,521,522],{},"Runs as",[517,524,525],{},"Does",[527,528,529,544,557],"tbody",{},[514,530,531,537,541],{},[532,533,534],"td",{},[56,535,536],{},"dev.netignite.agent",[532,538,539],{},[56,540,461],{},[532,542,543],{},"The agent. launchd starts it at boot and restarts it if it stops.",[514,545,546,551,554],{},[532,547,548],{},[56,549,550],{},"dev.netignite.agent.shutdown",[532,552,553],{},"root",[532,555,556],{},"Shuts the Mac down when the agent asks (see below). Nothing else.",[514,558,559,564,566],{},[532,560,561],{},[56,562,563],{},"dev.netignite.agent.reboot",[532,565,553],{},[532,567,568],{},"The same for a restart.",[44,570,572],{"id":571},"shutdown-and-restart","Shutdown and restart",[14,574,575,576,578],{},"The user ",[56,577,461],{}," has no right to shut the Mac down. Like on Linux, a small root service does\nit on request:",[72,580,581,587,605],{},[52,582,583,584,586],{},"For a shutdown, the agent creates a file in ",[56,585,485],{}," (only it\nand root can write there).",[52,588,589,590,593,594,596,597,600,601,604],{},"launchd sees the file (",[56,591,592],{},"QueueDirectories",") and starts the root daemon\n",[56,595,550],{},". It empties the folder and runs ",[56,598,599],{},"\u002Fsbin\u002Fshutdown -h now","\n(",[56,602,603],{},"-r now"," for a restart), but only if the request is less than a minute old: an old request, for\nexample from right before a power cut, is only removed.",[52,606,607],{},"The agent waits up to 5 seconds for the request to be picked up. If nothing does, it removes the\nrequest again and the dashboard shows the error.",[14,609,610,611,614],{},"Before answering the server, the agent checks that the request folder exists and that launchd has\nthe root daemon loaded; if not, the dashboard says to run ",[56,612,613],{},"sudo netignite-agent install"," again.\nOpen apps are quit without asking; changes that an app doesn't save by itself are lost.",[44,616,618],{"id":617},"commands","Commands",[508,620,621,631],{},[511,622,623],{},[514,624,625,628],{},[517,626,627],{},"Command",[517,629,630],{},"What it does",[527,632,633,643,655,671,681],{},[514,634,635,640],{},[532,636,637],{},[56,638,639],{},"pair \u003Cserver-url> \u003Ctoken>",[532,641,642],{},"Registers with the server and writes the config.",[514,644,645,649],{},[532,646,647],{},[56,648,69],{},[532,650,651,652,63],{},"Sets up and starts the daemons (",[56,653,654],{},"--dry-run",[514,656,657,662],{},[532,658,659],{},[56,660,661],{},"uninstall",[532,663,664,665,668,669,63],{},"Removes them (",[56,666,667],{},"--purge",", ",[56,670,654],{},[514,672,673,678],{},[532,674,675],{},[56,676,677],{},"status",[532,679,680],{},"Shows the config, the server, the agent ID, the daemon's state and whether the server and the credential work. Never shows the secret.",[514,682,683,688],{},[532,684,685],{},[56,686,687],{},"version",[532,689,690],{},"Prints the version.",[14,692,693,694,697,698,701,702,63],{},"Run them with ",[56,695,696],{},"sudo netignite-agent …",". The agent logs to\n",[56,699,700],{},"\u002Fusr\u002Flocal\u002Fvar\u002Flog\u002Fnetignite-agent\u002Fagent.log"," (up to 1 MB, then ",[56,703,704],{},"agent.log.1",[44,706,707],{"id":661},"Uninstall",[94,709,711],{"className":96,"code":710,"filename":98,"language":99,"meta":100,"style":100},"sudo netignite-agent uninstall           # keeps the config (root-only again)\nsudo netignite-agent uninstall --purge   # also deletes the config with the credential\n",[56,712,713,726],{"__ignoreMap":100},[104,714,715,717,720,723],{"class":106,"line":107},[104,716,380],{"class":110},[104,718,719],{"class":114}," netignite-agent",[104,721,722],{"class":114}," uninstall",[104,724,725],{"class":240},"           # keeps the config (root-only again)\n",[104,727,728,730,732,734,737],{"class":106,"line":244},[104,729,380],{"class":110},[104,731,719],{"class":114},[104,733,722],{"class":114},[104,735,736],{"class":114}," --purge",[104,738,739],{"class":240},"   # also deletes the config with the credential\n",[14,741,742,743,745,746,748],{},"This unloads and deletes the three daemons, the request and log folders,\n",[56,744,468],{}," and the user ",[56,747,461],{},". Delete the agent in the dashboard too.",[44,750,752],{"id":751},"security","Security",[49,754,755,775,792],{},[52,756,757,760,761,196,764,80,767,770,771,774],{},[18,758,759],{},"Fixed actions only."," The server can ask for ",[56,762,763],{},"PING",[56,765,766],{},"HOST_CONTROL",[56,768,769],{},"shutdown"," or\n",[56,772,773],{},"reboot","). There's no remote shell, no file access and no configuration change from the server.",[52,776,777,780,781,784,785,787,788,791],{},[18,778,779],{},"The secret"," is generated on the Mac and only leaves it in the ",[56,782,783],{},"Authorization"," header. The\nserver stores only a hash. The config is readable for root and ",[56,786,461],{}," only. Use an\n",[56,789,790],{},"https:\u002F\u002F"," server address outside your LAN.",[52,793,794,797,798,800],{},[18,795,796],{},"The agent"," runs as ",[56,799,461],{},", without rights. The root daemons do exactly one thing each and\nread nothing from the request but its age.",[802,803,804],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":100,"searchDepth":244,"depth":244,"links":806},[807,808,812,813,814,815,816],{"id":46,"depth":244,"text":47},{"id":69,"depth":244,"text":70,"children":809},[810,811],{"id":220,"depth":255,"text":221},{"id":409,"depth":255,"text":410},{"id":447,"depth":244,"text":448},{"id":571,"depth":244,"text":572},{"id":617,"depth":244,"text":618},{"id":661,"depth":244,"text":707},{"id":751,"depth":244,"text":752},"The NetIgnite agent for macOS: install it with one command, the launchd daemons, shutdown and restart, uninstalling and security.","md",{},{"title":5},"\u002Fdocs\u002Fagents\u002Fmacos",{"title":5,"description":817},"docs\u002Fagents\u002Fmacos","xdLbTjYBYPn4iwqdfzvZ2uH6T4tnjRdnWaTPllnLX_g",1793007281804]