ClaudeOps
October 3, 2025 ยท View on GitHub
Autonomous Server Management with Claude Code
What if your server's DevOps engineer was an LLM that runs on cron, reads logs as memory, and takes intelligent action?
Overview
ClaudeOps transforms Claude Code into an autonomous system administrator. Instead of traditional monitoring dashboards and alert rules, ClaudeOps runs Claude Code on a schedule to:
- ๐ Check system health (services, databases, endpoints, resources)
- ๐ง Read previous logs to understand context and trends
- ๐ง Take corrective action when issues are detected
- ๐ Document everything in human-readable markdown
- ๐ Recover services automatically after reboots
Why ClaudeOps?
Traditional monitoring is reactive (alerts when broken) and rule-based (if X then Y). ClaudeOps is proactive and intelligent:
- Understands Context: Reads application logs, correlates signals, detects patterns
- Reasons About Problems: "Slow queries + rising memory = connection leak?"
- Takes Appropriate Action: Restarts when safe, escalates when uncertain
- Learns from History: Each run reads previous logs to maintain continuity
- Speaks Human: All logs in markdown, all reasoning documented
How It Works
โโโโโโโโโโโโโโโ
โ Cron Job โ Every 2 hours (configurable)
โโโโโโโโฌโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ claudeops-cron.sh โ
โ โข Reads last 3 health check logs โ
โ โข Invokes Claude Code with context โ
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Claude Code โ
โ โข Checks services, databases, endpoints โ
โ โข Analyzes logs for errors/patterns โ
โ โข Compares to previous state โ
โ โข Takes action if needed โ
โ โข Writes structured report โ
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ /var/log/claudeops/ โ
โ โโโ health/2025-09-29-1400.md โ
โ โโโ issues/database-slow.md โ
โ โโโ actions/restarted-postgres.md โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Installation
๐ Complete Installation Guide - Tested and validated step-by-step instructions
The complete installation guide includes:
- Prerequisites checklist
- Step-by-step setup instructions (validated on Ubuntu 24.04)
- Post-installation testing
- Troubleshooting tips
- 98% validated (Docker + production testing)
Quick Install (Alternative)
# One-command installation
curl -fsSL https://raw.githubusercontent.com/dennisonbertram/claudeops/main/install.sh | sudo bash
# Run the interactive setup wizard
sudo claudeops setup
# After setup, ClaudeOps runs automatically via cron
# Or run manual health check anytime:
sudo claudeops check
# View status and logs
claudeops status # Quick status overview
claudeops logs # Recent health checks
claudeops issues # Unresolved issues
claudeops actions # Recent actions taken
Available Commands
claudeops setup # Interactive setup wizard
claudeops check # Run health check now
claudeops boot # Run boot recovery manually
claudeops status # Show system status
claudeops logs # View recent health checks
claudeops issues # View unresolved issues
claudeops actions # View recent actions
claudeops config # View configuration
claudeops version # Show version info
claudeops help # Show help
New Features (October 2025)
โ Custom Slash Commands - Direct server access through Claude Code
/system-health- Run comprehensive health checks instantly/system-status- Quick system overview/system-logs- View recent ClaudeOps logs/system-services- Check all service statuses/system-restart- Safely restart services
โ Direct SSH Access - Secure, limited-privilege access
- Dedicated
claudeopsSSH user for Claude Code - SSH key authentication (no passwords)
- Command logging and auditing
- Restricted permissions following principle of least privilege
โ Git Integration - Version control for logs and configurations
- GitHub repository for all ClaudeOps artifacts
- Automated log versioning and backup
- Full audit trail of system changes
See docs/POST_DEPLOYMENT_2025-10-02.md for details.
Project Status
โ Production Ready - Deployed and Operational!
- Architecture designed
- Log structure defined
- Core scripts implementation
- bin/claudeops - Main CLI utility
- bin/claudeops-cron - Scheduled health checks
- bin/claudeops-boot - Boot recovery
- bin/claudeops-setup - Interactive setup wizard
- Prompt templates (setup, health-check, boot-recovery)
- Health check library (20+ reusable functions)
- Installation script (one-command install)
- Templates (cron job, systemd service)
- Complete server deployment automation
-
server-setup.sh- Full server provisioning -
deploy-to-server.sh- One-command deployment - Systemd integration for boot recovery
- Cron configuration for health checks
-
- Production Deployment (Hetzner 65.21.67.254)
- Custom slash commands
- Direct SSH access (claudeops user)
- Git integration with GitHub
- Comprehensive documentation
- Documentation
- Community feedback and contributions welcome!
Use Cases
- Small Teams: Replace expensive monitoring services with Claude
- Side Projects: Set-and-forget reliability for side hustles
- Learning: See how an AI would debug your infrastructure
- Bare Metal: Make dedicated servers manageable again
- Cost Optimization: Intelligent resource management
Example Log
# Health Check - 2025-09-29 14:00
## Status: โ ๏ธ WARNING
### Services
- โ
PostgreSQL: Running, 23 connections
- โ
Frontend: Responding on port 3006
- โ ๏ธ Indexer: Running, but slow (5s response time, usually <1s)
### Database
- โ
Connection pool: 23/100
- โ ๏ธ Slow queries detected (3 queries >2s in last hour)
- Top slow query: `SELECT * FROM posts WHERE...` (avg 3.2s)
### Resources
- โ
Disk: 45% used (55GB free)
- โ
Memory: 62% used (3.8GB free)
- โ ๏ธ CPU: 85% used (usually <50%)
## Analysis
The indexer is experiencing performance degradation. Correlation:
- Slow database queries started at 13:45
- CPU spike at 13:47
- Indexer slowdown at 13:50
Likely cause: Long-running query is blocking other operations.
## Actions Taken
None yet. Monitoring for 2 more cycles before intervention.
## Recommendations for Next Run
- If slow queries persist, consider:
1. Adding index on posts.created_at
2. Restarting Postgres to clear any locks
3. Checking for missing VACUUM operations
Contributing
This is a brand new project. Contributions, ideas, and feedback welcome!
License
MIT License - See LICENSE file for details
Authors
- Initial concept: @dennisonbertram
- Developed in collaboration with Claude Code
Built with Claude Code. Managed by Claude Code. This README was written by Claude Code. ๐ค