[{"data":1,"prerenderedAt":354},["ShallowReactive",2],{"\u002Fdocs\u002Fhow-it-works":3},{"id":4,"title":5,"body":6,"description":346,"extension":347,"meta":348,"navigation":349,"path":350,"seo":351,"stem":352,"__hash__":353},"docs\u002Fdocs\u002Fhow-it-works.md","How It Works",{"type":7,"value":8,"toc":339},"minimark",[9,13,30,41,46,79,108,130,133,137,173,184,188,191,218,267,276,280,331],[10,11,5],"h1",{"id":12},"how-it-works",[14,15,16,17,21,22,25,26,29],"p",{},"NetIgnite has three building blocks: the ",[18,19,20],"strong",{},"server"," you log in to, ",[18,23,24],{},"agents"," that live in your\nnetworks, and the ",[18,27,28],{},"devices"," you want to power on.",[31,32,38],"pre",{"className":33,"code":35,"language":36,"meta":37},[34],"language-text"," Browser ──HTTPS──▶ NetIgnite Server ◀──WebSocket── Agent ──Wake-on-LAN \u002F ping──▶ Devices\n                     (dashboard + API)    (outbound      (ESP32 in    (same LAN as the agent)\n                                          from the LAN)   your LAN)\n","text","",[39,40,35],"code",{"__ignoreMap":37},[42,43,45],"h2",{"id":44},"concepts","Concepts",[14,47,48,51,52,59,60,65,66,70,71,74,75,78],{},[18,49,50],{},"Server."," A ",[53,54,58],"a",{"href":55,"rel":56},"https:\u002F\u002Fnuxt.com",[57],"nofollow","Nuxt"," application running on ",[53,61,64],{"href":62,"rel":63},"https:\u002F\u002Fbun.sh",[57],"Bun",". It serves the\nweb dashboard and the ",[53,67,69],{"href":68},"\u002Fdocs\u002Freference\u002Fapi","REST API",", and it accepts agent connections on\n",[39,72,73],{},"\u002Fapi\u002Fagent-control-service",". All of this uses one port (",[39,76,77],{},"18232"," in the Docker image). Users,\nagents and devices are stored in a SQLite database.",[14,80,81,84,85,89,90,93,94,97,98,102,103,107],{},[18,82,83],{},"Agent."," A program inside your network that connects ",[86,87,88],"em",{},"out"," to the server over a WebSocket and\nwaits for commands. Because the agent dials out, you don't need port forwarding or a VPN into the\nnetwork you want to control. Every agent has a numeric ",[18,91,92],{},"ID"," and a ",[18,95,96],{},"secret","; it authenticates\nwith both when it connects. The ",[53,99,101],{"href":100},"\u002Fdocs\u002Fagents\u002Fesp32","ESP32 agent"," is the reference\nimplementation, and you can ",[53,104,106],{"href":105},"\u002Fdocs\u002Fagents\u002Fprotocol","write your own",".",[14,109,110,113,114,117,118,121,122,125,126,129],{},[18,111,112],{},"Device."," A machine you want to wake: a desktop PC, server, laptop, printer or NAS. A device\nrecord stores the device's ",[18,115,116],{},"MAC address",", the ",[18,119,120],{},"Wake-on-LAN port"," (usually ",[39,123,124],{},"9",") and the\n",[18,127,128],{},"agent"," that is responsible for it. The agent must be in the same local network (broadcast\ndomain) as the device.",[14,131,132],{},"Agents and devices belong to the user who created them. Each user only sees their own.",[42,134,136],{"id":135},"waking-a-device","Waking a device",[138,139,140,151,157,164,170],"ol",{},[141,142,143,144,147,148,107],"li",{},"You press ",[18,145,146],{},"Power On"," in the dashboard. The browser calls\n",[39,149,150],{},"POST \u002Fapi\u002Fdevices\u002F\u003Cid>\u002Fwakeup",[141,152,153,154,107],{},"The server looks up the device and its agent. If the agent isn't connected, the request fails\nwith ",[18,155,156],{},"Agent is offline",[141,158,159,160,163],{},"The server sends a ",[39,161,162],{},"WAKEUP"," command with the device's MAC address and port to the agent.",[141,165,166,167,107],{},"The agent broadcasts a Wake-on-LAN magic packet to its subnet (the ESP32 agent sends it three\ntimes, 100 ms apart) and replies ",[39,168,169],{},"OK",[141,171,172],{},"The device's network card receives the packet and powers the machine on.",[14,174,175,176,178,179,183],{},"The agent's ",[39,177,169],{}," means that the packet was sent, not that the device actually started.\nWake-on-LAN must be enabled in the device's BIOS\u002FUEFI and network driver. See\n",[53,180,182],{"href":181},"\u002Fdocs\u002Freference\u002Ftroubleshooting#the-device-doesnt-wake-up","Troubleshooting"," if nothing happens.",[42,185,187],{"id":186},"checking-device-status","Checking device status",[14,189,190],{},"The dashboard refreshes device and agent status every 20 seconds.",[192,193,194,208],"ul",{},[141,195,196,199,200,203,204,207],{},[18,197,198],{},"Agent status"," is ",[39,201,202],{},"online"," while the agent's WebSocket connection is open. The server keeps\nthis state in memory and sends every connected agent a ",[39,205,206],{},"HEARTBEAT"," once a minute.",[141,209,210,213,214,217],{},[18,211,212],{},"Device status"," comes from the agent. For each device, the server sends a ",[39,215,216],{},"GET_STATUS","\ncommand with the device's MAC address. The ESP32 agent derives the device's IPv6 link-local\naddress from the MAC (the EUI-64 address) and pings it once.",[219,220,221,234],"table",{},[222,223,224],"thead",{},[225,226,227,231],"tr",{},[228,229,230],"th",{},"Status",[228,232,233],{},"Meaning",[235,236,237,247,257],"tbody",{},[225,238,239,244],{},[240,241,242],"td",{},[39,243,202],{},[240,245,246],{},"The device answered the ping.",[225,248,249,254],{},[240,250,251],{},[39,252,253],{},"offline",[240,255,256],{},"The device didn't answer within one second.",[225,258,259,264],{},[240,260,261],{},[39,262,263],{},"unknown",[240,265,266],{},"The agent is offline, didn't answer within 5 seconds, or rejected the request (for example because of a malformed MAC address).",[268,269,270],"warning",{},[14,271,272,273,275],{},"The EUI-64 status check only works when the device has IPv6 enabled, uses a MAC-derived\nlink-local address and answers ICMPv6 echo requests. Windows and many modern Linux distributions\nuse randomized IPv6 interface identifiers by default, so such devices show as ",[39,274,253],{}," even when\nthey are running. Waking them is not affected.",[42,277,279],{"id":278},"where-data-lives","Where data lives",[219,281,282,292],{},[222,283,284],{},[225,285,286,289],{},[228,287,288],{},"Data",[228,290,291],{},"Storage",[235,293,294,305,313,321],{},[225,295,296,299],{},[240,297,298],{},"Users, agents, devices",[240,300,301,302],{},"SQLite database ",[39,303,304],{},"data\u002Fdb.sqlite",[225,306,307,310],{},[240,308,309],{},"Login sessions",[240,311,312],{},"Server memory (a restart logs everyone out)",[225,314,315,318],{},[240,316,317],{},"Agent connection state",[240,319,320],{},"Server memory",[225,322,323,326],{},[240,324,325],{},"Server settings",[240,327,328],{},[39,329,330],{},"config\u002Fconfig.json",[14,332,333,334,338],{},"Continue with ",[53,335,337],{"href":336},"\u002Fdocs\u002Fgetting-started","Getting Started"," to set up your own instance.",{"title":37,"searchDepth":340,"depth":340,"links":341},2,[342,343,344,345],{"id":44,"depth":340,"text":45},{"id":135,"depth":340,"text":136},{"id":186,"depth":340,"text":187},{"id":278,"depth":340,"text":279},"The building blocks of NetIgnite (server, agents and devices) and what happens when you wake a device or check its status.","md",{},{"title":5},"\u002Fdocs\u002Fhow-it-works",{"title":5,"description":346},"docs\u002Fhow-it-works","_l_-BX4XdZne4KLsBvlrGY_SNYFsQtnNPLefdgknq6Y",1792355946317]