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
if [ ! -f wiki.html ]; then
curl https://tiddlywiki.com/empty.html -o wiki.html
fi
zip wiki.com wiki.html index.lua
./wiki.com -M 5000000 -\*
To run the tiddlywiki server (as the previous build script will erase everything stored in the wiki.com
binary), use ./wiki.com -M 5000000 -\*