Wiki.js
Wiki.js is a wiki engine built on Node.js that stores pages in Markdown and can keep the underlying files in a Git repository. It offers a visual editor alongside a raw Markdown mode, version history, page templates, search, comments, attachments and per-group permissions, with authentication through local accounts or external providers.
Teams use it for internal documentation, handbooks and a public knowledge base, and it fits well alongside other self-hosted services.
Running it on your own infrastructure means the documentation and its history stay yours, there is no per-seat licence to pay, and a Git clone plus database dump restores the whole wiki.