| 1 | local domain = ENV_XMPP_DOMAIN |
| 2 | local host = ENV_XMPP_HOST |
| 3 | local network = Lua.require("prosody.util.json").decode(Lua.io.open("/etc/xmpp-network.json"):read("*a")) |
| 4 | |
| 5 | data_path = "/var/lib/prosody" |
| 6 | pidfile = "/var/lib/prosody/prosody.pid" |
| 7 | plugin_paths = { "/opt/prosody-modules", "/snowglobe" } |
| 8 | admins = { "clover@" .. domain } |
| 9 | bootstrap_password = ENV_XMPP_PASSWORD |
| 10 | authentication = "internal_hashed" |
| 11 | allow_registration = false |
| 12 | storage = "sql" |
| 13 | sql = { driver = "SQLite3", database = "/var/lib/prosody/prosody.sqlite" } |
| 14 | archive_expires_after = "never" |
| 15 | default_archive_policy = true |
| 16 | |
| 17 | modules_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 | } |
| 27 | log = { info = "*console" } |
| 28 | statistics = "internal" |
| 29 | http_openmetrics_public = false |
| 30 | push_notification_with_body = false |
| 31 | push_notification_with_sender = false |
| 32 | |
| 33 | c2s_ports = { network.c2s } |
| 34 | c2s_direct_tls_ports = { network.c2s_tls } |
| 35 | s2s_ports = { network.s2s } |
| 36 | s2s_secure_auth = true |
| 37 | c2s_require_encryption = true |
| 38 | s2s_require_encryption = true |
| 39 | ssl = { key = "/tls/live/server/privkey.pem", certificate = "/tls/live/server/fullchain.pem" } |
| 40 | certificates = "/tls/live/server" |
| 41 | component_ports = {} |
| 42 | https_ports = {} |
| 43 | http_ports = { Lua.tonumber(ENV_HTTP_PORT) } |
| 44 | http_interfaces = { "127.0.0.1" } |
| 45 | http_default_host = host |
| 46 | http_host = host |
| 47 | http_external_url = "https://" .. host .. "/" |
| 48 | consider_bosh_secure = true |
| 49 | consider_websocket_secure = true |
| 50 | trusted_proxies = { "127.0.0.1", "::1" } |
| 51 | |
| 52 | turn_external_host = host |
| 53 | turn_external_port = network.turn |
| 54 | turn_external_tls_port = network.turn_tls |
| 55 | turn_external_tcp = true |
| 56 | turn_external_secret = ENV_TURN_SECRET |
| 57 | |
| 58 | VirtualHost(domain) |
| 59 | Component("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 |
| 67 | Component("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" |