Skip to content

TiddlyWiki/MultiWikiServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiWikiServer

Donate via PayPal to support development

Warning

This is not ready for primetime. Do not use it to protect feelings or intellectual property. Seriously. The security mechanisms required are not built yet.

So please try it out, kick the tires, import your multi-gigabyte wikis and play around with it, but don't actually store anything you want to keep. We'll hopefully get there soon, but even the database schema itself is still in flux as we figure out what the best layout is for all the stuff we have planned.

Security is still a dumpster fire.

this is fine

Upgrades can break your wiki, always make backups

Storing data is safe enough, sort of, but upgrading to new versions is where the problem comes in. That's why your package.json file has the exact version number saved. You can upgrade your TiddlyWiki version separate from the MWS version. Once you upgrade to a new MWS version, you might not be able to revert to the previous version. Always make backups. Also, you should not give untrusted users write access on any bags or recipes because they can write code that can run as any user.

Also, this is a database, please make backups

Seriously, you never know. Databases try very hard to be perfect, and a small number of database engines run the entire internet, so there are a lot of eyes on them, and data bugs are rare. But that doesn't mean things can't go wrong. Backups are critical.


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.

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 localpass.key file is created to hold the password keyfile. If this file changes, all passwords will need to be reset.
  • The database is in the store folder. Backups MUST save the entire store folder. All files are critically important. They are not temp files.

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. However, 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 definitely be included in your backup, as it contains all the application code required to run your database.

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/dev

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

About

Multiple Users, Multiple Wikis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5