First Time VPS Hosted Tiddlywiki - Best method for multiple servers running

I have made my initial attempt to move a few game related tiddlywikis online as nodejs versions in place of my current online single file wikis.

Progress so far:

  1. Stand up ubuntu server
  2. Managed DNS records for domain and subdomains
  3. Installed nodejs
  4. Installed npm
  5. Installed nginx
    • mangled config files for subdomains and proxy_pass
  6. Installed certbot
    • obtained certificates
  7. Installed Tiddlywiki
    • initialized multiple empty wikis aligned with the subdomains
  8. validated individual tiddlywiki servers working with options
    • credentials
    • lazy-all
    • readers anon
    • writers authenticated

What is the best path forward for running them all concurrently? I am reading pm2 docs which I believe is the path forward but thought I should inquire.

Have I missed anything else obvious in the process?

First time linux user, so this has been an enjoyable learning process along the way.

1 Like

If you type a command followed by &, it will run in the background. Like,

tiddlywiki server --listen --port 8088 &

This way you can run several TiddlyWiki by running them as background jobs.

You can can also open multiple panes in the terminal and run TiddlyWiki in different panes, one pane for each TiddlyWiki, using tmux.

1 Like

You may want to look into systemd services. All Ubuntu versions newer than 15.04 (i think it was) come with systemd already set up, with other distros adopting systemd earlier.

If you want to, you can also look into container systens like Docker & such. They may be quite useful depending on what you want to do.

1 Like

I had the same requirement and i have solved this with docker and docker-compose:

Unfortunately there is no official tiddlywiki docker container. So I use this one (thanks to Nicolaw):

---
#
# MIT License
# Copyright (c) 2022-2022 Nicola Worthington <nicolaw@tfb.net>
#
# https://gitlab.com/nicolaw/tiddlywiki
# https://nicolaw.uk
# https://nicolaw.uk/#TiddlyWiki
#

version: "3.4"

services:
  tiddlywiki01:
    container_name: tiddlywiki01
#    image: nicolaw/tiddlywiki
    restart: always
    user: PUID:PGID
    environment:
      TW_WIKINAME: mywiki
#      TW_ROOTTIDDLER: $$:/core/save/all
      TW_ROOTTIDDLER: $$:/core/save/lazy-images
#      TW_ROOTTIDDLER: $$:/core/save/lazy-all
    ports:
      - "8081:8080"
    volumes:
      - /Docker-Volumes/tiddlywiki01:/var/lib/tiddlywiki/
    build:
      context: https://gitlab.com/nicolaw/tiddlywiki.git
      args:
        TW_VERSION: 5.2.4
        USER: PUID
#        BASE_IMAGE: 1.19.2-alpine3.16
 
2 Likes

Thank you, lots to consume and learn.