1. Open Source
2. Notes must be encrypted when saved to the database.
3. Export options(markdown, or PDF or even txt files work, although that will mean no image support).
4. Lightweight, so I can either run it on a Raspberry Pi or a 1 GB VPS.
5. I would also like a web interface so that I can connect to it from any device.
I would also love to hear what applications you guys are using.
I've been having a lot of luck organizing my life with nextcloud this last few months. It does take a little bit of setup, but it has notes, files, and lots more.
Another option is an app like notable (markdown notes) and something to sync across devices with. I hear a lot of people use syncthing, I haven't personally, I have a private git server that I've used in the past, but I've since migrated everything to a private nextcloud server that's only accessable by wireguard when remote or wifi when at home.