Hosting multiple TiddlyWikis on Node

I only recently1 found out about TiddlyWiki, and immediately became enamored with it. After a couple months of playing with individual files, today I made a breakthrough today in hosting TiddlyWiki on my site.

I tried a few ways to initialize with cPanel on my current host, without any luck (I may return to this next, now that I’ve seen it in action. It turned out to be much easier to spin up a DigitalOcean droplet with Node, and follow the instructions in this guide from Josh Sullivan. The only modification I made was to use pm2 instead of forever (as DigitalOcean already had it configured). I found another article on initializing pm2 with Tiddlywiki, and I used the following command in place of forever:

pm2 start --name wikiprocessname /lib/node_modules/tiddlywiki/tiddlywiki.js -- nameofwikifolder --listen author=name username=name password=yourpassword "readers=(anon)"

Now, my experimentation with TiddlyWiki involved saving single html files and playing with each individually. I ended up with a few single-topic wikis – one for archiving my old notebooks, one for my video game collection, etc. I may combine at some point, but I thought it would be better for now to host individually. All that needed to happen, at least with the DigitalOcean reverse proxy setup, was to initialize nginx correctly.


sudo nano /etc/nginx/sites-available/DOMAIN2.COM
sudo nano /etc/nginx/sites-available/DOMAIN3.COM

Then in each file, make sure the port is unique and the URL matches. Symbol links for each:


sudo ln -s /etc/nginx/sites-available/DOMAIN2.COM /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/DOMAIN3.COM /etc/nginx/sites-enabled/

Rerun certbot if needed for these URLs, then intialize each in pm2:

pm2 start --name wikiprocessname /lib/node_modules/tiddlywiki/tiddlywiki.js -- nameofwikifolder --listen port=#### author=name username=name password=yourpassword "readers=(anon)"

You can play with the various arguments for the TiddlyWiki webserver outlined here. I made a couple available to only myself for now by removing “readers=(anon)”. Don’t forget to run pm2 save so your server stays up.

Going to keep playing, but right now my commonplace book is live with barely anything in it. Hope this helps someone get theirs off the ground as well.


  1. Pretty sure I picked up the idea from Chris Aldrich, who wrote his own guide for hosting the single file version of TiddlyWiki.

Sound off

Comment

  1. Inspired by nownownow, I’ve started my now page.
    Current undertaking(s)
    Home matters and world events have sort of put blogging in the back seat. With the latest current events, I’ve been racking my brain trying to figure out ways to help. This list of bail funds by state helped tremendously.
    But here, my current itch (an ongoing one) is looking at various note-taking tools, trying to figure out the best way to digitize my physical notebook collection. Most recent tool used was TiddlyWiki, which inspired me to set up my own commonplace book here. Current apple of my eye is Obsidian, which is all in markdown. This is making me consider a possible move to Blot again…
    Current setup
    Phone: Galaxy Note 20 Ultra (will probably write a post on this soon)
    Laptop: Surface Book 2016
    Notebook: Field Notes, Vignette edition
    Media consumption
    Playing: Marvel’s Avengers and NBA 2K20 on Stadia, Stardew Valley on phone
    Watching: The Last Dance on Netflix, and Doctor Who rewatch from personal collection (10th Doctor, started in series 2).
    Last updated 8 Sept 2020

  2. I only have a bit to add to the correct notion here that 2020 is not worth recapping. I was extraordinarily fortunate and lucky over the past year. I got a new job, and no one in my immediate bubble has caught the plague going around. I was able to chronicle how different everything was.
    The only thing to add to this notion is a general, simmering rage that has been building since March. From forcing everything to reopen, to brand new kindergarten students having to learn over Zoom calls, to seeing other countries able to hold large gatherings in the fall, to watching helplessly as doses of the miraculous vaccination expire, unused. My trust in basically everyone currently in a position of power is gone, unlikely to be repaired. Little acts along the way help, but I am not sure the rage will ever subside.
    I will think about other little acts while I go noodle around some more with TiddlyWiki.