gcp-server
Skill4 starsChanged 8 months agoApache-2.0View on GitHub
Manage the production GCP infrastructure for openclaw-ruh-enterprise. SSH into VMs, check resource usage (CPU, RAM, disk), view Docker containers, read logs, restart services, clean up disk, and run server maintenance. Use when asked to "check the server", "server health", "disk usage", "restart backend", "clean docker", "server logs", "SSH into prod", or any production infrastructure task.
In this repository7 other files it gives its agents.
- agents.mdAGENTS.md
- openclaw-agent-builder/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kbSkill
- agent-builderSkill
- kbSkill
- openclaw-logsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 172
When checking server health, flag these conditions:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/gcp-server — Production Server Management
Manage the GCP production infrastructure for openclaw-ruh-enterprise. All commands
run via gcloud compute ssh — no manual SSH config needed.
GCP Access Details
| Field | Value |
| GCP Project | ruhai-469019 |
| Zone | us-central1-a |
| Domain | codezero2pi.com |
Instances
| Instance | Type | IP | Disk | Role |
ruh-demo | e2-standard-4 (4 vCPU, 16 GB RAM) | 34.31.176.40 | 100 GB | Production — all services |
instance-20260303-223502 | e2-medium (2 vCPU, 4 GB RAM) | 34.60.196.242 | 10 GB | Secondary/staging |
Services on ruh-demo
| Subdomain | Service | Container |
api.codezero2pi.com | ruh-backend | ruh-backend-1 |
builder.codezero2pi.com | agent-builder-ui | ruh-agent-builder-ui-1 |
app.codezero2pi.com | ruh-frontend | ruh-frontend-1 |
admin.codezero2pi.com | admin-ui | ruh-admin-ui-1 |
| — | PostgreSQL | ruh-postgres-1 |
| — | Nginx (SSL proxy) | ruh-nginx-1 |
| — | Certbot (auto-renew) | ruh-certbot-1 |
| — | Agent sandboxes | openclaw-<uuid> |
SSH Pattern
Always use this pattern to run commands on the server:
gcloud compute ssh ruh-demo \
--project=ruhai-469019 \
--zone=us-central1-a \
--command="<command>"For commands requiring Docker access, prefix with sudo:
gcloud compute ssh ruh-demo \
--project=ruhai-469019 \
--zone=us-central1-a \
--command="sudo docker ps"For interactive sessions (rarely needed — prefer --command):
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-aCommon Operations
Health Check (quick)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="echo '=== UPTIME ===' && uptime && echo '=== MEMORY ===' && free -h && echo '=== DISK ===' && df -h / && echo '=== CONTAINERS ===' && sudo docker ps --format 'table {{.Names}}\t{{.Status}}'"Full Resource Report
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="free -h && echo '---' && df -h / && echo '---' && sudo docker system df && echo '---' && sudo docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Size}}' && echo '---' && ps aux --sort=-%mem | head -15"Service Logs
# Backend logs (last 100 lines)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="cd /opt/ruh && sudo docker compose -f deploy/docker-compose.prod.yml logs --tail=100 backend"
# Any service: replace 'backend' with: agent-builder-ui, frontend, admin-ui, nginx, postgres
# Sandbox logs:
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker logs --tail=100 openclaw-<uuid>"Restart a Service
# Single service
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="cd /opt/ruh && sudo docker compose -f deploy/docker-compose.prod.yml restart backend"
# Full stack
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="cd /opt/ruh && sudo docker compose -f deploy/docker-compose.prod.yml up -d"Docker Cleanup
# Prune build cache (safe — reclaims stale build layers)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker builder prune -f"
# Remove unused images (only images not used by any container)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker image prune -f"
# Full system prune (removes all unused images, networks, build cache — ASK USER FIRST)
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker system prune -af"Database Access
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker exec ruh-postgres-1 psql -U openclaw -d openclaw -c '<SQL>'"Sandbox Management
# List sandbox containers
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker ps --filter 'name=openclaw-' --format 'table {{.Names}}\t{{.Status}}\t{{.Size}}'"
# Check gateway status inside a sandbox
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="sudo docker exec openclaw-<uuid> openclaw gateway status"Deploy
gcloud compute ssh ruh-demo --project=ruhai-469019 --zone=us-central1-a \
--command="cd /opt/ruh && bash deploy/deploy.sh"Thresholds & Alerts
When checking server health, flag these conditions:
| Metric | Warning | Critical |
| Disk usage | > 70% | > 85% |
| RAM usage | > 75% | > 90% |
| Load average | > 4.0 (= vCPU count) | > 8.0 |
| Container status | Any "unhealthy" | Any "Exited" or missing |
| Docker build cache | > 20 GB | > 40 GB |
Safety Rules
- Never run
docker system prunewithout asking the user first — it removes all unused images. - Never restart postgres without confirming — it interrupts all active connections.
- Never run
deploy.shwithout user confirmation — it resets to origin/dev and rebuilds everything. - Read-only commands (health, logs, ps, df, free) are always safe to run.
- Prefer targeted restarts (single service) over full stack restarts.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

