What is your favourite selfhosted wiki software and why?
There are a ton of options listed on the Awesome Selfhosted list. I'm on the search for a FOSS option that I can use to document my homelab and personal tech projects.
The wiki functionality built into Gitea (which is functionally a clone of Github's design, being honest) works great and can keep your documentation notes about (a thing) next to the code/scripts/configs/etc. you're storing in a git repo right next to it (I assume you're using git somehow). The wiki content itself is just Markdown, and it's managed either (a) as a normal remote git repo, or (b) using the Gitea GUI editor as a WYSIWYG editor + git client. Test it out here on their live dev instance: https://try.gitea.io/
You should switch to Forgejo, though. Gitea is owned and maintained by a for-profit corporation that recently decided that all non-Gitea copyright notices from all files have to be removed (which in the end allows relicensing it to a more restrictive license and even making it nonfree).
The corporation taking over Gitea from the community was also a hostile takeover.