I use BookStack (https://www.bookstackapp.com). MIT licensed & easy to self host.
It's fast and has good search, a good editor, and uses simple hierarchical organization + tagging. I like that it gets out of my way and does a good job of handling everything from code snippets to freeform thoughts to recipes.
BookStack is best for things that 'look like' documents. Mobile editing could also be better - you have to click a maximize button to get a usable view of the editor and the editor UI still takes up a lot of space. It is web based, but it is very lightweight and I have found it very easy to host.