| 1 |
# XMPP |
| 2 |
|
| 3 |
XMPP (Extensible Messaging and Presence Protocol) is an open protocol for near-real-time messaging. |
| 4 |
Shoutrrr's XMPP service enables sending fire-and-forget chat and multi-user chat (MUC) notifications to XMPP servers, such as [ejabberd](https://ejabberd.im/) and [Prosody](https://prosody.im/). |
| 5 |
Upstream docs: <https://xmpp.org/> |
| 6 |
|
| 7 |
## URL Formats |
| 8 |
|
| 9 |
The XMPP service supports two URL schemes for connection security: |
| 10 |
|
| 11 |
- __`xmpp://`__: STARTTLS on port 5222 by default |
| 12 |
|
| 13 |
!!! Info "" |
| 14 |
xmpp://__`user`__:__`password`__@__`host`__[:__`port`__]/?to=__`jid`__[&rooms=__`roomjid`__] |
| 15 |
|
| 16 |
- __`xmpps://`__: implicit TLS on port 5223 by default |
| 17 |
|
| 18 |
!!! Info "" |
| 19 |
xmpps://__`user`__:__`password`__@__`host`__[:__`port`__]/?to=__`jid`__[&rooms=__`roomjid`__] |
| 20 |
|
| 21 |
--8<-- "docs/services/chat/xmpp/config.md" |
| 22 |
|
| 23 |
At least one of `to` or `rooms` is required. |
| 24 |
|
| 25 |
## Authentication JID |
| 26 |
|
| 27 |
The URL userinfo is the login identity: |
| 28 |
|
| 29 |
- A localpart (`alice`) becomes `alice@host`. |
| 30 |
- A full JID (`alice%40jabber.example.com`) is used as-is, while `host` remains the TCP dial target. |
| 31 |
|
| 32 |
``` |
| 33 |
xmpp://alice%40jabber.example.com:[email protected]/[email protected] |
| 34 |
``` |
| 35 |
|
| 36 |
## TLS |
| 37 |
|
| 38 |
- Use `xmpp://` for STARTTLS (default port 5222). |
| 39 |
- Use `xmpps://` for implicit TLS (default port 5223). |
| 40 |
- Use `disabletls=yes` only with `xmpp://` for plaintext on a trusted network. Combining it with `xmpps://` is rejected. |
| 41 |
- Use `skiptlsverify=yes` to skip certificate verification (self-signed or internal TLS). TLS 1.2 remains the minimum. |
| 42 |
|
| 43 |
Plaintext SASL is used only when `disabletls=yes` is set. |
| 44 |
Encrypted connections prefer SCRAM-SHA-256, then SCRAM-SHA-1, then PLAIN. |
| 45 |
|
| 46 |
## Recipients |
| 47 |
|
| 48 |
- __`to`__: comma-separated JIDs sent as type=chat. |
| 49 |
- __`rooms`__: comma-separated MUC JIDs. The service joins, sends type=groupchat, and leaves. |
| 50 |
- __`nick`__: MUC nickname. Defaults to the auth JID localpart. |
| 51 |
- __`roompassword`__: password applied to every room in the URL. |
| 52 |
|
| 53 |
A `title` is prepended to the message body. The MUC subject is never changed. |
| 54 |
|
| 55 |
## Examples |
| 56 |
|
| 57 |
### Direct chat |
| 58 |
|
| 59 |
``` |
| 60 |
xmpp://alice:[email protected]/[email protected] |
| 61 |
``` |
| 62 |
|
| 63 |
### Multiple chat recipients and a room |
| 64 |
|
| 65 |
``` |
| 66 |
xmpp://alice:[email protected]/[email protected],[email protected]&[email protected] |
| 67 |
``` |
| 68 |
|
| 69 |
### Implicit TLS with a self-signed certificate |
| 70 |
|
| 71 |
``` |
| 72 |
xmpps://alice:[email protected]/[email protected]&skiptlsverify=yes |
| 73 |
``` |
| 74 |
|
| 75 |
### Password-protected room |
| 76 |
|
| 77 |
``` |
| 78 |
xmpp://alice:[email protected]/[email protected]&nick=shoutrrr&roompassword=s3cret |
| 79 |
``` |