My home lab has a mild amount of complexity and I’d like practice some good habits about documenting it. Stuff like, what each system does, the OS, any notable software installed and, most importantly, any documentation around configuration or troubleshooting.
i.e. I have an internal SMTP relay that uses a letsencrypt SSL cert that I need to use the DNS challenge to renew. I’ve got the steps around that sitting in a Google Doc. I’ve got a couple more google docs like that.
I don’t want to get super complicated but I’d like something a bit more structured than a folder full of google docs. I’d also like to pull it in-house.
Thanks
Edit: I appreciate all the feedback I’ve gotten on this post so far. There have been a lot of tools suggested and some great discussion about methods. This will probably be my weekend now.
The only thing I save in Google Drive are my notes just in case of disaster.
Are you writing to Google drive directly from the cli? If so how? I regularly need to search, edit, copy, and paste to and from my notes; backup config files; save a neat little script I wrote; etc. all from the CLI. It would be awesome to have this searchable and online from a web browser too for when I’m not working in the terminal. For example, piping an error message to a file and grabbing/sanitizing that error to search later. I have ways, but their all a lot clunkier than simply have a Dropbox. I’m basically looking for something that works just like Dropbox, is not self hosted, and not as cumbersome to setup as NextCloud and the like.
It’s not automated. I just have the most important commands to fix/rebuild my sever in case of disasater.
Frankly the only thing I’d save in Google Docs are encrypted archives. Otherwise they’ll profile the documents to send ads to you. But it is a good back up in case lightning strikes your home or something.
I don’t save all my documents. Just my self-hosting, servers infraestructure notes. I don’t want to have the recovery intructions in the same machine I’m recovering
I use a combination of netbox for the physical/logical network and server connectivity, and outline for text documentation of the different components.
Woah thanks for the NetBox shout! Gonna check that out
I think I looked at netbox a while back. I may circle back to it for the actual physical layer. If I remember the ipam didn’t include network scanning tho.
I made myself a wiki in my helpdesk system - I use osticket to send me various email alerts to so I can track issues I need to fix, and they have a little wiki option.
Then one day that host was down and I needed some info and I was very irritated. Now all of those notes are in my Apple notes backed up in iCloud and searchable on whatever I’ve got handy so if I need info I can get the info
I played with GLPI just long enough to realize that was way more than I wanted or needed. I’d like to track changes but I don’t want to run a full ticketing/chg mgmt system to do it.
I use WikiJS for documentation. Simple, powerful and has a lot of features
+1 for WikiJS. As a bonus you can have WikiJS back itself up to plain text MarkDown files, so if things explode you can always just read those from wherever.
Another great feature I use is to have WikiJS back itself up into git. If I am going to a place with no internet access I can do a quick git pull and have a complete copy of my wiki including files on my laptop.
That sounds pretty handy.
Git, MinIO, Amazon S3, Filesystem and many more options to for backup🐱
Can’t wait for v3 finally
I’ve been using Obsidian for a lot of other purposes for a couple years now, so I was comfortable adding my documentation into my existing vault there. I made a couple templates that I fill out for any hardware/software/networking equipment.
Since the app’s selling point is storing all your notes in plain text I wouldn’t put anything security-related in there without some encrypted container. I use KeePass for that part, and keep the file it generates in the same folder as Obsidian so I can link to it within notes. Click the link in the note, KeePass opens the vault and asks for its password.
Mind sharing your template?
Sure.
I left everything in, so no doubt there’s stuff in there specific to my vault you won’t need like metadata - adjust these to your needs or use them as a starting point for something new. There’s no network device template, I usually use the hardware one and just delete the irrelevant bits.
Thanks!
I use obsidian too. It supports mermaid too so you can make your network diagram with it.
This is the 2nd ref I’ve seen to mermaid. I need to check that out.
I love Mermaid, although I don’t think you can currently do network diagrams. I’ve seen Kroki recommended here for doing that, which supports Mermaid plus many similar markup-based diagrammers.
[Edit: added link and more info]
I would not consider Mermaid complete enough for network diagramming. The very basics are possible, but try to describe anything more complicated throws off the placement and makes the pathing whacky.
Straight flow charts are the closest you can get to a network diagram, so if you try to draw a link that travels back up the chart, it breaks mermaid’s brain trying to figure out the order of decision points (network devices).
The allure of text based diagrams is so tantalizing - but if you need them to be functional, it’s not going to happen
There’s an issue tracking the need a new diagram type to handle it.
This is the first I’ve heard of Kroki. A quick glance at their site and wow! So many options for markup. I’ll be trying this out for sure
Almost nothing haha. Some half-ass notes saved here and there, in a disorganized manner.
My stuff works, but I don’t recommend my approach.
Same, my stuff continuing to work relies on thoughts and prayers.
This is what I’m trying to get away from.
This is the way.
I was going to say my notes are in Joplin, but my more honest answer is basically yours.
Capacities
I went with dokuwiki forever ago. Super stupid simple single container to run (no DB) and writes down to plain text files. I sync it with git every now and then.
My only gripe about it is the dokuwiki syntax and not using normal markdown. I do now have a plugin for that but it’s still just ok. But at this point I might be too engrossed in it to ever really switch. But other than that it works well, is lightweight, has other plugins (email, mermaid flow charts, etc. etc.) and really is pretty maintenance-free.
If there is some better one that is accessible via a browser and doesn’t require a DB then I’d be interested.
DokuWiki is a name I haven’t heard in a long time.
I run a local MediaWiki appliance from turnkeylinux, super easy ti spin up in proxmox.
Why not push it up to GitHub? Then you also get a commit history to see your changes overtime.
Wow that sounds convinient, where can i find a guide describing this? Has zero experience with git 😅
Gotcha. Git is useful in so many way, but it can be confusing to learn. I don’t have a guide on hand but searching for ‘getting started with git’ will get you pretty far.
Another great way to do this that I just thought of this second is using Notion. It is in markdown.
There are tons of tutorials around, but the basic gist is that you only use a couple of commands (or even a good frontend) in git, especially when it’s a one (wo)man show.
I highly recommend it!
Seems a lot of people are doing that.
I have a git repo for it, needless to say. And so README.md plus a network diagram from https://app.diagrams.net/
ansible, self-documenting. My
playbook.yml
has a list of roles attached to each host, each host’shost_vars
file has details on service configuration (domains, etc). It looks like this: https://pastebin.com/6b2Lb0MgAdditionally this role generates a markdown summary of the whole setup and inserts it into my infra’s
README.md
.Manually generated diagrams, odd manual maintenance procedures and other semi-related stuff get their own sections in the README (you can check the template here) or linked markdown files. Ongoing problems/research goes into the infra gitea project’s issues.
I’m only just starting to dip my toes in docker. Most of my stuff are kvm vms. I have a decent set of Ansible roles to setup a new vm when I spin it up but I’m not to the point where the specifics of every system is in Ansible yet.
You can full well deploy docker stacks using ansible. This is what I used to do for rocket.chat: [1] [2] (ditched it for Matrix/element without Docker, but the concept stays valid)
I’m not to the point where the specifics of every system is in Ansible yet.
What I suggest is writing a playbook that list the roles attached to your servers, even if the roles actually do nothing:
# playbook.yml - hosts: myhomeserver.example.org roles: - debian-base - docker - application-x - service-y - hosts: mydevserver.example.org - debian-base - application-z
# roles/application-x/tasks/main.yml - name: setup application-x debug: msg: "TODO This will one day deploy application-x. For now the setup is entirely manual and documented in roles/application-x/README.md"
# roles/application-x/tasks/main.yml - name: setup service-y debug: msg: "TODO This will one day deploy service-y. For now the setup is entirely manual and documented in roles/service-y/README.md" #...
This is a good start for a config management/automated deployment system. At least you will have an inventory of hosts and what’s running on them. Work your way from there, over time progressively convert your manual install/configuration steps to automated procedures. There are a few steps that even I didn’t automate (like configuring LDAP authentication for Nextcloud), but they are documented in the relevant role README [3]
I was going to recommend Ansible as well - documentation as code can never be out of date if you continue using it.
This seems pretty vanilla based on what other have suggested but I use regular markdown files in a git repo.
For data flows or diagrams, mermaidJS syntax within the markdown file works wonders and when I need to link one document to another or one section to another, you can use the normal link syntax of markdown.
Easy to use, hardly any setup and easily accessible.
Org-mode
I use raneto, it is a small lightweight nodejs wiki. The files are stored as markdown.
That sounds useful.