· 8 years ago · Nov 27, 2017, 05:18 PM
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 = {"artiom@vega.dhcp.io" }
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
29-- This is the list of modules Prosody will load on startup.
30-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
31-- Documentation on modules can be found at: http://prosody.im/doc/modules
32plugin_paths = { "/usr/local/lib64/prosody/modules"}
33
34modules_enabled = {
35
36 -- Generally required
37 "roster"; -- Allow users to have a roster. Recommended ;)
38 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
39 "tls"; -- Add support for secure TLS on c2s/s2s connections
40 "dialback"; -- s2s dialback support
41 "disco"; -- Service discovery
42
43 -- Not essential, but recommended
44 "private"; -- Private XML storage (for room bookmarks, etc.)
45 "vcard"; -- Allow users to set vCards
46
47 -- These are commented by default as they have a performance impact
48 --"privacy"; -- Support privacy lists
49 --"compression"; -- Stream compression (Note: Requires installed lua-zlib RPM package)
50
51 -- Nice to have
52 "version"; -- Replies to server version requests
53 "uptime"; -- Report how long server has been running
54 "time"; -- Let others know the time here on this server
55 "ping"; -- Replies to XMPP pings with pongs
56 "pep"; -- Enables users to publish their mood, activity, playing music and more
57 "register"; -- Allow users to register on this server using a client and change passwords
58
59 -- Admin interfaces
60 "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
61 --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
62
63 -- HTTP modules
64 --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
65 --"http_files"; -- Serve static files from a directory over HTTP
66
67 -- Other specific functionality
68 "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
69 "groups"; -- Shared roster support
70 "announce"; -- Send announcement to all online users
71 --"welcome"; -- Welcome users who register accounts
72 --"watchregistrations"; -- Alert admins of registrations
73 --"motd"; -- Send a message to users when they log in
74 --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
75
76 "smacks";
77 "secure_interfaces";
78};
79
80-- These modules are auto-loaded, but should you want
81-- to disable them then uncomment them here:
82modules_disabled = {
83 -- "offline"; -- Store offline messages
84 -- "c2s"; -- Handle client connections
85 -- "s2s"; -- Handle server-to-server connections
86};
87
88-- Disable account creation by default, for security
89-- For more information see http://prosody.im/doc/creating_accounts
90allow_registration = false;
91
92-- These are the SSL/TLS-related settings. If you don't want
93-- to use SSL/TLS, you may comment or remove this
94-- ssl = {
95-- key = "/etc/pki/prosody/localhost.key";
96-- certificate = "/etc/pki/prosody/localhost.crt";
97-- }
98
99-- Force clients to use encrypted connections? This option will
100-- prevent clients from authenticating unless they are using encryption.
101
102c2s_require_encryption = false
103
104-- Force certificate authentication for server-to-server connections?
105-- This provides ideal security, but requires servers you communicate
106-- with to support encryption AND present valid, trusted certificates.
107-- NOTE: Your version of LuaSec must support certificate verification!
108-- For more information see http://prosody.im/doc/s2s#security
109
110s2s_secure_auth = true
111
112-- Many servers don't support encryption or have invalid or self-signed
113-- certificates. You can list domains here that will not be required to
114-- authenticate using certificates. They will be authenticated using DNS.
115
116--s2s_insecure_domains = { "gmail.com" }
117
118-- Even if you leave s2s_secure_auth disabled, you can still require valid
119-- certificates for some domains by specifying a list here.
120
121--s2s_secure_domains = { "jabber.org" }
122
123-- Select the authentication backend to use. The 'internal' providers
124-- use Prosody's configured data storage to store the authentication data.
125-- To allow Prosody to offer secure authentication mechanisms to clients, the
126-- default provider stores passwords in plaintext. If you do not trust your
127-- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
128-- for information about using the hashed backend.
129
130authentication = "internal_plain"
131
132secure_interfaces = {"127.0.0.1","::1"}
133-- Select the storage backend to use. By default Prosody uses flat files
134-- in its configured data directory, but it also supports more backends
135-- through modules. An "sql" backend is included by default, but requires
136-- additional dependencies. See http://prosody.im/doc/storage for more info.
137
138--storage = "sql" -- Default is "internal" (Note: "sql" requires installed
139-- lua-dbi RPM package)
140
141-- For the "sql" backend, you can uncomment *one* of the below to configure:
142--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
143--sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
144--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
145
146-- Logging configuration
147-- For advanced logging see http://prosody.im/doc/logging
148log = {
149 -- Log everything of level "info" and higher (that is, all except "debug" messages)
150 -- to /var/log/prosody/prosody.log and errors also to /var/log/prosody/prosody.err
151 info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
152 error = "/var/log/prosody/prosody.err"; -- Log errors also to file
153 -- error = "*syslog"; -- Log errors also to syslog
154 -- log = "*console"; -- Log to the console, useful for debugging with daemonize=false
155}
156
157-- POSIX configuration, see also http://prosody.im/doc/modules/mod_posix
158pidfile = "/var/run/prosody/prosody.pid";
159--daemonize = false -- Default is "true"
160
161------ Additional config files ------
162-- For organizational purposes you may prefer to add VirtualHost and
163-- Component definitions in their own config files. This line includes
164-- all config files in /etc/prosody/conf.d/
165
166Include "conf.d/*.cfg.lua"