Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["3651"],{685(e,t,s){s.r(t),s.d(t,{metadata:()=>r,default:()=>m,frontMatter:()=>d,contentTitle:()=>o,toc:()=>a,assets:()=>c});var r=JSON.parse('{"id":"daemon-mode/system-service","title":"System Service (Auto-Start on Boot)","description":"Install Mercury as a system service so it starts automatically on boot and restarts on crash.","source":"@site/docs/daemon-mode/system-service.mdx","sourceDirName":"daemon-mode","slug":"/daemon-mode/system-service","permalink":"/docs/daemon-mode/system-service","draft":false,"unlisted":false,"editUrl":"https://github.com/cosmicstack-labs/mercury-agent/tree/main/website/docs/daemon-mode/system-service.mdx","tags":[],"version":"current","frontMatter":{"id":"system-service","title":"System Service (Auto-Start on Boot)"},"sidebar":"docsSidebar","previous":{"title":"Daemon Mode","permalink":"/docs/daemon-mode/daemon-mode"},"next":{"title":"Platform-Specific Guide","permalink":"/docs/daemon-mode/platform-guide"}}'),n=s(74848),i=s(28453);let d={id:"system-service",title:"System Service (Auto-Start on Boot)"},o,c={},a=[{value:"Other service commands",id:"other-service-commands",level:2}];function l(e){let t={code:"code",em:"em",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"Install Mercury as a system service so it starts automatically on boot and restarts on crash."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"mercury service install\n"})}),"\n",(0,n.jsx)(t.p,{children:"This detects your platform and generates the appropriate service config."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Platform"}),(0,n.jsx)(t.th,{children:"Method"}),(0,n.jsx)(t.th,{children:"Requires Admin"}),(0,n.jsx)(t.th,{children:"Auto-Start"}),(0,n.jsx)(t.th,{children:"Crash Recovery"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"macOS"}),(0,n.jsx)(t.td,{children:"LaunchAgent plist"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"On login"}),(0,n.jsx)(t.td,{children:"KeepAlive (restart on crash)"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Linux"}),(0,n.jsx)(t.td,{children:"systemd user unit"}),(0,n.jsx)(t.td,{children:"No*"}),(0,n.jsx)(t.td,{children:"On login"}),(0,n.jsx)(t.td,{children:"Restart=on-failure, 5s delay"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Windows"}),(0,n.jsx)(t.td,{children:"Task Scheduler (schtasks)"}),(0,n.jsx)(t.td,{children:"No"}),(0,n.jsx)(t.td,{children:"On logon"}),(0,n.jsx)(t.td,{children:"Built-in watchdog"})]})]})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsxs)(t.em,{children:["*Linux boot-without-login requires ",(0,n.jsx)(t.code,{children:"loginctl enable-linger $USER"})," (one-time, needs sudo)."]})}),"\n",(0,n.jsx)(t.h2,{id:"other-service-commands",children:"Other service commands"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"mercury service status\nmercury service uninstall\n"})})]})}function m(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453(e,t,s){s.d(t,{R:()=>d,x:()=>o});var r=s(96540);let n={},i=r.createContext(n);function d(e){let t=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:d(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]);