Self-hosted alternative to onenote

I am looking for a good self hosted note taker. I want to be able to embed images in notes, and to have a folder structure in which to organise them. It would also be good to be able to sync notes between my Calyx OS phone and computer.

I am an IT Technician, so don’t mind complicated setup. But do want control over how my notes are managed backed up. Further, it would be great if the notes could be end-to-end encrypted, but as it is self I hosted encryption at rest should be sufficient.

Amy suggestions.

You can use Nextcloud, with or without office integration, I use it with Collabora Online for working in office documents.

You can edit text files without any office integration, and .md files has the option to select images.

Yeah, thanks for the suggestion. NextCloud isn’t quite what I am looking for. I want something like OneNote or Obsidian, but self-hostable.

I guess I can look at there md support.