docs: sync README.vi.md and INSTALL.md with the systemd auto-start section

README.md already documented ccam service install/status/uninstall; the
Vietnamese mirror and the full install guide had gone stale.
This commit is contained in:
2026-08-28 16:48:06 +07:00
parent 1cb7ac0a4b
commit b27e679eac
2 changed files with 37 additions and 0 deletions
+14
View File
@@ -187,6 +187,20 @@ npm start # Start Express serving client/dist on port 4820
Open **http://localhost:4820** in your browser.
`npm start` (and `ccam start`, its backgrounded form) only run while that
process is alive — a reboot loses it. On Linux, run the server as a systemd
`--user` service instead so it comes back on its own after every reboot, with
no manual step and no Claude Code (or any other tool) needed to trigger it:
```bash
ccam service install # writes + enables ~/.config/systemd/user/ccam.service
ccam service status # systemctl --user status ccam
ccam service uninstall # disable and remove it
```
See [`README.md` → Run as a service](./README.md#run-as-a-service-auto-start-on-boot)
and, for plugin installs, [`docs/PLUGINS.md` → Auto-start on boot](docs/PLUGINS.md#auto-start-on-boot).
---
## Optional: Local MCP server
+23
View File
@@ -70,6 +70,28 @@ directory riêng của nó). `postinstall` ghi các hook entry Claude Code để
dữ liệu cho dashboard — đừng chạy nó khi plugin `ccam` đã cài, không thì mỗi
event bị đếm hai lần.
### Chạy như một service (tự khởi động khi boot máy)
`npm start` chỉ chạy khi terminal đó (hoặc tiến trình nền của `ccam start`)
còn sống — reboot máy là mất. Trên Linux, `ccam service install` dựng một
systemd `--user` service thay vào đó, để `:4820` tự động chạy lại sau mỗi lần
reboot, không cần thao tác thủ công và không cần Claude Code (hay AI tool
nào) để kích hoạt:
```bash
npm run build # service serve client đã build, giống npm start
ccam service install # ghi + enable ~/.config/systemd/user/ccam.service
ccam service status # systemctl --user status ccam
ccam service uninstall # disable và gỡ bỏ
```
`ccam service install` cũng thử chạy `loginctl enable-linger` để service khởi
động được cả khi cold boot (chưa ai login); nếu máy cần quyền cao hơn, lệnh
này sẽ in ra `sudo loginctl enable-linger <user>` để bạn tự chạy một lần.
Bản cài qua plugin cũng được tự khởi động tương tự — xem
[Auto-start on boot](docs/PLUGINS.md#auto-start-on-boot) trong
`docs/PLUGINS.md`.
## CLI
`ccam` được link sẵn bởi `npm run setup`; không thì gọi `node bin/ccam.js`.
@@ -77,6 +99,7 @@ event bị đếm hai lần.
```bash
ccam status # dashboard có đang chạy không
ccam start # start ngầm (background) và chờ tới khi healthy
ccam service install # tự khởi động khi boot máy qua systemd --user (Linux)
ccam sessions # session gần đây
ccam lanes # danh sách lane kèm stage và progress
ccam lanes pipeline # pipeline template của lane này, hoặc đổi nó