#17099: docs(pi): add loginctl enable-linger instruction for SSH persistence
docs
stale
size: XS
Cluster:
Windows Path and Exec Fixes
Fixes #17069
## Problem
When running OpenClaw on Raspberry Pi accessed via SSH, the gateway dies when the SSH session closes because systemd-logind's default kills all user processes.
## Solution
Added a warning note in the Raspberry Pi docs with the workaround:
```bash
sudo loginctl enable-linger $USER
```
This prevents systemd from killing the gateway when the SSH session ends.
## Impact
- Helps users avoid the common pitfall of their Pi gateway dying after disconnecting SSH
- Low-risk documentation fix with clear reproduction steps from the issue
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR adds helpful SSH persistence documentation for Raspberry Pi users and attempts to optimize hook loading by skipping cache-busting for bundled hooks.
- **Docs change (raspberry-pi.md)**: Clean addition - warns users about systemd killing processes when SSH disconnects and provides the `loginctl enable-linger` fix
- **Loader optimization (loader.ts)**: The optimization logic is sound, but `entry.origin` should be `entry.hook.source` and the comparison value should be `"openclaw-bundled"` not `"bundled"`
The bug makes the optimization a no-op (always applies cache-busting), so it doesn't break existing functionality - it just fails to deliver the performance improvement.
<h3>Confidence Score: 3/5</h3>
- Safe to merge with the logic fix - docs are good, bug doesn't break functionality
- The documentation change is solid and the loader bug doesn't cause runtime errors (just makes the optimization ineffective). However, the bug should be fixed before merging to actually deliver the performance benefit.
- src/hooks/loader.ts needs the property path corrected
<sub>Last reviewed commit: 3b9c17c</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#17073: docs(raspberry-pi): Add SSH linger troubleshooting
by fridayjoshi · 2026-02-15
85.8%
#20330: Fix SSH tunnel startup on Windows by resolving ssh from PATH
by graysurf · 2026-02-18
71.2%
#11817: fix(build): compile bundled hook handlers into dist
by AnonO6 · 2026-02-08
70.3%
#11339: fix: resolve bundled hooks path on npm global install
by matthewpoe · 2026-02-07
70.1%
#16915: fix: await compaction hooks with timeout to prevent cross-session d...
by maximalmargin · 2026-02-15
70.0%
#16016: fix: update systemd unit version on gateway restart
by jbold · 2026-02-14
70.0%
#21934: fix #21914 - Add the most obvious option to the error message
by vivganes · 2026-02-20
69.8%
#17930: fix: evaluate tool_result_persist hooks lazily to avoid race condition
by TheArkifaneVashtorr · 2026-02-16
69.8%
#17912: fix: configure git to use HTTPS instead of SSH for GitHub URLs
by MisterGuy420 · 2026-02-16
69.8%
#14211: feat: Add Stateful SSH Plugin with Auto-Key Detection
by schmiereck · 2026-02-11
69.8%