aboutsummaryrefslogtreecommitdiffstats
path: root/man/prosodyctl.markdown
blob: c5b93627eaf7eb5272602d4100ff3710b94b2db9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
author:
- Dwayne Bent <dbb.1@liqd.org>
- Kim Alvefur
date: 2022-02-02
section: 1
title: PROSODYCTL
---

# NAME

prosodyctl - Manage a Prosody XMPP server

# SYNOPSIS

    prosodyctl command [--help]

# DESCRIPTION

prosodyctl is the control tool for the Prosody XMPP server. It may be
used to control the server daemon and manage users.

prosodyctl needs to be executed with sufficient privileges to perform
its commands. This typically means executing prosodyctl as the root
user. If a user named "prosody" is found then prosodyctl will change to
that user before executing its commands.

# COMMANDS

## User Management

In the following commands users are identified by a Jabber ID, jid, of
the usual form: user@domain.

adduser jid
:   Adds a user with Jabber ID, jid, to the server. You will be prompted
    to enter the user's password.

passwd jid
:   Changes the password of an existing user with Jabber ID, jid. You
    will be prompted to enter the user's new password.

deluser jid
:   Deletes an existing user with Jabber ID, jid, from the server.

## Daemon Management

Although prosodyctl has commands to manage the prosody daemon it is
recommended that you utilize your distributions daemon management
features if you attained Prosody through a package.

To perform daemon control commands prosodyctl needs a pidfile value
specified in `/etc/prosody/prosody.cfg.lua`. Failure to do so will cause
prosodyctl to complain.

start
:   Starts the prosody server daemon. If run as root prosodyctl will
    attempt to change to a user named "prosody" before executing. This
    operation will block for up to five seconds to wait for the server
    to execute.

stop
:   Stops the prosody server daemon. This operation will block for up to
    five seconds to wait for the server to stop executing.

restart
:   Restarts the prosody server daemon. Equivalent to running prosodyctl
    stop followed by prosodyctl start.

reload
:   Signals the prosody server daemon to reload configuration and reopen
    log files.

status
:   Prints the current execution status of the prosody server daemon.

## Certificates

prosodyctl can create self-signed certificates, certificate requests and
private keys for use with Prosody. Commands are of the form
`prosodyctl cert subcommand`. Commands take a list of hosts to be
included in the certificate.

`request hosts`
:   Create a certificate request (CSR) file for submission to a
    certificate authority. Multiple hosts can be given, sub-domains are
    automatically included.

`generate hosts`
:   Generate a self-signed certificate.

`key host [size]`
:   Generate a private key of 'size' bits (defaults to 2048). Invoked
    automatically by 'request' and 'generate' if needed.

`config hosts`
:   Produce a config file for the list of hosts. Invoked automatically
    by 'request' and 'generate' if needed.

`import hosts paths`
:   Copy certificates for hosts into the certificate path and reload
    prosody.

## Debugging

prosodyctl can also show some information about the environment,
dependencies and such to aid in debugging.

`about`
:   Shows environment, various paths used by Prosody and installed
    dependencies.

`check [what]`
:   Performs various sanity checks on the configuration, DNS setup and
    configured TLS certificates. `what` can be one of `config`, `dns`
    and `certs` to run only that check.

## Ejabberd Compatibility

ejabberd is another XMPP server which provides a comparable control
tool, ejabberdctl, to control its server's operations. prosodyctl
implements some commands which are compatible with ejabberdctl. For
details of how these commands work you should see ejabberdctl(8).

    register user server password

    unregister user server

# OPTIONS

`--config filename`
:   Use the specified config file instead of the default.

`--root`
:   Don't drop root privileges.

`--help`
:   Display help text for the specified command.

`--verbose`
:   Increase log level to show debug messages.

`--quiet`
:   Reduce log level to only show errors.

`--silent`
:   Disable logging completely, leaving only command output.

# FILES

`/etc/prosody/prosody.cfg.lua`
:   The main prosody configuration file. prosodyctl reads this to
    determine the process ID file of the prosody server daemon and to
    determine if a host has been configured.

# ONLINE

More information may be found online at: <https://prosody.im/>