••••••••••••
I've been self hosting for more than 25 years. I think I've done a pretty good job of doing things logically, but over so many upgrades and migrations I'm sure things drifted and a lot of technical debt has collected. I just started using AI early this year. So at first I set up a new git repo and gave it to a vs code/claude session and told it to collect documentation as I described it - Claude owned all edits/commits to that repo. I set up Claude to keep its memory files inside the git repo so that's versioned too and synced across workstations. I also set up a mkdocs job so that a static html site is built from the docs (but not the Claude memory) and served on a secure website. Soon I set up key exchange ssh to my various hosts so I could tell Claude to connect to the box, take inventory and add that to the docs. This worked better than I had imagined. I gave Claude a set of guidelines how to communicate with me and the way I do things so it could do the same. Later it guided me through setting up SOPS so I could make various credentials available and Claude could use them without seeing them itself. I explained the layout of my dev workstation, git repo, Jenkins, docker hosts, k3s cluster, networking equipment, email server, database, web servers - everything. I had learned about setting up prometheus/opensearch to centralize metrics and logging and after I set up the basics it helped me fine tune things. No MCP's at all in this setup so far, Claude doesn't need them and with my guidelines has been very well behaved and stable. I can get an alert of an issue and just start a new claude session and mention the alert and it'll investigate, write a postmortem if I ask, and propose a fix and once I approve implement it. If I ask it to deploy something new it does so in the same style I established on my own. I can mention an update to something is available and it'll implement a plan with checkpoints, acceptance tests and documentation. I've got sections in the docs for current state, technical debt, and future projects and have taught Claude not to confuse them. I did get to the point where the Claude memory management had to get fancy, but it works now at the cost of a few extra lookups at the beginning of a session. I'm starting to work towards setting up local LLMs as an operations dept which would catch alerts and perform first level triage, then either suggest (and maybe someday implement) a fix or to escalate to a Claude session. I've refactored this base knowledge setup into a common repo which contains the fundamental guides for all project repos and the homelab and other repos refer to that universal knowledge so if I update or add to something in universal then all the projects get the updates. This structure is now working across doc repos for homelab, financial, medical, robotics, and personal workshop/makerspace. I've blasted through YEARS worth of tech debt and even future projects just so far in this last year and it has freed me up to work on new projects as I imagine them.
•••••••••••••••••••••••
 Top