1local domain = ENV_XMPP_DOMAIN
2local host = ENV_XMPP_HOST
3local network = Lua.require("prosody.util.json").decode(Lua.io.open("/etc/xmpp-network.json"):read("*a"))
4
5data_path = "/var/lib/prosody"
6pidfile = "/var/lib/prosody/prosody.pid"
7plugin_paths = { "/opt/prosody-modules", "/snowglobe" }
8admins = { "clover@" .. domain }
9bootstrap_password = ENV_XMPP_PASSWORD
10authentication = "internal_hashed"
11allow_registration = false
12storage = "sql"
13sql = { driver = "SQLite3", database = "/var/lib/prosody/prosody.sqlite" }
14archive_expires_after = "never"
15default_archive_policy = true
16
17modules_enabled = {
18 "disco", "roster", "saslauth", "tls", "blocklist", "bookmarks",
19 "carbons", "limits", "pep", "private", "smacks", "vcard4", "vcard_legacy",
20 "csi_simple", "mam", "ping", "time", "version", "uptime",
21 "invites", "invites_adhoc", "invites_register", "register",
22 "admin_adhoc", "admin_shell", "cloud_notify", "cloud_notify_extensions",
23 "sasl2", "sasl2_bind2", "sasl2_sm", "sasl2_fast",
24 "bosh", "websocket", "http_health", "http_openmetrics", "turn_external",
25 "bootstrap"
26}
27log = { info = "*console" }
28statistics = "internal"
29http_openmetrics_public = false
30push_notification_with_body = false
31push_notification_with_sender = false
32
33c2s_ports = { network.c2s }
34c2s_direct_tls_ports = { network.c2s_tls }
35s2s_ports = { network.s2s }
36s2s_secure_auth = true
37c2s_require_encryption = true
38s2s_require_encryption = true
39ssl = { key = "/tls/live/server/privkey.pem", certificate = "/tls/live/server/fullchain.pem" }
40certificates = "/tls/live/server"
41component_ports = {}
42https_ports = {}
43http_ports = { Lua.tonumber(ENV_HTTP_PORT) }
44http_interfaces = { "127.0.0.1" }
45http_default_host = host
46http_host = host
47http_external_url = "https://" .. host .. "/"
48consider_bosh_secure = true
49consider_websocket_secure = true
50trusted_proxies = { "127.0.0.1", "::1" }
51
52turn_external_host = host
53turn_external_port = network.turn
54turn_external_tls_port = network.turn_tls
55turn_external_tcp = true
56turn_external_secret = ENV_TURN_SECRET
57
58VirtualHost(domain)
59Component("groups." .. domain) "muc"
60 modules_enabled = { "muc_mam", "muc_offline_delivery" }
61 restrict_room_creation = "local"
62 muc_room_default_persistent = true
63 muc_room_default_members_only = true
64 muc_room_default_public = false
65 muc_room_default_public_jids = true
66 muc_log_by_default = true
67Component("upload." .. domain) "http_file_share"
68 modules_disabled = { "s2s" }
69 http_file_share_size_limit = 100 * 1024 * 1024 + 16
70 http_file_share_daily_quota = 1024 * 1024 * 1024
71 http_file_share_global_quota = 10 * 1024 * 1024 * 1024
72 http_file_share_expires_after = "never"