Comment by simondotau

4 days ago

Honestly, this has been one of my biggest AI life hacks.

While I'm nominally capable of maintaining a Linux box myself, it isn't my day job. This box is important but there's no revenue attached to it. Since I'm not super fluent with the commands and flags, fixing stuff when it goes wrong is frustrating and anxiety-inducing. And this is a totally one-off machine, so it's impractical to do a nice idempotent configuration with Terraform or whatever.

So I made a sysadmin bot, gave it my scratchpad of historical setup notes, gave it its own root SSH key, checked out my monorepo (with setup notes, config files, web roots), and it did everything else. And now I treat this Grok bot like a command-line interface with sane syntax.

"restart nginx now and confirm site works"

"pin mariadb to 12.3.*"

"any security best practices not implemented?"

"turn on firewall, allow ports 22, 80, 443 only, make sure ssh has fail2ban on and isn't accepting any passwords"

"add example.com to lets encrypt"

"run health checks every hour, confirm that example.com root page has the phrase `Products`, if it doesn't, log in and fix it"

"run updates on monday mornings at 6am, restart if needed, confirm that the site is online afterwards, you can roll back updates if necessary"

But honestly, the best part is that Grok Bot is also an app on my phone, so I can get it to fix pretty much any problem no matter where I am, even if it means troubleshooting and fixing site code bugs. The anxiety of being a sysadmin has completely disappeared. If I needed to spin up a completely different box from scratch on a completely different service with a completely different distro, it's no problem.