Home
cd ../playbooks
Developer ToolsAdvanced

DevOps Server Manager

Manage servers, Docker containers, VMs, and network infrastructure through Claude Code via SSH. Keep your entire infrastructure documented in markdown files.

15 minutes
By communitySource
#devops#servers#docker#ssh#infrastructure#homelab#proxmox#networking

You have 25 servers, a Proxmox cluster, Docker everywhere, and your 'documentation' is a mix of bash history and mental notes. When something breaks at 3 AM, you're SSHing into boxes trying to remember which container runs where.

Who it's for: homelab enthusiasts managing multiple servers, sysadmins tired of undocumented infrastructure, DevOps engineers wanting conversational server management, small teams without dedicated ops staff, anyone running Docker/Proxmox/VM infrastructure

Example

"SSH into the media server and check why Plex isn't responding" → Claude connects via SSH, diagnoses the Docker container is OOM-killed, restarts it with higher memory limits, and updates your infrastructure markdown docs — all in one conversation

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

# Infrastructure Manager

## Goal
Manage and maintain server infrastructure via SSH. Document all configurations, changes, and procedures in markdown files.

## Server Inventory
Maintain a `servers/` directory with one markdown file per server:
- `servers/{hostname}.md` — OS, IP, services, access details, notes
- `servers/network-topology.md` — Network diagram and routing info
- `docker/` — Docker compose files and container documentation
- `templates/` — VM templates and provisioning scripts
- `runbooks/` — Step-by-step procedures for common operations

## Rules
1. Always document changes before and after making them
2. Before modifying any server, read its corresponding .md file for context
3. When SSH-ing into servers, use key-based authentication
4. After completing any infrastructure change, update the relevant .md documentation
5. Never store secrets or passwords in markdown files — reference them by vault/env name only
6. For destructive operations, describe what will happen and ask for confirmation first
7. When debugging, log findings to `runbooks/troubleshooting-log.md`

## Common Tasks
- "Check status of all Docker containers on [server]"
- "Set up a new Docker service for [app] on [server]"
- "Spin up a new VM from the [template] on Proxmox"
- "Debug why [service] isn't responding on [server]"
- "Update the server inventory documentation"
- "Run a security audit on [server]"
- "Set up monitoring for [service]"
- "Show me the network topology"

## SSH Access Pattern
Connect to servers using: ssh user@hostname
After connecting, run commands directly. If a server needs specific context, read its .md file first.

## Documentation Format
When documenting a server, use this structure:
### [Hostname]
- **OS**: Ubuntu 24.04 / Debian 12 / etc.
- **IP**: x.x.x.x
- **Role**: Production DB / Web Server / etc.
- **Services**: nginx, postgres, redis, etc.
- **Access**: ssh user@hostname
- **Notes**: Any special configuration or quirks

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

This playbook turns Claude Code into a DevOps assistant that can SSH into your servers, manage Docker containers, spin up VMs, debug network misconfigurations, and maintain your entire infrastructure as markdown documentation. Inspired by users managing 25+ servers entirely through Claude Code and .md files.

Prerequisites

  • Claude Code installed and configured
  • SSH key-based access to your servers (password auth works but keys are recommended)
  • A dedicated project folder with no source code or CLAUDE.md files (this helps avoid SSH refusal issues)

Step-by-Step Setup

Step 1: Create a dedicated infrastructure folder

mkdir ~/infrastructure
cd ~/infrastructure

Important: Keep this folder free of source code projects and existing CLAUDE.md files. A clean folder with only .md files helps Claude Code work with SSH without refusal issues.

Step 2: Create the folder structure

mkdir -p servers docker templates runbooks

Step 3: Document your first server

Create servers/my-server.md with your server's details:

# my-server

- **OS**: Ubuntu 24.04
- **IP**: 192.168.1.100
- **Role**: Docker host
- **Services**: Docker, Traefik, Portainer
- **Access**: ssh admin@192.168.1.100

Step 4: Save the CLAUDE.md template

Copy the template above into CLAUDE.md in the infrastructure folder.

Step 5: Launch Claude Code

cd ~/infrastructure
claude

Then try: "SSH into my-server and check what Docker containers are running"

Example Usage

Check all services across servers:

"Connect to each server in my inventory and report which services are running and their status"

Set up a new Docker service:

"Set up a Traefik reverse proxy on my-server using Docker Compose, then document the setup"

Spin up a VM on Proxmox:

"SSH into my Proxmox server and create a new Ubuntu VM from the base template, then document it in the servers folder"

Debug a networking issue:

"The web app on server-2 can't reach the database on server-1. SSH into both and help me figure out why"

Run a security audit:

