Zulip Operator Commands

From Hackers & Designers
Revision as of 16:41, 23 May 2022 by Fincato (talk | contribs) (Created page with "{{Article |MainNavigation=No }} Category:Maintenance Zulip has extensive [https://zulip.com/api/ user-facing APIs], as well as a CLI called [https://zulip.readthedocs.i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
MainNavigation No

Zulip has extensive user-facing APIs, as well as a CLI called Management commands to run common actions when working with the Zulip system.

Instruction

  • ssh with the zulip account to the server
  • cd into deployments/current (full path it's usually /home/zulip/deployments/current)
  • run ./manage.py to print a list of all available commands

As part of each command invocation, a "realm" ID shoud be set: eg, a number associated with the Zulip instance we want to work with.

To list all realms

Do:

./manage.py list_realms

Then take note of the number (realm ID) associated with the URL at which the Zulip instance runs on.

To create a new user

Do:

./manage.py create_user '<email> '<user name>' -r <realm ID> --this-user-has-accepted-the-tos --password='<password>'

After this an email should be sent to the set email, and the user already created in the Zulip system. This might be useful when having problems with creating a new user invitation purely via email using the Zulip GUI commands (sometimes confirmation emails — after the user signed up to Zulip via the shared URL invitation — don't arrive to the user's desired email).