· 9 years ago · May 23, 2017, 09:26 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: luac -p prosody.cfg.lua
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@example.com", "user2@example.net" }
23admins = { "admin@gapserver.ir"}
24
25-- Enable use of libevent for better performance under high load
26-- For more information see: http://prosody.im/doc/libevent
27use_libevent = true;
28
29plugin_paths = { }
30
31--storage = {
32 -- This makes mod_mam use the sql2 storage backend (others will use internal)
33-- archive2 = "sql2";
34--}
35--sql_manage_tables = true;
36--default_archive_policy = true;
37--max_archive_query_results = 20;
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 "roster"; -- Allow users to have a roster. Recommended ;)
46 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
47 "tls"; -- Add support for secure TLS on c2s/s2s connections
48 "dialback"; -- s2s dialback support
49 "disco"; -- Service discovery
50
51 -- Not essential, but recommended
52 "private"; -- Private XML storage (for room bookmarks, etc.)
53 "vcard"; -- Allow users to set vCards
54
55 -- These are commented by default as they have a performance impact
56 "privacy"; -- Support privacy lists
57 "compression"; -- Stream compression (Debian: requires lua-zlib module to work)
58
59 -- Nice to have
60 "version"; -- Replies to server version requests
61 "uptime"; -- Report how long server has been running
62 "time"; -- Let others know the time here on this server
63 "ping"; -- Replies to XMPP pings with pongs
64 "pep"; -- Enables users to publish their mood, activity, playing music and more
65 "register"; -- Allow users to register on this server using a client and change passwords
66
67 -- Admin interfaces
68 "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
69 --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
70
71 -- HTTP modules
72 "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
73 "http_files"; -- Serve static files from a directory over HTTP
74
75 -- Other specific functionality
76 "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
77 "groups"; -- Shared roster support
78 "announce"; -- Send announcement to all online users
79 "welcome"; -- Welcome users who register accounts
80 "watchregistrations"; -- Alert admins of registrations
81 "motd"; -- Send a message to users when they log in
82 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
83 -- Custom
84 "offline";
85 "carbons";
86 "mam";
87 "mam_archive";
88 "blocking";
89 "smacks";
90-- "websocket";
91-- "dynamic_roster";
92-- "private";
93-- "storage_sql";
94-- "storage_sql2";
95-- "mam_sql";
96-- "mam_muc";
97-- "mam_adhoc";
98-- "log_messages_sql";
99
100};
101
102-- These modules are auto-loaded, but should you want
103-- to disable them then uncomment them here:
104modules_disabled = {
105 -- "offline"; -- Store offline messages
106 -- "c2s"; -- Handle client connections
107 -- "s2s"; -- Handle server-to-server connections
108};
109
110-- Disable account creation by default, for security
111-- For more information see http://prosody.im/doc/creating_accounts
112allow_registration = false;
113
114-- Debian:
115-- send the server to background.
116--
117daemonize = true;
118
119-- Debian:
120-- Please, don't change this option since /var/run/prosody/
121-- is one of the few directories Prosody is allowed to write to
122--
123pidfile = "/var/run/prosody/prosody.pid";
124
125-- These are the SSL/TLS-related settings. If you don't want
126-- to use SSL/TLS, you may comment or remove this
127ssl = {
128 key = "cert.key";
129 certificate = "cert.crt";
130}
131
132-- Force clients to use encrypted connections? This option will
133-- prevent clients from authenticating unless they are using encryption.
134
135c2s_require_encryption = false
136
137-- Force certificate authentication for server-to-server connections?
138-- This provides ideal security, but requires servers you communicate
139-- with to support encryption AND present valid, trusted certificates.
140-- NOTE: Your version of LuaSec must support certificate verification!
141-- For more information see http://prosody.im/doc/s2s#security
142
143s2s_secure_auth = false
144
145-- Many servers don't support encryption or have invalid or self-signed
146-- certificates. You can list domains here that will not be required to
147-- authenticate using certificates. They will be authenticated using DNS.
148
149--s2s_insecure_domains = { "gmail.com" }
150
151-- Even if you leave s2s_secure_auth disabled, you can still require valid
152-- certificates for some domains by specifying a list here.
153
154--s2s_secure_domains = { "jabber.org" }
155
156-- Select the authentication backend to use. The 'internal' providers
157-- use Prosody's configured data storage to store the authentication data.
158-- To allow Prosody to offer secure authentication mechanisms to clients, the
159-- default provider stores passwords in plaintext. If you do not trust your
160-- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
161-- for information about using the hashed backend.
162
163authentication = "internal_plain"
164
165-- Select the storage backend to use. By default Prosody uses flat files
166-- in its configured data directory, but it also supports more backends
167-- through modules. An "sql" backend is included by default, but requires
168-- additional dependencies. See http://prosody.im/doc/storage for more info.
169
170storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
171-- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
172
173-- For the "sql" backend, you can uncomment *one* of the below to configure:
174--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
175sql = { }
176--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
177
178-- Logging configuration
179-- For advanced logging see http://prosody.im/doc/logging
180--
181-- Debian:
182-- Logs info and higher to /var/log
183-- Logs errors to syslog also
184log = {
185 -- Log files (change 'info' to 'debug' for debug logs):
186 info = "/var/log/prosody/prosody.log";
187 error = "/var/log/prosody/prosody.err";
188 -- Syslog:
189 { levels = { "error" }; to = "syslog"; };
190}
191
192----------- Virtual hosts -----------
193-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
194-- Settings under each VirtualHost entry apply *only* to that host.
195
196VirtualHost "gapserver.ir"
197 --enabled = false -- Remove this line to enable this host
198
199modules_enabled = {
200 "admin_web";
201}
202 -- Assign this host a certificate for TLS, otherwise it would use the one
203 -- set in the global section (if any).
204 -- Note that old-style SSL on port 5223 only supports one certificate, and will always
205 -- use the global one.
206 ssl = {
207 key = "cert.key";
208 certificate = "cert.crt";
209 }
210------ Components ------
211-- You can specify components to add hosts that provide special services,
212-- like multi-user conferences, and transports.
213-- For more information on components, see http://prosody.im/doc/components
214
215---Set up a MUC (multi-user chat) room server on conference.example.com:
216Component "conf.gapserver.ir" "muc"
217 name = "Gap Chat Rooms"
218
219--Component "proxy.gapserver.ir" "proxy65"
220-- proxy65_acl = { "gapserver.ir" }
221-- proxy65_address = "proxy.gapserver.ir"
222
223--Component "pubsub.gapserver.ir" "pubsub"
224
225--Component "search.gapserver.ir" "vjud"
226
227-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
228--Component "proxy.example.com" "proxy65"
229
230---Set up an external component (default component port is 5347)
231--
232-- External components allow adding various services, such as gateways/
233-- transports to other networks like ICQ, MSN and Yahoo. For more info
234-- see: http://prosody.im/doc/components#adding_an_external_component
235--
236--Component "gateway.example.com"
237-- component_secret = "password"
238
239------ Additional config files ------
240-- For organizational purposes you may prefer to add VirtualHost and
241-- Component definitions in their own config files. This line includes
242-- all config files in /etc/prosody/conf.d/
243
244Include "conf.d/*.cfg.lua"