Run Tiddlywiki (node) in Docker with Tailscale

Why would you run Tiddlywiki on node in Docker in Tailscale (TS) ?

Because you get a Fully Qualified Domain Name (FQDN) on a private subnet protected by SSL which you can use on any Tailscale-enabled device without worrying about the coffee-shop WiFi, or having to constantly key punch new IP numbers at every new coffee-shop, or even having to remember which port number you assigned to which project. And since it’s running inside of a Docker container, your system is (hopefully!) safe from hackers. You run on your own subnet, which is closed to the world (unless you open it up as a “funnel”, which you probably shouldn’t without adding user/password security). You might set up your own spare machine to self-host.

I started to get interested in self-hosting TiddlyWiki after someone in this forum posted about TiddlyWiki in Yunohost. This lead me to explore Docker, which lead to other things. Then I started wondering if I could set up my own Docker image. Then, realising that I didn’t really know what I was doing, I thought maybe I should first check if anyone else had already created a docker image.

The Docker catalog shows 161 entries for TiddlyWiki! It’s like re-inventing the wheel 161 times!

The one at the top of the list shows a million downloads! I think Docker downloads may represent Docker pulls, which doesn’t always mean a literal download, but still.

Unfortunately, that particular image was 5 years out of date (5.1.23) . Looking further, I found one by Nicola W. which is as recent 5.3.6. It has merely 500k downloads. Thank you Nicola!

I adapted it to include Tailscale following a simple recipe.

To adapt it to your use case, you will need to:

  1. Make an account with Tailscale. With Google login you can get this in about two clicks. Also go into the settings and request a domain name.
  2. Install docker, docker compose, and Tailscale on your “server”.
  3. Install Tailscale and login on whatever platforms where you want to use TS
  4. Get an authentication key from Tailscale
  5. Expand the attached archive somewhere on your drive.
  6. Edit docker-compose.yaml for the name of the wiki you want to create.
  7. Edit config/tiddlywiki.json if you want to serve your files to the world (inadvisable without user/password configuration)
  8. Go to a terminal and go Inside your directory, run docker compose up -d
  9. Check your TS dashboard to verify that your container is running. Grab the FQDN it provides for the container and paste it into your browser.

In this configuration, your wiki files will exist in a subdirectory “tiddlywiki”. Don’t mess with the tiddlers outside of the browser process while your Docker is running. You can shut Docker down to make backups.

Ok. That was a whirlwind tour. I’ve only tested on my Linux box. Supposedly it should work on Docker on windows, but who knows …

Use at your risk. As far as I know everything here is safe, but no guarantees are made.

tiddlywiki-docker-distrib.zip

I currently host a node server on my NAS and connect via tailscale. It’s been incredibly reliable and fast for me :slight_smile: especially running MWS