This is an adptation of this article describing a redbean-based tiddlywiki server (with persistence) shared on lobste.rs and hacker news. Unfortunately, the code provided in the article doesn't work out-of-the-box, so here it is for an easy copy-paste.
if [ ! -f redbean.com ]; then
curl https://redbean.dev/redbean-latest.com -o redbean.com
chmod +x redbean.com
fi
cp -a redbean.com wiki.com