agent-manager.service 1005 B

123456789101112131415161718192021222324252627282930313233343536
  1. [Unit]
  2. Description=Agent Manager - Gogs Webhook Server
  3. Documentation=https://github.com/fszontagh/agent-manager
  4. After=network.target
  5. [Service]
  6. Type=simple
  7. User=claude
  8. Group=claude
  9. WorkingDirectory=/home/claude/agent-manager
  10. ExecStart=/usr/bin/node src/index.js
  11. Restart=on-failure
  12. RestartSec=10s
  13. # Environment
  14. Environment=NODE_ENV=production
  15. Environment=FILE_LOGGING_ENABLED=true
  16. Environment=LOG_FILE_PATH=/var/log/agent-manager.log
  17. # Security hardening
  18. NoNewPrivileges=true
  19. PrivateTmp=true
  20. ProtectSystem=full
  21. # Note: Changed from 'strict' to 'full' to allow shell execution from /usr/bin
  22. # 'full' still protects /usr and /boot but allows execution (read-only)
  23. # Note: ProtectHome removed to allow Claude to work with repositories under /home/claude/
  24. # The service runs as 'claude' user which is already restricted to its own home directory
  25. ReadWritePaths=/home/claude /var/log
  26. # Logging
  27. StandardOutput=journal
  28. StandardError=journal
  29. SyslogIdentifier=agent-manager
  30. [Install]
  31. WantedBy=multi-user.target