You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/admin/guide/managing.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,18 +90,22 @@ The `ejabberdctl commands` are:
90
90
91
91
<!-- md:version added in [25.03](../../archive/25.03/index.md) -->
92
92
93
-
The `ejabberdctl` script can execute ejabberd API commands inside the running ejabberd node. For this, the script starts another erlang virtual machine and connects it to the already existing one that is running ejabberd.
93
+
The `ejabberdctl` script can execute ejabberd API commands inside the running ejabberd node.
94
94
95
-
This connection method is acceptable for performing a few administrative tasks (reload configuration, register an account, etc). However, ejabberdctl is noticeably slow for performing multiple calls, for example to register 1000 accounts. In that case, it is preferable to send ReST queries over HTTP to mod_http_api.
95
+
By default this is done by starting another erlang virtual machine
96
+
and connecting it to the already existing one that is running ejabberd.
97
+
That method is acceptable for performing a few administrative tasks (reload configuration, register an account, etc). However, ejabberdctl is noticeably slow for performing multiple calls, for example to register 1000 accounts.
96
98
97
-
ejabberdctl can be configured to use an HTTP connection to execute the command, which is way faster than starting an erlang node, around 20 times faster.
99
+
An alternative method is to configure ejabberdctl to use `curl`
100
+
and send ReST queries over HTTP to mod_http_api.
101
+
This is way faster than starting an erlang node, around 20 times faster.
98
102
99
103
To enable this feature, first configure in `ejabberd.yml`:
100
104
101
105
```yaml
102
106
listen:
103
107
-
104
-
port: "unix:sockets/ctl_over_http.sock"
108
+
port: "unix:ctl_over_http.sock"
105
109
module: ejabberd_http
106
110
tag: "ctl_over_http"
107
111
unix_socket:
@@ -120,19 +124,21 @@ api_permissions:
120
124
Then enable CTL_OVER_HTTP in `ejabberdctl.cfg`:
121
125
122
126
```sh
123
-
CTL_OVER_HTTP=sockets/ctl_over_http.sock
127
+
CTL_OVER_HTTP=ctl_over_http.sock
124
128
```
125
129
126
130
Let's register 100 accounts using the standard method and CTL_OVER_HTTP:
0 commit comments