Prosody: Difference between revisions
add link to dns set up |
domain and disco config |
||
Line 8: | Line 8: | ||
See official Prosody documentation here [https://prosody.im/doc/dns]. | See official Prosody documentation here [https://prosody.im/doc/dns]. | ||
* Domain of the xmpp address is the bare top level domain example.org. The bare top level domain has SRV records pointing to XMPP server xmpp.example.org. | |||
* XMPP server is hosted at xmpp.example.org. | |||
* XMPP services, such as STUN/TURN server, Multi-User Chat and HTTP upload are hosted at *.xmpp.example.org. As *.xmpp.example.org is not a direct subdomain of example.org, we need to set mod_disco to let XMPP client to discover the services. | |||
<syntaxhighlight lang="nix"> | |||
services.prosody.disco_items = [ | |||
{ | |||
description = "http upload"; | |||
url = "upload.xmpp.${domainName}"; | |||
} | |||
{ | |||
description = "multi user chat"; | |||
url = "muc.xmpp.${domainName}"; | |||
} | |||
]; | |||
</syntaxhighlight> | |||
* STUN/TURN server is hosted at turn.xmpp.example.org. | |||
* Multi-User Chat is hosted at muc.xmpp.example.org. | |||
* HTTP upload server is hosted at upload.xmpp.example.org. | |||
= SSL Certificate with ACME = | = SSL Certificate with ACME = | ||
Line 77: | Line 98: | ||
{ | { | ||
domain = "muc.xmpp.${domainName}"; | domain = "muc.xmpp.${domainName}"; | ||
restrictRoomCreation = false; | |||
} | |||
]; | |||
disco_items = [ | |||
{ | |||
description = "multi user chat"; | |||
url = "muc.xmpp.${domainName}"; | |||
} | } | ||
]; | ]; | ||
Line 260: | Line 285: | ||
parent_host = "${domainName}" | parent_host = "${domainName}" | ||
''; | ''; | ||
services.prosody. | services.prosody.disco_items = [ | ||
{ | |||
description = "http upload"; | |||
url = "upload.xmpp.${domainName}"; | |||
} | } | ||
]; | |||
# mod_http_upload_external is a community module | # mod_http_upload_external is a community module |