1-- Prosody Example Configuration File
2--
3-- Information on configuring Prosody can be found on our
4-- website at https://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 this command:
8--     prosodyctl check config
9-- If there are any errors, it will let you know what and where
10-- they are, otherwise it will keep quiet.
11--
12-- The only thing left to do is rename this file to remove the .dist ending, and fill in the
13-- blanks. Good luck, and happy Jabbering!
14
15
16---------- Server-wide settings ----------
17-- Settings in this section apply to the whole server and are the default settings
18-- for any virtual hosts
19
20-- This is a (by default, empty) list of accounts that are admins
21-- for the server. Note that you must create the accounts separately
22-- (see https://prosody.im/doc/creating_accounts for info)
23-- Example: admins = { "user1@example.com", "user2@example.net" }
24admins = { }
25
26-- Enable use of libevent for better performance under high load
27-- For more information see: https://prosody.im/doc/libevent
28--use_libevent = true
29
30-- Prosody will always look in its source directory for modules, but
31-- this option allows you to specify additional locations where Prosody
32-- will look for modules first. For community modules, see https://modules.prosody.im/
33--plugin_paths = {}
34
35-- This is the list of modules Prosody will load on startup.
36-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
37-- Documentation for bundled modules can be found at: https://prosody.im/doc/modules
38modules_enabled = {
39
40	-- Generally required
41		"roster"; -- Allow users to have a roster. Recommended ;)
42		"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
43		"tls"; -- Add support for secure TLS on c2s/s2s connections
44		"dialback"; -- s2s dialback support
45		"disco"; -- Service discovery
46
47	-- Not essential, but recommended
48		"carbons"; -- Keep multiple clients in sync
49		"pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
50		"private"; -- Private XML storage (for room bookmarks, etc.)
51		"blocklist"; -- Allow users to block communications with other users
52		"vcard4"; -- User profiles (stored in PEP)
53		"vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
54		"limits"; -- Enable bandwidth limiting for XMPP connections
55
56	-- Nice to have
57		"version"; -- Replies to server version requests
58		"uptime"; -- Report how long server has been running
59		"time"; -- Let others know the time here on this server
60		"ping"; -- Replies to XMPP pings with pongs
61		"register"; -- Allow users to register on this server using a client and change passwords
62		--"mam"; -- Store messages in an archive and allow users to access it
63		--"csi_simple"; -- Simple Mobile optimizations
64
65	-- Admin interfaces
66		"admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
67		--"admin_telnet"; -- Opens telnet console interface on localhost port 5582
68
69	-- HTTP modules
70		--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
71		--"websocket"; -- XMPP over WebSockets
72		--"http_files"; -- Serve static files from a directory over HTTP
73
74	-- Other specific functionality
75		--"groups"; -- Shared roster support
76		--"server_contact_info"; -- Publish contact information for this service
77		--"announce"; -- Send announcement to all online users
78		--"welcome"; -- Welcome users who register accounts
79		--"watchregistrations"; -- Alert admins of registrations
80		--"motd"; -- Send a message to users when they log in
81		--"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
82		--"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
83}
84
85-- These modules are auto-loaded, but should you want
86-- to disable them then uncomment them here:
87modules_disabled = {
88	-- "offline"; -- Store offline messages
89	-- "c2s"; -- Handle client connections
90	-- "s2s"; -- Handle server-to-server connections
91	-- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
92}
93
94-- Disable account creation by default, for security
95-- For more information see https://prosody.im/doc/creating_accounts
96allow_registration = false
97
98-- Force clients to use encrypted connections? This option will
99-- prevent clients from authenticating unless they are using encryption.
100
101c2s_require_encryption = true
102
103-- Force servers to use encrypted connections? This option will
104-- prevent servers from authenticating unless they are using encryption.
105
106s2s_require_encryption = true
107
108-- Force certificate authentication for server-to-server connections?
109
110s2s_secure_auth = false
111
112-- Some servers have invalid or self-signed certificates. You can list
113-- remote domains here that will not be required to authenticate using
114-- certificates. They will be authenticated using DNS instead, even
115-- when s2s_secure_auth is enabled.
116
117--s2s_insecure_domains = { "insecure.example" }
118
119-- Even if you disable s2s_secure_auth, you can still require valid
120-- certificates for some domains by specifying a list here.
121
122--s2s_secure_domains = { "jabber.org" }
123
124-- Enable rate limits for incoming client and server connections
125
126limits = {
127  c2s = {
128    rate = "10kb/s";
129  };
130  s2sin = {
131    rate = "30kb/s";
132  };
133}
134
135-- Select the authentication backend to use. The 'internal' providers
136-- use Prosody's configured data storage to store the authentication data.
137
138authentication = "internal_hashed"
139
140-- Select the storage backend to use. By default Prosody uses flat files
141-- in its configured data directory, but it also supports more backends
142-- through modules. An "sql" backend is included by default, but requires
143-- additional dependencies. See https://prosody.im/doc/storage for more info.
144
145--storage = "sql" -- Default is "internal"
146
147-- For the "sql" backend, you can uncomment *one* of the below to configure:
148--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
149--sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
150--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
151
152
153-- Archiving configuration
154-- If mod_mam is enabled, Prosody will store a copy of every message. This
155-- is used to synchronize conversations between multiple clients, even if
156-- they are offline. This setting controls how long Prosody will keep
157-- messages in the archive before removing them.
158
159archive_expires_after = "1w" -- Remove archived messages after 1 week
160
161-- You can also configure messages to be stored in-memory only. For more
162-- archiving options, see https://prosody.im/doc/modules/mod_mam
163
164-- Logging configuration
165-- For advanced logging see https://prosody.im/doc/logging
166log = {
167	info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
168	error = "prosody.err";
169	-- "*syslog"; -- Uncomment this for logging to syslog
170	-- "*console"; -- Log to the console, useful for debugging with daemonize=false
171}
172
173-- Uncomment to enable statistics
174-- For more info see https://prosody.im/doc/statistics
175-- statistics = "internal"
176
177-- Certificates
178-- Every virtual host and component needs a certificate so that clients and
179-- servers can securely verify its identity. Prosody will automatically load
180-- certificates/keys from the directory specified here.
181-- For more information, including how to use 'prosodyctl' to auto-import certificates
182-- (from e.g. Let's Encrypt) see https://prosody.im/doc/certificates
183
184-- Location of directory to find certificates in (relative to main config file):
185certificates = "certs"
186
187-- HTTPS currently only supports a single certificate, specify it here:
188--https_certificate = "certs/localhost.crt"
189
190----------- Virtual hosts -----------
191-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
192-- Settings under each VirtualHost entry apply *only* to that host.
193
194VirtualHost "localhost"
195
196--VirtualHost "example.com"
197--	certificate = "/path/to/example.crt"
198
199------ Components ------
200-- You can specify components to add hosts that provide special services,
201-- like multi-user conferences, and transports.
202-- For more information on components, see https://prosody.im/doc/components
203
204---Set up a MUC (multi-user chat) room server on conference.example.com:
205--Component "conference.example.com" "muc"
206--- Store MUC messages in an archive and allow users to access it
207--modules_enabled = { "muc_mam" }
208
209---Set up an external component (default component port is 5347)
210--
211-- External components allow adding various services, such as gateways/
212-- transports to other networks like ICQ, MSN and Yahoo. For more info
213-- see: https://prosody.im/doc/components#adding_an_external_component
214--
215--Component "gateway.example.com"
216--	component_secret = "password"
217