Repository navigation
Expand file tree
/
Copy pathcardloop.service.template
More file actions
38 lines (35 loc) · 1.68 KB
/
Copy pathcardloop.service.template
File metadata and controls
38 lines (35 loc) · 1.68 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
# systemd unit template for Cardloop.
#
# Easiest: run `make service` (renders this template for the current user,
# installs it, then enables & starts it). Manual install:
# 1. Substitute the username AND home dir (systemd's %h is unreliable for
# system units with User= — it resolves to /root, not the user's home):
# sed -e "s/__USER__/$(whoami)/g" -e "s#__HOME__#$HOME#g" \
# cardloop.service.template > /tmp/cardloop.service
# 2. sudo cp /tmp/cardloop.service /etc/systemd/system/cardloop.service
# 3. sudo systemctl daemon-reload && sudo systemctl enable --now cardloop
[Unit]
Description=Cardloop — Claude Code IDE (web cockpit + kanban auto-run)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=__USER__
Group=__USER__
WorkingDirectory=__HOME__/cardloop
Environment=HOME=__HOME__
Environment=PATH=__HOME__/.local/bin:__HOME__/.npm-global/bin:/usr/local/bin:/usr/bin:/bin
EnvironmentFile=__HOME__/cardloop/.env
# ANTHROPIC_API_KEY is intentionally unset — we use Claude subscription OAuth (~/.claude/.credentials.json)
ExecStart=__HOME__/cardloop/venv/bin/python -u __HOME__/cardloop/bot.py
Restart=on-failure
RestartSec=5
# Agents run their shell jobs (ffmpeg, data scripts) inside this unit's cgroup. When one of them
# is OOM-killed, only that job must die: the systemd default OOMPolicy=stop would stop the whole
# cockpit and abort every live chat and sub-agent with it.
OOMPolicy=continue
# Never set MemoryHigh below MemoryMax: it throttles the whole cgroup into a livelock instead of
# OOM-killing the offender. Add a MemoryMax sized for your host if you want a hard cap.
MemoryHigh=infinity
[Install]
WantedBy=multi-user.target