-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcakeagent.service
More file actions
48 lines (42 loc) · 1.16 KB
/
Copy pathcakeagent.service
File metadata and controls
48 lines (42 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[Unit]
Description=CakeAgent — Personal AI Assistant
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=cakeagent
Group=cakeagent
WorkingDirectory=/opt/cakeagent
ExecStart=/usr/bin/node dist/src/index.js
Restart=always
RestartSec=10
TimeoutStopSec=30
EnvironmentFile=/opt/cakeagent/.env
# Filesystem: strict read-only baseline, scoped write access
ProtectSystem=strict
ReadWritePaths=/opt/cakeagent /usr /var /etc
InaccessiblePaths=/etc/shadow /etc/gshadow /etc/sudoers /etc/sudoers.d /etc/ssh
# Isolation
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
ProtectClock=true
ProtectHostname=true
ProtectProc=invisible
LockPersonality=true
RestrictRealtime=true
RestrictNamespaces=true
# AF_NETLINK required so agent-invoked nft/iptables/ip route can speak to the
# kernel (netfilter, routing). Without it, sudoers-allowed firewall tools fail.
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
SystemCallArchitectures=native
UMask=0077
RemoveIPC=true
StandardOutput=journal
StandardError=journal
SyslogIdentifier=cakeagent
[Install]
WantedBy=multi-user.target