· 7 years ago · Feb 24, 2019, 09:12 AM
1-- ** Metronome's config file example **
2--
3-- The format is exactly equal to Prosody's:
4--
5-- Lists are written { "like", "this", "one" }
6-- Lists can also be of { 1, 2, 3 } numbers, etc.
7-- Either commas, or semi-colons; may be used as seperators.
8--
9-- A table is a list of values, except each value has a name. An
10-- example would be:
11--
12-- ssl = { key = "keyfile.key", certificate = "certificate.cert" }
13--
14-- Tip: You can check that the syntax of this file is correct when you have finished
15-- by running: luac -p metronome.cfg.lua
16-- If there are any errors, it will let you know what and where they are, otherwise it
17-- will keep quiet.
18
19-- Global settings go in this section
20-- local domain = os.getenv("DOMAIN") or "maillard.im"
21admins = { }
22
23-- This is the list of modules Metronome will load on startup.
24-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
25
26modules_enabled = {
27 -- Generally required
28 "roster"; -- Allow users to have a roster. Recommended.
29 "saslauth"; -- Authentication for clients. Recommended if you want to log in.
30 "tls"; -- Add support for secure TLS on c2s/s2s connections
31 "disco"; -- Service discovery
32
33 -- Not essential, but recommended
34 "private"; -- Private XML storage (for room bookmarks, etc.)
35 "vcard"; -- Allow users to set vCards
36 -- "pep"; -- Allows setting of mood, tune, etc.
37 "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
38 "bidi"; -- Enables Bidirectional Server-to-Server Streams.
39
40 "delegation"; -- Allows features handling by entity/component
41 "privilege";
42
43 -- Nice to have
44 "version"; -- Replies to server version requests
45 "uptime"; -- Report how long server has been running
46 "time"; -- Let others know the time here on this server
47 "ping"; -- Replies to XMPP pings with pongs
48 "register"; -- Allow users to register on this server using a client and change passwords
49 "stream_management"; -- Allows clients and servers to use Stream Management
50 "stanza_optimizations"; -- Allows clients to use Client State Indication and SIFT
51 "message_carbons"; -- Allows clients to enable carbon copies of messages
52 "mam"; -- Enable server-side message archives using Message Archive Management
53 "push"; -- Enable Push Notifications via PubSub using XEP-0357
54 "lastactivity"; -- Enables clients to know the last presence status of an user
55 "adhoc_cm"; -- Allow to set client certificates to login through SASL External via adhoc
56 "admin_adhoc"; -- administration adhoc commands
57 "bookmarks"; -- XEP-0048 Bookmarks synchronization between PEP and Private Storage
58 "sec_labels"; -- Allows to use a simplified version XEP-0258 Security Labels and related ACDFs.
59 "privacy"; -- Add privacy lists and simple blocking command support
60
61 -- Other specific functionality
62 --"admin_telnet"; -- administration console, telnet to port 5582
63 --"admin_web"; -- administration web interface
64 "bosh"; -- Enable support for BOSH clients, aka "XMPP over Bidirectional Streams over Synchronous HTTP"
65 --"compression"; -- Allow clients to enable Stream Compression
66 --"spim_block"; -- Require authorization via OOB form for messages from non-contacts and block unsollicited messages
67 --"gate_guard"; -- Enable config-based blacklisting and hit-based auto-banning features
68 --"incidents_handling"; -- Enable Incidents Handling support (can be administered via adhoc commands)
69 --"server_presence"; -- Enables Server Buddies extension support
70 --"service_directory"; -- Enables Service Directories extension support
71 --"public_service"; -- Enables Server vCard support for public services in directories and advertises in features
72 --"register_api"; -- Provides secure API for both Out-Of-Band and In-Band registration for E-Mail verification
73 "websocket"; -- Enable support for WebSocket clients, aka "XMPP over WebSockets"
74};
75
76-- Server PID
77pidfile = "/var/run/metronome/metronome.pid"
78ssl = { key = "/etc/yunohost/certs/maillard.im/key.pem",certificate = "/etc/yunohost/certs/maillard.im/crt.pem" }
79
80-- HTTP server
81Host "*"
82 interfaces = { "*" }
83 ssl = { key = "/etc/yunohost/certs/upload.maillard.im/key.pem",certificate = "/etc/yunohost/certs/upload.maillard.im/crt.pem" }
84 http_ports = {}
85 https_ports = { 5290 }
86
87-- Enable IPv6
88use_ipv6 = true
89
90-- Discovery items
91disco_items = {
92 { "muc.maillard.im" },
93 { "pubsub.maillard.im" },
94 { "upload.maillard.im" },
95 { "vjud.maillard.im" }
96};
97
98-- BOSH configuration (mod_bosh)
99consider_bosh_secure = true
100cross_domain_bosh = true
101
102-- WebSocket configuration (mod_websocket)
103consider_websocket_secure = true
104cross_domain_websocket = true
105
106-- Disable account creation by default, for security
107allow_registration = false
108
109-- Use LDAP storage backend for all stores
110storage = "ldap"
111
112-- Logging configuration
113log = {
114 info = "/var/log/metronome/metronome.log"; -- Change 'info' to 'debug' for verbose logging
115 debug = "/var/log/metronome/metronome.dev";
116 error = "/var/log/metronome/metronome.err";
117 -- "*syslog"; -- Uncomment this for logging to syslog
118 -- "*console"; -- Log to the console, useful for debugging with daemonize=false
119}
120
121------ Components ------
122-- You can specify components to add hosts that provide special services,
123-- like multi-user conferences, and transports.
124
125---Set up a local BOSH service
126Component "localhost" "http"
127 modules_enabled = { "bosh" }
128
129---Set up a MUC (multi-user chat) room server
130Component "muc.maillard.im" "muc"
131 name = "maillard.im Chatrooms"
132
133 modules_enabled = {
134 "muc_limits";
135 "muc_log";
136 "muc_log_mam";
137 "muc_log_http";
138 "muc_vcard";
139 }
140
141 muc_event_rate = 0.5
142 muc_burst_factor = 10
143
144---Set up a PubSub server
145--Component ("pubsub."..domain) "pubsub"
146-- name = (domain.." Publish/Subscribe")
147-- unrestricted_node_creation = true -- Anyone can create a PubSub node (from any server)
148
149---Set up a HTTP Upload service
150Component "upload.maillard.im" "http_upload"
151 name = "maillard.im Sharing Service"
152
153 http_file_size_limit = 6*1024*1024
154 http_file_quota = 60*1024*1024
155
156
157---Set up a VJUD service
158Component "vjud.maillard.im" "vjud"
159 ud_disco_name = "maillard.im User Directory"
160
161
162----------- Virtual hosts -----------
163-- You need to add a VirtualHost entry for each domain you wish Metronome to serve.
164-- Settings under each VirtualHost entry apply *only* to that host.
165
166Include "conf.d/*.cfg.lua"