You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: agent service improvements, Docker publishing, platform-aware CLI
Service fixes:
- Fix macOS status detection: use launchctl print instead of launchctl list
which can't see system daemons without root
- Fix empty server URL in plist during launchd throttle recovery
- Service data lives in /var/lib/plow-agent/ instead of user home dir
- Credentials copied from user config to service dir during install
- Always re-register on startup (idempotent) to handle server rebuilds
- Log to stderr so daemon logs appear in /var/log/plow-agent.err.log
CLI improvements:
- --service logs: tails the right log source per platform
- --service status: shows platform, data dir, status, and all commands
- Wizard and help messages are platform-aware (macOS/Linux/Windows)
- sudo auto-elevation for service install/uninstall/start/stop
Docker:
- CI workflow now builds and pushes to ghcr.io/jackharrhy/plow-agent
- Added compose.yml for easy volunteer setup
- Dockerfile accepts VERSION build arg for proper version stamping
- README rewritten with Docker Compose as primary container path
Copy file name to clipboardExpand all lines: agent/README.md
+74-18Lines changed: 74 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,9 @@ This launches an interactive setup wizard that:
33
33
34
34
After setup, the agent runs in the background and survives reboots. You don't need to keep a terminal open.
35
35
36
-
**Note:** Installing a system service usually requires administrator/root privileges. On Linux, run with `sudo`. On macOS, you may get a permissions prompt. On Windows, run as Administrator.
36
+
**Note:** Installing a system service requires administrator/root privileges. The wizard will prompt for your sudo password automatically. On Windows, run as Administrator.
37
+
38
+
**Once you see "Registered" in the output, let Jack know** (message him or open an issue) so he can approve your agent. It won't start fetching data until approved.
37
39
38
40
## Running interactively
39
41
@@ -50,35 +52,86 @@ This runs the agent in the foreground. Press Ctrl+C to stop.
50
52
Once installed, you can control the service with:
51
53
52
54
```
53
-
plow-agent --service status # Check if running
55
+
plow-agent --service status # Check if running + platform info
56
+
plow-agent --service logs # View live logs (auto-detects platform)
54
57
plow-agent --service stop # Stop the service
55
58
plow-agent --service start # Start the service
56
59
plow-agent --service restart # Restart the service
57
60
plow-agent --service uninstall # Remove the service
58
61
```
59
62
60
-
### Viewing logs
63
+
The `status` and `logs` commands automatically detect your platform and show the right information -- no need to remember platform-specific log commands.
64
+
65
+
### Complete removal
66
+
67
+
To fully uninstall the agent and clean up all its data:
68
+
69
+
```bash
70
+
# 1. Stop and remove the system service
71
+
plow-agent --service uninstall
72
+
73
+
# 2. Remove service data (credentials used by the daemon)
74
+
sudo rm -rf /var/lib/plow-agent
75
+
76
+
# 3. Remove your local config (keypair and name)
77
+
rm -rf ~/.config/plow-agent
78
+
79
+
# 4. Remove the binary itself
80
+
rm plow-agent
81
+
```
82
+
83
+
On macOS, if the service is stuck, you can force-remove it:
84
+
85
+
```bash
86
+
sudo launchctl bootout system/plow-agent
87
+
sudo rm /Library/LaunchDaemons/plow-agent.plist
88
+
```
89
+
90
+
## Docker / Docker Compose
91
+
92
+
The agent Docker image is published to `ghcr.io/jackharrhy/plow-agent` automatically on every release.
93
+
94
+
The easiest way to run it is with the included [`compose.yml`](compose.yml):
The volume keeps your keypair across container restarts. Set `PLOW_NAME` to something that identifies you -- the server operator sees this when approving agents.
78
-
79
-
To build the image yourself:
132
+
### Building locally
80
133
81
-
```
134
+
```bash
82
135
docker build -t plow-agent agent/
83
136
```
84
137
@@ -98,31 +151,34 @@ This creates a small PVC for key persistence and a Deployment running the agent.
0 commit comments