Files
wekan/docs/Platforms/FOSS/Docker/Meteor3
Lauri Ojansivu 36b899b9d6 Multitenancy: one WeKan server for many domains, with Organizations as tenants.
Implements option D of docs/Design/Multitenancy/Multitenancy.md, which that
document now describes as shipped.

An Organization may claim hostnames (Admin Panel / People / Organizations ->
Edit), carry its own branding - product name, logos, help link, legal notice and
theme colour - and have its own Organization admins, appointed from the row's
"..." menu. The request's host picks the Organization; its branding replaces the
instance branding for that request, and the client bundle that host serves points
its DDP connection back at that host instead of at the one ROOT_URL.

An Organization admin administers their own Organization and nothing else: its
people, its Organizations row, its theme colour and its backups. They can never
grant the site-wide Admin flag, never manage a site admin, and never see another
Organization's people or archives.

Per-tenant backup and restore is one new control in Admin Panel / Attachments /
Backup - Scope. An Organization's archive holds its boards and everything on them
plus the attachments those boards use, and no accounts, no instance settings and
no org/team documents, because those are shared. A restore may only write to
boards that Organization owns: the board ids are the intersection of what the
archive claims with what the Organization really owns, every document is checked
against that, and "replace all" replaces that Organization's documents rather
than everyone's.

Admin Panel / Settings / Visibility gains a Change color section above Logo: the
site theme, rendered by the SAME shared picker as Board Settings and Member
Settings - one template for all three, the way one shared table page serves every
table. Its design is the new docs/Design/Page/Theme.md. The order of themes is
WeKan's default theme, then the site theme (an Organization's own value on its own
hosts), then a user's own override; a board's own colour still owns the board page.

All of it is OFF unless the server is started with MULTITENANCY=true (plus
MULTITENANCY_TRUST_PROXY_HOST=true when a trusted proxy sets X-Forwarded-Host), so
an instance that has never heard of tenants answers exactly as before. One WeKan
server per customer remains the supported topology for customers who must not
share a process, and the design says plainly what this does NOT isolate.

The decisions are three pure modules - models/lib/tenants.js, tenantAdmin.js and
tenantBackup.js - so the same rules run on the client, on the server and in the
tests. Four new suites pin the separation rather than the plumbing: forged Host
headers, cross-tenant queries, privilege escalation and cross-tenant restores.

Thanks to xet7 !
2026-07-26 07:48:18 +03:00
..
2026-05-18 03:20:42 +03:00
2026-05-18 03:42:40 +03:00
2026-05-18 03:02:57 +03:00

Meteor 3 WeKan: Hosting many WeKan kanban, websites, etc

1) Install WeKan exactly like this

Use all settings and config files at this page and subdirectories.

2) Backup your previous WeKan server

See backup scripts etc, mongodump and files directory

3) Restore to your new WeKan install

Use restore scripts to mongorestore and restore files (attachments and avatars)

4) Move all files from MongoDB to filesystem

This will speed up loading attachments a lot.

  1. Admin Panel / Attachments
  2. Default Storage: Filesystem
  3. Move Files: From MongoDB CollectionFS to Filesystem
  4. Move Files: From MongoDB Meteor-Files to Filesystem
  5. MongoDB GridFS Storage: Compact Database (this will make MongoDB disk usage smaller)

Migrating from Snap to Docker

Note: Only Oplog sockjs works with multitenancy, see multitenancy.md. For the alternatives to running one Node.js server per tenant — one server for many ROOT_URLs, and what each option costs — see Multitenancy design.

Migrating from Parallel Snap setup, because snap set wekan root-url=... etc commands are slow to run, and did not get Parallel Snap working properly yet.

caddy proxy: Let's Encrypt and CloudFlare TLS to localhost http ports
  |
  |==> Many Parallel WeKan Snap Containers at different ports,
  |    each Container with it's own Node.js/MongoDB
  |==> Sandstorm, many websites with WordPress and Hackers CMS
  |==> PHP/MySQL WordPress     (example)
  |==> PHP/MySQL Hesk Helpdesk (example)
  |==> PHP/MySQL Kanboard      (example)
  |==> Static websites         (example)

To this Docker setup:

caddy proxy: Let's Encrypt and CloudFlare TLS to localhost http ports
  |
  |==> Many Docker Meteor 3 WeKan Node.js Containers,
  |    Uses changeStreams and DDP_TRANSPORT=uws
  |     |
  |     |=> One MongoDB without container,
  |         always requires password to login,
  |         for admin and each other users,
  |         each user has it's own database, username and password
  |
  |==> Sandstorm, many websites with WordPress and Hackers CMS
  |==> PHP/MySQL WordPress     (example)
  |==> PHP/MySQL Hesk Helpdesk (example)
  |==> PHP/MySQL Kanboard      (example)
  |==> Static websites         (example)

Save all Parallel Snap container settings with:

snap-save-settings.sh

For setting up MongoDB etc, use examples at apt directory.

MongoDB config /etc/mongod.conf is at mongo directory.

Create MongoDB key:

./keys.sh
  1. Adding new user, it saves MongoDB connection string to username.txt:
./1createdb.sh username

Same username.txt is used when login to database, backup, restore, files transfer, etc.

You can connect to database:

./sh.sh username

Or sometime make Backup to backup/username/YYYY-MM-DD_HH-MM-SS/

./backup.sh username
  1. Create docker-compose.yml to restore/username/
./2docker.sh username

Edit docker-compose.yml and start Docker container:

cd restore/username/

nano docker-compose.yml

docker compose up -d
  1. Restore database
./3restoredb.sh username
  1. Transfer attachments and avatars from Snap server to Docker server:
./4files.sh username
  1. Restart Docker container:
cd restore/username/

docker compose stop

docker compose start
  1. Upgrade WeKan from old version to new version, for example:
./update-wekan-version.sh 9.10 9.11