Adding another +1 for Obsidian. I've tried a whole lot of note-taking apps over the years and Obsidian is the best I've ever used by a pretty significant margin.
That said, there's one caveat to note about self-hosting: if you're on iOS, there's not much of an option for syncing besides their paid Obsidian Sync service. I think there are some hacky workarounds for this, but they don't seem great.
Another option to consider is Joplin. I used it before Obsidian, and while it's not nearly as slick as Obsidian, it is fully open source, cross-platform, Markdown-based, and supports syncing with a variety of protocols out of the box. I had it set up to sync to a directory on my NAS using WebDAV and it worked reasonably well across all my devices. It also feels more Evernote-like to me than Obsidian and there's a built-in option to import an ENEX file if you want to move your notes over.