[{"data":1,"prerenderedAt":374},["ShallowReactive",2],{"navigation":3,"/cli/service-management":94,"/cli/service-management-surround":369},[4,22,39,68,81],{"title":5,"path":6,"stem":7,"children":8,"page":21},"Getting Started","/getting-started","1.getting-started",[9,13,17],{"title":10,"path":11,"stem":12},"Introduction","/getting-started/introduction","1.getting-started/1.introduction",{"title":14,"path":15,"stem":16},"Installation","/getting-started/installation","1.getting-started/2.installation",{"title":18,"path":19,"stem":20},"Workspace","/getting-started/workspace","1.getting-started/3.workspace",false,{"title":23,"path":24,"stem":25,"children":26,"page":21},"Configuration","/configuration","2.configuration",[27,31,35],{"title":28,"path":29,"stem":30},"Overview","/configuration/overview","2.configuration/1.overview",{"title":32,"path":33,"stem":34},"AI Providers","/configuration/ai-providers","2.configuration/2.ai-providers",{"title":36,"path":37,"stem":38},"Configuration Reference","/configuration/reference","2.configuration/3.reference",{"title":40,"path":41,"stem":42,"children":43,"page":21},"Features","/features","3.features",[44,48,52,56,60,64],{"title":45,"path":46,"stem":47},"Telegram","/features/telegram","3.features/1.telegram",{"title":49,"path":50,"stem":51},"Tools","/features/tools","3.features/2.tools",{"title":53,"path":54,"stem":55},"Scheduling","/features/scheduling","3.features/3.scheduling",{"title":57,"path":58,"stem":59},"Heartbeat","/features/heartbeat","3.features/4.heartbeat",{"title":61,"path":62,"stem":63},"Memory","/features/memory","3.features/5.memory",{"title":65,"path":66,"stem":67},"Skills","/features/skills","3.features/6.skills",{"title":69,"path":70,"stem":71,"children":72,"page":21},"Cli","/cli","4.cli",[73,77],{"title":74,"path":75,"stem":76},"CLI Commands","/cli/commands","4.cli/1.commands",{"title":78,"path":79,"stem":80},"Running as a Service","/cli/service-management","4.cli/2.service-management",{"title":82,"path":83,"stem":84,"children":85,"page":21},"Reference","/reference","5.reference",[86,90],{"title":87,"path":88,"stem":89},"Sessions","/reference/sessions","5.reference/1.sessions",{"title":91,"path":92,"stem":93},"Troubleshooting","/reference/troubleshooting","5.reference/3.troubleshooting",{"id":95,"title":78,"body":96,"description":362,"extension":363,"links":364,"meta":365,"navigation":366,"path":79,"seo":367,"stem":80,"__hash__":368},"docs/4.cli/2.service-management.md",{"type":97,"value":98,"toc":353},"minimark",[99,103,107,112,115,131,139,143,168,176,182,187,190,210,213,217,274,278,292,295,299,302,315,322,342,349],[100,101,78],"h1",{"id":102},"running-as-a-service",[104,105,106],"p",{},"If you want BabyClaw running in the background and starting automatically when your machine boots, install it as a system service.",[108,109,111],"h2",{"id":110},"why-run-as-a-service","Why run as a service",[104,113,114],{},"Running BabyClaw as a service means:",[116,117,118,122,125,128],"ul",{},[119,120,121],"li",{},"It starts automatically when your machine boots",[119,123,124],{},"It restarts if it crashes",[119,126,127],{},"You don't need to keep a terminal open",[119,129,130],{},"Heartbeats and schedules keep running even when you're not looking",[104,132,133,134,138],{},"If you just want to try BabyClaw out, running it directly with ",[135,136,137],"code",{},"node packages/gateway/dist/main.js"," is fine. Set up the service when you're ready to use it day-to-day.",[108,140,142],{"id":141},"installing-the-service","Installing the service",[144,145,150],"pre",{"className":146,"code":147,"language":148,"meta":149,"style":149},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","babyclaw service install\n","bash","",[135,151,152],{"__ignoreMap":149},[153,154,157,161,165],"span",{"class":155,"line":156},"line",1,[153,158,160],{"class":159},"sBMFI","babyclaw",[153,162,164],{"class":163},"sfazB"," service",[153,166,167],{"class":163}," install\n",[104,169,170,171,175],{},"On ",[172,173,174],"strong",{},"macOS",", this creates a launchd plist and loads it. The gateway will start on login.",[104,177,170,178,181],{},[172,179,180],{},"Linux",", this creates a systemd user service. The gateway will start when you log in.",[183,184,186],"h3",{"id":185},"linux-enabling-lingering","Linux: enabling lingering",[104,188,189],{},"By default, systemd stops user services when you log out. For an always-on assistant (especially on a server), you need to enable lingering:",[144,191,193],{"className":146,"code":192,"language":148,"meta":149,"style":149},"sudo loginctl enable-linger $USER\n",[135,194,195],{"__ignoreMap":149},[153,196,197,200,203,206],{"class":155,"line":156},[153,198,199],{"class":159},"sudo",[153,201,202],{"class":163}," loginctl",[153,204,205],{"class":163}," enable-linger",[153,207,209],{"class":208},"sTEyZ"," $USER\n",[104,211,212],{},"This keeps your user services running even when you're not logged in. The install command tries to do this for you, but it may need sudo.",[108,214,216],{"id":215},"managing-the-service","Managing the service",[144,218,220],{"className":146,"code":219,"language":148,"meta":149,"style":149},"babyclaw service start     # start the service\nbabyclaw service stop      # stop the service\nbabyclaw service restart   # restart the service\nbabyclaw service status    # check if it's running\n",[135,221,222,235,248,261],{"__ignoreMap":149},[153,223,224,226,228,231],{"class":155,"line":156},[153,225,160],{"class":159},[153,227,164],{"class":163},[153,229,230],{"class":163}," start",[153,232,234],{"class":233},"sHwdD","     # start the service\n",[153,236,238,240,242,245],{"class":155,"line":237},2,[153,239,160],{"class":159},[153,241,164],{"class":163},[153,243,244],{"class":163}," stop",[153,246,247],{"class":233},"      # stop the service\n",[153,249,251,253,255,258],{"class":155,"line":250},3,[153,252,160],{"class":159},[153,254,164],{"class":163},[153,256,257],{"class":163}," restart",[153,259,260],{"class":233},"   # restart the service\n",[153,262,264,266,268,271],{"class":155,"line":263},4,[153,265,160],{"class":159},[153,267,164],{"class":163},[153,269,270],{"class":163}," status",[153,272,273],{"class":233},"    # check if it's running\n",[108,275,277],{"id":276},"uninstalling-the-service","Uninstalling the service",[144,279,281],{"className":146,"code":280,"language":148,"meta":149,"style":149},"babyclaw service uninstall\n",[135,282,283],{"__ignoreMap":149},[153,284,285,287,289],{"class":155,"line":156},[153,286,160],{"class":159},[153,288,164],{"class":163},[153,290,291],{"class":163}," uninstall\n",[104,293,294],{},"This removes the launchd plist (macOS) or systemd unit file (Linux) and stops the service.",[108,296,298],{"id":297},"running-without-a-service","Running without a service",[104,300,301],{},"If you prefer not to use a system service, you can run the gateway directly:",[144,303,305],{"className":146,"code":304,"language":148,"meta":149,"style":149},"node packages/gateway/dist/main.js\n",[135,306,307],{"__ignoreMap":149},[153,308,309,312],{"class":155,"line":156},[153,310,311],{"class":159},"node",[153,313,314],{"class":163}," packages/gateway/dist/main.js\n",[104,316,317,318,321],{},"Or use a process manager like ",[135,319,320],{},"pm2",":",[144,323,325],{"className":146,"code":324,"language":148,"meta":149,"style":149},"pm2 start packages/gateway/dist/main.js --name babyclaw\n",[135,326,327],{"__ignoreMap":149},[153,328,329,331,333,336,339],{"class":155,"line":156},[153,330,320],{"class":159},[153,332,230],{"class":163},[153,334,335],{"class":163}," packages/gateway/dist/main.js",[153,337,338],{"class":163}," --name",[153,340,341],{"class":163}," babyclaw\n",[104,343,344,345,348],{},"The gateway runs in the foreground and logs to stdout. Press ",[135,346,347],{},"Ctrl+C"," to stop it.",[350,351,352],"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 .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}",{"title":149,"searchDepth":156,"depth":237,"links":354},[355,356,359,360,361],{"id":110,"depth":237,"text":111},{"id":141,"depth":237,"text":142,"children":357},[358],{"id":185,"depth":250,"text":186},{"id":215,"depth":237,"text":216},{"id":276,"depth":237,"text":277},{"id":297,"depth":237,"text":298},"Install BabyClaw as a system service for always-on operation.","md",null,{},true,{"title":78,"description":362},"bC1Dybj0riSb6QO-FsW8NsdX9uR1dxnkBRd1IbJ03xw",[370,372],{"title":74,"path":75,"stem":76,"description":371,"children":-1},"All available CLI commands for managing BabyClaw.",{"title":87,"path":88,"stem":89,"description":373,"children":-1},"How sessions work -- identity, history, reply chains, and configuration.",1771846894211]