TiddlyWiki is (much more than) an open source alternative to Roam Research. You can self-host it. Your entire Wiki (including all notes) is just one HTML file (if you want, it could also be separate markdown files), so sharing should be easy.
You need to choose a method for saving your changes. Many options to choose from, including Node.js, TiddlyDesktop, Beaker browser, WebDAV, TiddlyFox (not so much), or Git.
Via Tom Critchlow
Another good post by Le Cunff: open source and self-hosted alternatives to Roam
There's a TiddlyWiki subreddit and a TiddlyWiki Google group.
A reddit post listing open source alternatives to Roam Research.
A long discussion on HN on pros and cons of Roam based on Roam: Why I Love It and How I Use It by Nat Eliason.
And a post by Jack Baty comparing TiddlyWiki and Roam.
Another blog post, Tiddlywiki for organizing notes and research.
TiddlyBlink is an adaptation of TiddlyWiki, inspired by Roam's bi-directional links.
For the knowledge graph view, there's TiddlyMap.
There's also TiddlyRoam, which combines TiddlyMap and TiddlyBlink. The announcement reddit post, and source on github.
There's also org-roam (built on Emacs org-mode)
Popup IndieWebCamp Session 2020 (video recording of Zoom session), on wikis, blogs and such. Via kickscondor.com.
Using TiddlyRoam with TiddlyDesktop,
I still cannot figure out how to install plugins. If I use the built-in plugin library, and install e.g., Markdown parser, I get prompted to save and reload, do so, and then... nothing. Plugin is not installed, and the Wiki content starts over from scratch, whether I create a new HTML file or replace the existing one. What's up with that? A few edits later, the plugin now works as expected. Maybe it just took some time to apply, or maybe I restarted TiddlyDesktop (not sure).
The TiddlyMap page has an example of mapping a literature collection (using icons set with group styles).
Is this related? https://tomcritchlow.com/2020/05/19/tiddlywiki-krystal/
Apparently Roam (and by extension, TiddlyRoam) is a form of Zettelkasten?
Really old posts below: