summaryrefslogtreecommitdiff
path: root/files/virtual_host.cfg.lua.j2
blob: 8763082e080eb15fb9bead5ed90c1504152671e0 (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
-- SPDX-FileCopyrightText: 2024 Matthew Fennell <matthew@fennell.dev>
--
-- SPDX-License-Identifier: AGPL-3.0-only

VirtualHost "{{ virtual_host }}"

{% if not is_transport_server %}
admins = {
    "admin@{{ virtual_host }}"
}
{% endif %}

modules_enabled = {

    -- Core
    "groups";

{% if not is_transport_server %}
    -- Invites
    "invites";
    "invites_adhoc";
    "invites_api";
    "invites_page";
    "invites_register";
    "invites_tracking";
    "register";
    "register_apps";
{% endif %}

}

{% if not is_transport_server %}
site_apps_show = {
    "conversations";
    "dino";
    "gajim";
    "monal";
}
{% endif %}

{% if not is_transport_server %}
contact_info = {
    abuse = {
        "xmpp:abuse@{{ virtual_host }}"
    };
    admin = {
        "xmpp:admin@{{ virtual_host }}"
    };
}
{% endif %}

{% if not is_transport_server %}
allow_user_invites = true
http_external_url = "https://{{ virtual_host }}/"
site_name = "{{ virtual_host }}"
{% endif %}

privileged_entities = {
{% for transport in transports %}
    ["{{ transport.subdomain }}.{{ virtual_host }}"] = {
        roster = "both";
        message = "outgoing";
        iq = {
            ["http://jabber.org/protocol/pubsub"] = "both";
            ["http://jabber.org/protocol/pubsub#owner"] = "set";
        };
    }
{% endfor %}
}

Component "upload.{{ virtual_host }}" "http_file_share"
http_file_share_size_limit = 300 * 1024 * 1024
http_file_share_global_quota = 5 * 1024 * 1024 * 1024

Component "proxy.{{ virtual_host }}" "proxy65"

{% if delegate_prefix == "" %}
proxy65_address = "{{ virtual_host }}"
{% else %}
proxy65_address = "{{ delegate_prefix }}.{{ virtual_host }}"
{% endif %}

modules_disabled = {
  "s2s";
}

Component "conference.{{ virtual_host }}" "muc"
modules_enabled = {
    "muc";
    "muc_mam";

    -- Spam
{% if not is_transport_server %}
    "muc_moderation";
    "muc_rtbl";
{% endif %}
}

log_all_rooms = true
restrict_room_creation = "local"
muc_room_default_public = false
muc_room_default_public_jids = true

{% if not is_transport_server %}
muc_rtbl_jid = "xmppbl.org"
{% endif %}

{% for transport in transports %}
Component "{{ transport.subdomain }}.{{ virtual_host }}"
component_secret = "{{ transport.secret }}"
modules_enabled = {
    "privilege";
}
{% endfor %}