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.
Security is a core priority.
- MWS supports HTTPS through Node.js. We strongly recommend enabling it.
- MWS uses OPAQUE for password-based authentication, so users' plaintext passwords are never sent to the server.
- Role-based access controls let you grant users access to individual wikis.
One Caveat: Currently, the security for users with write access is minimal. Having write access to even one wiki makes it possible to craft code that impersonates other users and reads or writes data they have access to.
We rely on established database technology to help protect data integrity. MWS currently uses SQLite, and we are planning to support more database engines in the future.
Remember: Your database files are stored in your wiki folder. Back up the folder regularly.
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-foldercd my-foldernpx 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.keyfile is created which contains the password master salt. If this file changes, all passwords will become unusable and need to be reset. - Your database is in the
storefolder. All files in thestorefolder 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.
Within 0.x versions, please do NOT use npm install to update your instance from one minor version to the next.
To update between 0.x versions, 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.
Always, always, always save a backup of your store folder before updating.
- You can update to the latest version of MWS using
npm update. - You can update to the latest version of TiddlyWiki using
npx mws update-tiddlywiki.
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.
It is recommended to backup your entire data folder, not just the store folder, with a few exceptions.
- You must always backup the entire
storefolder. Never delete any files in thestorefolder. All files in thestorefolder are data files! passwords.keycan be backed up, but since it never changes you could also just save a copy of it in a more secure location separate from your normal backups.- You should backup
package.jsonandpackage-lock.json. - The
node_modulesfolder can be ignored.npm ciwill reinstall thenode_modulesfolder based onpackage-lock.json. - The
cachefolder (next to thestorefolder) is generated every time MWS starts, so it's nothing but bloat. You can always ignore it. - Only the
tw5/versions.txtfile needs to be saved from thetw5folder.
So essentially, the paths you need to backup are:
/package.json/package-lock.json/store/tw5/versions.txt/passwords.key(or save it separately)
In 0.2, the development data folder is /dev/wiki.
If you want to work on the project, or just try out the latest changes,
git clone https://github.com/TiddlyWiki/MultiWikiServercd MultiWikiServernpm installornpm run install-androidnpm run certs- if you want https (unix only)npm start update-tiddlywiki- Download the latest TiddlyWiki versionnpm start init-store- Create theadminuser 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.