"SSH into my-server and check for open ports, outdated packages, and any security concerns. Write findings to runbooks/security-audit.md"

Tips

  • Start with documentation: Before having Claude manage anything, document your existing infrastructure in .md files. Claude works much better with context.
  • Use Proxmox templates: If using Proxmox, maintain VM templates with QEMU guest agent or cloud-init pre-installed so Claude can access VMs after creation.
  • Dangerous mode: Some users report needing to enable dangerous mode in settings for SSH to work consistently. The setting just enables the option — you still have to explicitly enter the mode.
  • No MCP needed: Claude Code can SSH directly via bash — no MCP server required for basic server management.
  • Incremental trust: Start with read-only commands (status checks, log reading) before moving to write operations (service restarts, config changes).

Troubleshooting

Problem: Claude refuses to SSH, saying it's "unsafe" or "cannot assist"

Solution: Make sure your project folder contains only .md files — no source code, no existing CLAUDE.md with coding instructions. Start a fresh project dedicated to infrastructure management.

Problem: SSH connection times out

Solution: Verify you can SSH manually first. Ensure your SSH keys are in ~/.ssh/ and the server is reachable. Claude uses the same SSH config as your terminal.

Problem: Claude loses context about server configurations

Solution: Always point Claude to the relevant server .md file before giving commands. The documentation acts as persistent memory across sessions.

$Related Playbooks

Developer Tools

Android Restore Credentials

Implement Android's Restore Credentials feature with androidx.credentials — the two-tier background/foreground restoration architecture, the createCredential fallback for devices without end-to-end encryption, sign-in and deletion flows with real Kotlin code, and the backend guidelines a client-side implementation must hand off to the developer, not implement itself.

10 minutes
Intermediate
Developer Tools

Autonomous Skill Optimizer

Evaluate and iteratively improve SKILL.md files with a research-grounded 9-dimension rubric and a critical insight most self-improvement loops miss: absolute LLM-judge scores are too noisy (±8 points on unchanged text) for keep/revert decisions — only a same-judge, same-call paired comparison between two versions cancels that noise out reliably.

15 minutes
Advanced
Developer Tools

Better Web Typography

Web typography engineering as a review discipline, not a style guide — CSS properties over raw variable-font tags, a semantic type scale with descending heading sizes, deliberate text-wrap usage (balance vs. pretty), tabular numbers for changing values, mobile input zoom fixes, and a severity-rated review report format with a concrete common-mistakes table.

5 minutes
Intermediate
Developer Tools

Automated PR Code Review

High-signal automated PR review using parallel agents with a validation pass that filters out false positives before anything gets posted.

10 minutes
Advanced
Developer Tools

Auto Repo Setup

Turn Claude Code into an environment doctor that diagnoses, fixes, and verifies a codebase so non-technical teammates can run it without understanding the stack.

10 minutes
Intermediate
Developer Tools

Artifacts Builder

Create elaborate multi-component HTML artifacts using React, Tailwind CSS, and shadcn/ui components with professional bundling.

15 minutes
Advanced
Developer Tools

Cinematic GSAP + Lenis Motion System

Build a connected, premium web motion language with GSAP, ScrollTrigger, and Lenis smooth scroll — a full token system for eases/durations/staggers, Lenis-driven-by-the-GSAP-ticker setup, a reusable data-attribute markup API for text reveals and parallax, and reduced-motion handling built in from the start, not bolted on after.

15 minutes
Advanced
Developer Tools

Claude Code Project Architecture

A setup guide for structuring a Claude Code project's full toolkit — layered CLAUDE.md context, slash commands, sub-agents, skills, hooks, and plugins — each used for what it's actually good at instead of one mechanism for everything.

20 minutes
Intermediate
Developer Tools

Claude Model Migration Assistant

Migrate code and prompts between Claude models — update model strings, remove incompatible beta headers, and adjust prompts only for reported behavioral differences.

5 minutes
Beginner
Developer Tools

Claude Code Plugin Builder

End-to-end guided workflow for building Claude Code plugins — structure, commands, agents, skills, hooks, and MCP integration — with a validation checklist before you distribute.

15 minutes
Advanced
Developer Tools

CLAUDE.md Progressive Disclosurer

Slim down and restructure a bloated CLAUDE.md (or AGENTS.md) using progressive disclosure — move low-frequency detail to Level 2 references while keeping Level 1 lean, with zero information loss.

15 minutes
Intermediate
Developer Tools

Claude Usage Analyst

Analyze Claude Code token usage, cost, quota burn, model mix, and cache read/write using ccusage evidence — and explain in human terms why your quota got exhausted.

10 minutes
Beginner

Browse all Developer Tools playbooks →