Self Host Wizard Docs

Add a company

Put another company on the same box, with its own name, teams, admins, shared calendars and folders, and choose which installed apps its people see.

One box serves several companies. Each company is an org in the box's state, and each org becomes a group in the directory, so every app that reads the directory knows who belongs where. A person can belong to more than one company.

Choose the short name

The short name (the org) is what commands and group names use, so pick it once. It may hold lowercase letters, digits and hyphens, and it may not end in -admins, because that suffix names the company's admin group. The display name, such as "Acme S.A.", is separate and can change at any time.

Steps

  1. Add the company with its display name: sudo thx org add acme --title "Acme S.A.". This creates two directory groups: org-acme for its people and org-acme-admins for the people who run it.
  2. Add its teams, if it has any: sudo thx team add acme sales. Each team is the group team-acme-sales.
  3. Apply, so the directory gets the new groups: sudo thx apply.
  4. Give the company a domain: sudo thx domain add acme.example --org acme. Adding a domain covers the DNS records. If you skip step 1, thx domain add with --org creates the company for you, without a display name; set one later with sudo thx org title acme "Acme S.A.".
  5. Add its people with --org acme, and its admins with --org-admin acme. See users and groups.

What the company gets

Nothing has to be created app by app. The apps read the company's groups from the directory:

  • Files: a shared space at /org/acme in Drive for every member of org-acme, and /team/acme/sales for the team. A person sees only the spaces of their own groups; other companies' folders answer "not found", so their names never leak.
  • Calendars and contacts: a shared calendar and address book at /org-acme/ and /team-acme-sales/ on the calendar server. Members can add and change entries; nobody can delete the shared collection itself. The calendar piece creates these collections when its set-up script runs, once a day, so a new group's calendar can take up to a day to appear unless you run sudo thx post-up radicale.
  • Mail: addresses on the company's domains. A person's main address is their account's email; extra addresses on any served domain are aliases (thx user alias add).

Which apps the company sees

Every installed app is on for every company. To hide one from a company's people, for example the CRM: sudo thx org app acme espocrm off. Turn it back on with on. This only hides the app for that company; the app stays installed for everyone else, and its data is untouched.

Removing a company

This version has no command that removes a company. You can remove the company's domains with sudo thx domain rm acme.example and its people with sudo thx user rm, and you can turn its apps off. The org itself, and its groups, stay in the state file.

Facts on this page come from these files in the selfhostwizard repository:

  • cmd/thx/main.go
  • internal/state/state.go
  • pieces/lldap/README.md
  • pieces/drive/README.md
  • pieces/radicale/README.md

Updated