Advertisement
Guest User

prosody.cfg.lua with alphabetical mod structure

a guest
Feb 4th, 2017
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.55 KB | None | 0 0
  1. -- Prosody XMPP Server Configuration
  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. -- Good luck, and happy Jabbering!
  12.  
  13.  
  14. ------------------------------[ Server-wide settings ]------------------------------
  15.  
  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.com" }
  23. admins = {"example-admin-user@example.com"}
  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. -- 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
  32. plugin_paths = { "/usr/lib/prosody/modules/", "/usr/lib/prosody/modules_community/" }
  33. modules_enabled = {
  34.  
  35.     -- Core modules (alphabetical order) -- default location is "/usr/lib/prosody/modules"
  36.         "admin_adhoc"; -- Admin interfaces -- Allows administration via an XMPP client that supports ad-hoc commands
  37.         "admin_telnet"; -- Admin interfaces -- Opens telnet console interface on localhost port 5582
  38.         "announce"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_announce
  39.         --"bosh"; -- HTTP modules -- Enable BOSH clients, aka "Jabber over HTTP"
  40.         --"compression"; -- These are commented by default as they have a performance impact -- Stream compression (requires the lua-zlib package installed)
  41.         "dialback"; -- Generally required -- s2s dialback support
  42.         "disco"; -- Generally required -- Service discovery
  43.         --"groups"; -- Other specific functionality -- Shared roster support
  44.         "http"; -- HTTP modules -- https://prosody.im/doc/modules/mod_http
  45.         --"http_files"; -- HTTP modules -- Serve static files from a directory over HTTP
  46.         "http_upload"; -- HTTP modules -- https://modules.prosody.im/mod_http_upload.html
  47.         --"legacyauth"; -- Other specific functionality -- Legacy authentication. Only used by some old clients and bots.
  48.         --"motd"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_motd
  49.         "pep"; -- Nice to have -- Enables users to publish their mood, activity, playing music and more
  50.         "ping"; -- Nice to have -- Replies to XMPP pings with pongs
  51.         "posix"; -- Generally required -- POSIX functionality, sends server to background, enables syslog, etc.
  52.         --"privacy"; -- These are commented by default as they have a performance impact -- Support privacy lists
  53.         "private"; -- Not essential, but recommended -- Private XML storage (for room bookmarks, etc.)
  54.         "register"; -- Nice to have -- https://prosody.im/doc/modules/mod_register
  55.         "roster"; -- Generally required -- Allow users to have a roster. Recommended ;)
  56.         "saslauth"; -- Generally required -- Authentication for clients and servers. Recommended if you want to log in.
  57.         "time"; -- Nice to have -- Let others know the time here on this server
  58.         "tls"; -- Generally required -- Add support for secure TLS on c2s/s2s connections
  59.         "uptime"; -- Nice to have -- Report how long server has been running
  60.         "vcard"; -- Not essential, but recommended -- Allow users to set vCards
  61.         "version"; -- Nice to have -- Replies to server version requests
  62.         "watchregistrations"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_watchregistrations
  63.         "welcome"; -- Other specific functionality -- Welcome users who register accounts
  64.  
  65.     -- Community modules (alphabetical order) -- default location is "/usr/lib/prosody/modules_community"
  66.         "carbons"; -- https://modules.prosody.im/mod_carbons.html
  67.         "csi"; -- https://modules.prosody.im/mod_csi.html
  68.         "filter_chatstates"; -- https://modules.prosody.im/mod_filter_chatstates.html
  69.         "mam"; -- https://modules.prosody.im/mod_mam.html
  70.         "smacks"; -- https://modules.prosody.im/mod_smacks.html
  71.         "throttle_presence"; -- https://modules.prosody.im/mod_throttle_presence.html
  72. };
  73.  
  74. -- These modules are auto-loaded, but should you want
  75. -- to disable them then uncomment them here:
  76. modules_disabled = {
  77.         -- "offline"; -- Store offline messages
  78.         -- "c2s"; -- Handle client connections
  79.         -- "s2s"; -- Handle server-to-server connections
  80. };
  81.  
  82. ------------------------------[ Settings for section "modules_enabled" (see above) ]------------------------------
  83.  
  84. --- Settings for CORE MODS (alphabetical order)
  85.  
  86. ---- Settings for "mod_motd" -- https://prosody.im/doc/modules/mod_motd
  87. ---- Using [[ .. ]] instead of " .. " here allows the text to span multiple lines.
  88. motd_text = [[MotD EXAMPLE LINE1.
  89. MotD EXAMPLE LINE2.]]
  90.  
  91. ---- Settings for "mod_register" -- https://prosody.im/doc/modules/mod_register
  92. allow_registration = false -- Whether to allow registration of new accounts via Jabber clients
  93. --allow_registration = true -- Whether to allow registration of new accounts via Jabber clients
  94. registration_blacklist = { } -- List of IP addresses to deny registration
  95. registration_whitelist = { } -- List of IP addresses to allow registration (bypassing all throttling and limits)
  96. whitelist_registration_only = false -- Whether to only allow IPs in registration_whitelist to register
  97. min_seconds_between_registrations = 300 -- The number of seconds a client at a particular IP address must wait before it can register another account
  98. registration_throttle_max = nil -- Defaults to 1 if min_seconds_between_registrations is set, otherwise unset. New in 0.10
  99. registration_throttle_period = nil -- Defaults to the same value as min_seconds_between_registrations. New in 0.10
  100. registration_throttle_cache_size = 100 -- How many IP addresses to keep track of for throttling. New in 0.10
  101. blacklist_on_registration_throttle_overload = false -- Determines behavior if the above cache overflows. If true and the IP is still over the limit, add it to the registration blacklist. New in 0.10
  102.  
  103. ---- Settings for "mod_watchregistrations" -- https://prosody.im/doc/modules/mod_watchregistrations
  104. registration_watchers = { "example-user@example.com" } -- mod_watchregistrations will use this list of users instead of the admin list
  105. registration_notification = "User $username just registered on $host from $ip"
  106.  
  107. ---- Settings for "mod_welcome" -- https://prosody.im/doc/modules/mod_welcome
  108. welcome_message = "Welcome $username - please take a look at https://example.com/xmpp-im/ for further information about this instant messaging service and use OMEMO or at least OTR encryption. Dif-tor heh smusma!"
  109.  
  110. --- Settings for COMMUNITY MODS (alphabetical order)
  111.  
  112. ---- Settings for "http_upload" -- https://modules.prosody.im/mod_http_upload.html
  113. http_upload_path = "/var/lib/prosody/http_upload/"
  114. --http_upload_file_size_limit = 1024 -- bytes
  115. http_upload_file_size_limit = 2097152 -- bytes
  116.  
  117. ---- Settings for "mod_mam" -- https://modules.prosody.im/mod_mam.html
  118. ----- Storage backend
  119. storage = {
  120.   archive2 = "sql";
  121. }
  122. ----- Query size limits
  123. max_archive_query_results = 20;
  124. ----- Archive expiry
  125. --archive_expires_after = "1d" -- one day
  126. --archive_expires_after = "1w" -- one week, the default
  127. archive_expires_after = "2m" -- two months
  128. --archive_expires_after = "1y" -- one year
  129. --archive_expires_after = 60 * 60 -- one hour
  130. --archive_expires_after = "never" -- forever
  131. ----- Message matching policy
  132. --default_archive_policy = false -- stores no messages
  133. --default_archive_policy = "roster" -- stores messages to/from contacts in the users roster
  134. default_archive_policy = true -- stores all messages. This is the default.
  135.  
  136. ---- Settings for "mod_mam_muc" -- https://modules.prosody.im/mod_mam_muc.html
  137. muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
  138. muc_log_all_rooms = false; -- set to true to force logging of all rooms
  139. max_archive_query_results = 20; -- "20" is the largest number of messages that are allowed to be retrieved in one MAM request.
  140. max_history_messages = 5; -- -- "1000" is the largest number of messages that are allowed to be retrieved when joining a room.
  141.  
  142. ---- Settings for "mod_smacks" -- https://modules.prosody.im/mod_smacks.html
  143. smacks_hibernation_time = 300 -- The number of seconds a disconnected session should stay alive for (to allow reconnect)
  144. smacks_enabled_s2s = false -- Enable Stream Management on server connections? Experimental
  145. smacks_max_unacked_stanzas = 0 -- How many stanzas to send before requesting acknowledgement
  146. smacks_max_ack_delay = 60 -- The number of seconds an ack must be unanswered to trigger an "smacks-ack-delayed" event
  147.  
  148. ------------------------------[ Non-module related Prosody settings ]------------------------------
  149.  
  150. -- These are the SSL/TLS-related settings. If you don't want
  151. -- to use SSL/TLS, you may comment or remove this
  152. ssl = {
  153.         key = "/etc/prosody/certs/privkey.pem";
  154.         certificate = "/etc/prosody/certs/fullchain.pem";
  155.       }
  156.  
  157. -- Force clients to use encrypted connections? This option will
  158. -- prevent clients from authenticating unless they are using encryption.
  159.  
  160. c2s_require_encryption = true
  161.  
  162. -- Force certificate authentication for server-to-server connections?
  163. -- This provides ideal security, but requires servers you communicate
  164. -- with to support encryption AND present valid, trusted certificates.
  165. -- NOTE: Your version of LuaSec must support certificate verification!
  166. -- For more information see http://prosody.im/doc/s2s#security
  167.  
  168. s2s_secure_auth = true
  169.  
  170. -- Many servers don't support encryption or have invalid or self-signed
  171. -- certificates. You can list domains here that will not be required to
  172. -- authenticate using certificates. They will be authenticated using DNS.
  173.  
  174. --s2s_secure_domains = { "jabber.org" }
  175.  
  176. -- Required for init scripts and prosodyctl
  177. pidfile = "/var/run/prosody/prosody.pid"
  178.  
  179. -- Select the authentication backend to use. The 'internal' providers
  180. -- use Prosody's configured data storage to store the authentication data.
  181. -- To allow Prosody to offer secure authentication mechanisms to clients, the
  182. -- default provider stores passwords in plaintext. If you do not trust your
  183. -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
  184. -- for information about using the hashed backend.
  185.  
  186. authentication = "internal_hashed"
  187.  
  188. -- Select the storage backend to use. By default Prosody uses flat files
  189. -- in its configured data directory, but it also supports more backends
  190. -- through modules. An "sql" backend is included by default, but requires
  191. -- additional dependencies. See http://prosody.im/doc/storage for more info.
  192.  
  193. --storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
  194. -- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
  195.  
  196. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  197. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  198. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  199. sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "a34877965dfd22142cdb380687bdca0850c0bda491acb86054534feeae64a6ca", host = "localhost" }
  200.  
  201. -- Logging configuration
  202. -- For advanced logging see http://prosody.im/doc/logging
  203.  
  204. log = {
  205.         info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
  206.         error = "/var/log/prosody/prosody.err";
  207.         "*syslog";
  208.  }
  209.  
  210. ------------------------------[ Virtual hosts ]------------------------------
  211.  
  212. -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
  213. -- Settings under each VirtualHost entry apply *only* to that host.
  214.  
  215. VirtualHost "example.com"
  216.  
  217.         -- Assign this host a certificate for TLS, otherwise it would use the one
  218.         -- set in the global section (if any).
  219.         -- Note that old-style SSL on port 5223 only supports one certificate, and will always
  220.         -- use the global one.
  221. --        ssl = {
  222. --               key = "/etc/prosody/certs/example.com.key";
  223. --               certificate = "/etc/prosody/certs/example.com.crt";
  224. --       }
  225.  
  226. ------------------------------[ Components ]------------------------------
  227.  
  228. -- You can specify components to add hosts that provide special services,
  229. -- like multi-user conferences, and transports.
  230. -- For more information on components, see http://prosody.im/doc/components
  231.  
  232. ---Set up a MUC (multi-user chat) room server on conference.example.com:
  233. Component "conference.example.com" "muc"
  234.        name = "The example.com chatrooms server - check https://example.com/xmpp-im/ for further information."
  235.        max_history_messages = 5
  236.        modules_enabled = {
  237.                "mam_muc"; -- https://modules.prosody.im/mod_mam_muc.html
  238.        }
  239.  
  240. -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
  241. --Component "proxy.example.com" "proxy65"
  242.  
  243. ---Set up an external component (default component port is 5347)
  244. --
  245. -- External components allow adding various services, such as gateways/
  246. -- transports to other networks like ICQ, MSN and Yahoo. For more info
  247. -- see: http://prosody.im/doc/components#adding_an_external_component
  248. --
  249. --Component "gateway.example.com"
  250. --      component_secret = "password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement