Zulip Operator Commands: Difference between revisions

From Hackers & Designers
(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...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
}}
}}
[[Category:Maintenance]]
[[Category:Maintenance]]
== Restart Zulip ==
In the necessity of restarting Zulip:
* ssh to server as zulip
* Then run: <code>/home/zulip/deployments/current/scripts/restart-server</code>
* You can login as another user to the VPS, and impersonate the zulip user by doing:
** <code>su zulip -c /home/zulip/deployments/current/scripts/restart-server</code>
** This command will first prompt you for the zulip user password.
== Use Manage CLI ==


Zulip has extensive [https://zulip.com/api/ user-facing APIs], as well as a CLI called [https://zulip.readthedocs.io/en/stable/production/management-commands.html Management commands] to run common actions when working with the Zulip system.
Zulip has extensive [https://zulip.com/api/ user-facing APIs], as well as a CLI called [https://zulip.readthedocs.io/en/stable/production/management-commands.html Management commands] to run common actions when working with the Zulip system.


== Instruction ==
=== Instruction ===


* ssh with the zulip account to the server
* ssh with the zulip account to the server
Line 14: Line 26:
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.  
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 ===
==== To list all realms ====


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


== To create a new user ==
=== To create a new user ===


Do:
Do:

Latest revision as of 12:48, 17 June 2022

MainNavigation No

Restart Zulip

In the necessity of restarting Zulip:

  • ssh to server as zulip
  • Then run: /home/zulip/deployments/current/scripts/restart-server
  • You can login as another user to the VPS, and impersonate the zulip user by doing:
    • su zulip -c /home/zulip/deployments/current/scripts/restart-server
    • This command will first prompt you for the zulip user password.

Use Manage CLI

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).