Skip to content

TiddlyWiki/MultiWikiServer

Repository files navigation

MultiWikiServer

Donate via PayPal to support development

Multiple users, multiple wikis for TiddlyWiki.

  • Bag & Recipe system for storing tiddlers.
  • User and Role management with ACL.
  • Multiple database engines supported, using Prisma.
  • Third-party OAuth and password-based login.

Flexible and Extendible

  • Plugins can add routes and hooks.
  • Abstractions everywhere, allowing flexibility.
  • The source code is fully typed and easy to navigate.
  • Admin endpoints can also be called from the CLI.

Most of these features are still in development.

Do not use it to protect feelings or intellectual property.

Warning: Security is still a dumpster fire.

While the database structure is reliable, the security mechanism isn't. Do not use it to protect feelings or intellectual property. There are still ways to easily get around the security restrictions.

this is fine

Also, this is a database, please make backups

Databases try very hard to be perfect, and data bugs are rare. But that doesn't mean things can't go wrong. Backups are pretty important.

How to run

The init command creates a new folder and installs what you need to get started. You can name "my-folder" whatever you want.

  • npm init @tiddlywiki/mws@latest my-folder
  • cd my-folder
  • npx mws init-store
  • npx mws listen --listener

You can run npx mws help to get more information about the commands.

  • the server runs on port 8080. It does not use HTTPS by default, but you can enable it by specifying a key and cert.
  • A passwords.key file is created which contains the password master salt. If this file changes, all passwords will need to be reset.
  • Your database is in the store folder. All files in the store folder are data files, not temp or lock files! Never delete them!

The initial user created on first run has the username admin and password 1234.

If you run into trouble, or need help figuring something out, feel free to start a discussion. If you know what's wrong, you can also open an issue.

Updates

If upgrading from 0.0, the best way to save your information is to open each wiki and click the cloud status icon, then click "save snapshot for offline use". You can then create a new instance and import your wikis via the browser.

If updating within 0.1,

  • Copy or zip your entire folder to a safe backup folder.
  • npm install @tiddlywiki/mws@latest

If there are any database changes, MWS should pick them up and apply them on startup. The changes are generated by prisma's builtin migration and are supposed to preserve data, but backups are still highly recommended.

The 0.1 database is incompatible with the 0.0 database. Version 0.1 will detect this and exit immediately to prevent data loss.

Backups

It is recommended to backup your entire data folder, not just the store folder, except the cache folder.

  • You must always backup the entire store folder. Never delete any files in the store folder. All files in the store folder are data files!
  • You should definitely backup the package.json file, as it contains the MWS version you are currently using. The package-lock.json file is also useful if you don't want to back up the entire node_modules folder for some reason.
  • The cache folder (next to the store folder) is generated every time MWS starts, so you can exclude that from backups if you want.
  • The node_modules folder should be included in your backup, as it contains all the application code required to run your database, but it can also be reconstructed from the package-lock.json file or the package.json file.

MWS uses NPM packages, so as long as you back up the entire store folder, and the package-lock.json file, you should have enough information for a NodeJS developer to reconstruct the site.

Development

In 0.1, the development data folder is /dev/wiki.

If you want to work on the project,

  • git clone https://github.com/TiddlyWiki/MultiWikiServer
  • cd MultiWikiServer
  • npm install or npm run install-android
  • npm run certs - if you want https (unix only)
  • npm start init-store - Create the admin user and import default wikis.
  • npm start - this will run the build every time, but it's very fast.

The development wiki will be active at http://localhost:8080/

You can change the listeners as explained in the mws.dev.mjs file.

About

Multiple Users, Multiple Wikis

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5