Open Source Journal
A journal is the one document you write assuming no one else will ever read it, which makes where the entries physically live the whole point - a private thought stored on someone else's server isn't private, and a diary you can't export is a diary you can lose. The open source options here keep your entries as plain files or encrypted text on your own machine, versioned or synced however you choose, so the most candid thing you write stays under a lock only you hold.

jrnl
Command line journal app for writing, searching, and viewing notes in plain text

GitJournal
Mobile-first Markdown note taking with Git-backed storage you can keep in your own repo
Moodiary
Cross-platform open source diary app with local storage, search, sync, and multimedia entries

StoryPad
Privacy-focused open source journal and diary app with a continuous timeline for notes, moods, and memories

RedNotebook
Cross-platform desktop journal for tagging, searching, and exporting entries