This is an efficient, low-maintenance web server for TiddlyWiki. It uses the [web server API] provided by the TiddlyWeb plugin to save tiddlers in a SQLite database. It's written in Rust.
The easiest way to run tiddly-wiki-server
is with Docker Compose. You can grab
the compose file from this project and then start a
server with
docker compose up
To run the server directly,
cargo install --path .
).tiddly-wiki-server --bind 0.0.0.0 --port 3032 --dbpath ./tiddlers.sqlite
If the database doesn't exit, tiddly-wiki-server
will create and initialize
it.
See the tiddly-wiki-server --help
for instructions on changing the bound
address, port, database path, etc.
TiddlyWiki 5 has a NodeJS based web server that re-uses much of the front-end JavaScript for maximum compatibility. However, this server needs about 70 MB of memory to start, and can easily consume 100 MB or more. This is fine for running on a workstation, but a cheap VPS quickly gets crowded running services that size.
In rudimentary benchmarks it looks like tiddly-wiki-server
uses about 10 MB of
memory, which I find much more manageable. It's also easier to deploy!
This project is made available under The Prosperity Public License 3.0.0, which gives you broad permissions for:
but doesn't let you build a business on the author's work.
If you're uncertain if your use case might be infringing or you want to use it under a different license, reach out to @natknight.
The initial page that this project serves has a few changes compared to the empty wiki you can download from http://tiddlywiki.com/empty.html. It has:
noscript
section for browsers that disable JavaScript (this is
considered a bug)This modified wiki was created by following this procedure:
script
element to the very end of the HTML document with
class="tiddlywiki-tiddler-store"
type="application/json
The empty wiki is then embedded in the tiddly-wiki-server
binary; when the
page is loaded, it inserts the stored tiddlers into the empty wiki and serves
it. The result isn't exactly what you'd get by loading the content into a
regular TiddlyWiki and saving it, but it has all the same features, including
that you can always download a copy and have a full, working TiddlyWiki with all
of your tiddlers.
The most valuable way to contribute to this project is currently testing: try to setup a TiddlyWiki with it and see if it behaves the way you'd expect. The server aims to have feature parity with the first-party NodeJS server; any discrepancy is a potential bug, which I'd be very grateful to have reported!
Contributors are expected to abide by the Contributor Covenant.