· 10 years ago · Mar 15, 2016, 11:09 AM
1-- Prosody Example Configuration File
2--
3-- Information on configuring Prosody can be found on our
4-- website at http://prosody.im/doc/configure
5--
6-- Tip: You can check that the syntax of this file is correct
7-- when you have finished by running: prosodyctl check config
8-- If there are any errors, it will let you know what and where
9-- they are, otherwise it will keep quiet.
10--
11-- The only thing left to do is rename this file to remove the .dist ending, and fill in the
12-- blanks. Good luck, and happy Jabbering!
13
14
15---------- Server-wide settings ----------
16-- Settings in this section apply to the whole server and are the default settings
17-- for any virtual hosts
18
19-- This is a (by default, empty) list of accounts that are admins
20-- for the server. Note that you must create the accounts separately
21-- (see http://prosody.im/doc/creating_accounts for info)
22-- Example: admins = { "user1@localhost", "user2@example.net" }
23admins = { "suzyo@siqchat.tk", "siqchat@siqchat.tk" }
24
25-- Enable use of libevent for better performance under high load
26-- For more information see: http://prosody.im/doc/libevent
27 use_libevent = true;
28
29
30cross_domain_bosh = "*";
31cross_domain_websocket = true;
32consider_websocket_secure = true;
33
34smacks_hibernation_time = 300;
35
36default_archive_policy = true; -- other options are false or "roster";
37max_archive_query_results = 500;
38
39-- This is the list of modules Prosody will load on startup.
40-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
41-- Documentation on modules can be found at: http://prosody.im/doc/modules
42modules_enabled = {
43
44 -- Generally required
45 "offline";
46 "posix";
47 "roster"; -- Allow users to have a roster. Recommended ;)
48 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
49 "tls"; -- Add support for secure TLS on c2s/s2s connections
50 "dialback"; -- s2s dialback support
51 "disco"; -- Service discovery
52
53 -- Not essential, but recommended
54 "private"; -- Private XML storage (for room bookmarks, etc.)
55 "vcard"; -- Allow users to set vCards
56
57 -- These are commented by default as they have a performance impact
58 --"blocklist"; -- Support privacy lists
59 "compression"; -- Stream compression (Debian: requires lua-zlib module to work)
60 "admin_web";
61 "blocklist";
62 "pastebin";
63 "http";
64 "blocking";
65 "http_index";
66 "munin";
67 "csi";
68 "bidi";
69 "register_web";
70 "auto_accept_subscriptions";
71 "cloud_notify";
72 "lastactivity";
73 "version"; -- Replies to server version requests
74 "uptime"; -- Report how long server has been running
75 "time"; -- Let others know the time here on this server
76 "ping"; -- Replies to XMPP pings with pongs
77 "pep"; -- Enables users to publish their mood, activity, playing music and more
78 "register"; -- Allow users to register on this server using a client and change passwords
79
80 -- Admin interfaces
81 "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
82 --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
83
84 -- HTTP modules
85 "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
86 "http_files"; -- Serve static files from a directory over HTTP
87
88 -- Other specific functionality
89 --"groups"; -- Shared roster support
90 "announce"; -- Send announcement to all online users
91 "welcome"; -- Welcome users who register accounts
92 "watchregistrations"; -- Alert admins of registrations
93 "motd"; -- Send a message to users when they log in
94 --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
95 "mam";
96 "websocket";
97 "carbons";
98 "smacks";
99 "idlecompat";
100 "mam_archive";
101archive_conversation_interval = 86400; -- defined in seconds. One day by default
102storage = {
103 archive2 = "sql";
104};
105
106 "offline";
107 --"turncredentials";
108 "http_altconnect";
109 --"auth_external";
110 };
111
112
113-- These modules are auto-loaded, but should you want
114-- to disable them then uncomment them here:
115modules_disabled = {
116 -- "offline"; -- Store offline messages
117 -- "c2s"; -- Handle client connections
118 -- "s2s"; -- Handle server-to-server connections
119 -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
120};
121
122-- Disable account creation by default, for security
123-- For more information see http://prosody.im/doc/creating_accounts
124allow_registration = true;
125
126-- Debian:
127-- send the server to background.
128--
129daemonize = true;
130
131-- Debian:
132-- Please, don't change this option since /var/run/prosody/
133-- is one of the few directories Prosody is allowed to write to
134--
135pidfile = "/var/run/prosody/prosody.pid";
136
137-- These are the SSL/TLS-related settings. If you don't want
138-- to use SSL/TLS, you may comment or remove this
139ssl = {
140 key = "/usr/local/etc/prosody/certs/siqchat.tk.key";
141 certificate = "/usr/local/etc/prosody/certs/siqchat.tk.crt";
142}
143
144-- Force clients to use encrypted connections? This option will
145-- prevent clients from authenticating unless they are using encryption.
146
147c2s_require_encryption = true
148
149-- Force certificate authentication for server-to-server connections?
150-- This provides ideal security, but requires servers you communicate
151-- with to support encryption AND present valid, trusted certificates.
152-- NOTE: Your version of LuaSec must support certificate verification!
153-- For more information see http://prosody.im/doc/s2s#security
154
155s2s_secure_auth = true
156
157-- Many servers don't support encryption or have invalid or self-signed
158-- certificates. You can list domains here that will not be required to
159-- authenticate using certificates. They will be authenticated using DNS.
160
161s2s_insecure_domains = { "gmail.com", "emevth.no-ip.biz" }
162
163-- Even if you leave s2s_secure_auth disabled, you can still require valid
164-- certificates for some domains by specifying a list here.
165
166s2s_secure_domains = { "jabber.org", "movim.eu", "emevth.no-ip.biz" }
167
168-- Select the authentication backend to use. The 'internal' providers
169-- use Prosody's configured data storage to store the authentication data.
170-- To allow Prosody to offer secure authentication mechanisms to clients, the
171-- default provider stores passwords in plaintext. If you do not trust your
172-- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
173-- for information about using the hashed backend.
174
175authentication = "internal_plain"
176
177--Include '/etc/prosody/prosody-ldap.cfg.lua'
178
179-- Select the storage backend to use. By default Prosody uses flat files
180-- in its configured data directory, but it also supports more backends
181-- through modules. An "sql" backend is included by default, but requires
182-- additional dependencies. See http://prosody.im/doc/storage for more info.
183
184default_storage = "sql"
185--storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
186-- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
187
188-- For the "sql" backend, you can uncomment *one* of the below to configure:
189--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
190sql = { driver = "MySQL", database = "prosody", username = "root", password = "koobec360", host = "localhost" }
191--sql = { driver = "MySQL", database = "{{DB_NAME}}", username = "{{root}}", password = "{{koobec360}}", host = "{{localhost}}" }
192
193-- Logging configuration
194-- For advanced logging see http://prosody.im/doc/logging
195--
196-- Debian:
197-- Logs info and higher to /var/log
198-- Logs errors to syslog also
199log = {
200 info = "*console";
201 -- Log files (change 'info' to 'debug' for debug logs):
202 debug = "/var/log/prosody/prosody.log";
203 error = "/var/log/prosody/prosody.err";
204 -- Syslog:
205 { levels = { "error" }; to = "syslog"; };
206}
207
208----------- Virtual hosts -----------
209-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
210-- Settings under each VirtualHost entry apply *only* to that host.
211
212VirtualHost "siqchat.tk"
213 -- enabled = false -- Remove this line to enable this host
214
215 -- Assign this host a certificate for TLS, otherwise it would use the one
216 -- set in the global section (if any).
217 -- Note that old-style SSL on port 5223 only supports one certificate, and will always
218 -- use the global one.
219
220
221
222------ Components ------
223-- You can specify components to add hosts that provide special services,
224-- like multi-user conferences, and transports.
225-- For more information on components, see http://prosody.im/doc/components
226
227---Set up a MUC (multi-user chat) room server on conference.localhost:
228Component "chat.siqchat.tk" "muc"
229modules_enabled = { "pastebin" }
230modules_enabled = {
231 "mam_muc",
232}
233
234storage = {
235 muc_log = "sql"; -- Requires 0.10 or later
236}
237
238muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
239
240muc_log_all_rooms = false; -- set to true to force logging of all rooms
241
242-- This is the largest number of messages that are allowed to be retrieved in one MAM request.
243max_archive_query_results = 20;
244
245-- This is the largest number of messages that are allowed to be retrieved when joining a room.
246max_history_messages = 1000;
247
248 name = "The siqchat chatrooms server"
249 restrict_room_creation = "local";
250 max_history_messages = 50; -- This is the largest number of messages that are allowed to be retrieved when joining a room
251 max_archive_query_results = 50; -- This is the largest number of messages that are allowed to be retrieved in one MAM request
252 muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
253 muc_log_all_rooms = true; -- set to true to force logging of all rooms
254ssl = {
255 key = "/usr/local/etc/prosody/certs/siqchat.tk.key";
256 certificate = "/usr/local/etc/prosody/certs/siqchat.tk.crt";
257 }
258
259
260-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
261 --Component "proxy.openport.io" "proxy65"
262 --modules_enabled = {
263 --"http_upload";
264--}
265--http_upload_file_size_limit = 10 * 1024 * 1024 -- this is 10MB in bytes
266--http_upload_path = "/root/suzyo"
267---Set up an external component (default component port is 5347)
268--
269-- External components allow adding various services, such as gateways/
270-- transports to other networks like ICQ, MSN and Yahoo. For more info
271-- see: http://prosody.im/doc/components#adding_an_external_component
272--
273--Component "gateway.localhost"
274-- component_secret = "password"
275Component "console@siqchat.tk" "admin_message"
276
277Component "pubsub.siqchat.tk" "pubsub"
278name = "The siqchat pubsub server"
279
280Component "search.siqchat.tk" "vjud"
281name = "The siqchat search server"
282
283
284Component "upload.siqchat.tk" "http_upload"
285name = "The siqchat Upload server"
286http_upload_file_size_limit = 10 * 1024 * 1024 -- this is 10MB in bytes
287http_upload_path = "/var/lib/prosody/"
288ssl = {
289 key = "/usr/local/etc/prosody/certs/siqchat.tk.key";
290 certificate = "/usr/local/etc/prosody/certs/siqchat.tk.crt";
291 }
292
293------ Additional config files ------
294-- For organizational purposes you may prefer to add VirtualHost and
295-- Component definitions in their own config files. This line includes
296-- all config files in /etc/prosody/conf.d/
297
298--Include "conf.d/*.cfg.lua"