Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2017
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.17 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. -- Settings in this section apply to the whole server and are the default settings
  16. -- for any virtual hosts
  17.  
  18. -- This is a (by default, empty) list of accounts that are admins
  19. -- for the server. Note that you must create the accounts separately
  20. -- (see http://prosody.im/doc/creating_accounts for info)
  21. -- Example: admins = { "user1@example.com", "user2@example.net" }
  22. admins = { "XXXXXX@XXXX.XXXX.XXX" }
  23.  
  24. plugin_paths = { "/depot/prosody-modules" }
  25.  
  26. -- Enable use of libevent for better performance under high load
  27. -- For more information see: http://prosody.im/doc/libevent
  28. --use_libevent = true;
  29.  
  30. -- This is the list of modules Prosody will load on startup.
  31. -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
  32. -- Documentation on modules can be found at: http://prosody.im/doc/modules
  33. modules_enabled = {
  34.  
  35. -- Generally required
  36. "roster"; -- Allow users to have a roster. Recommended ;)
  37. "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
  38. "tls"; -- Add support for secure TLS on c2s/s2s connections
  39. "dialback"; -- s2s dialback support
  40. "disco"; -- Service discovery
  41. "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
  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 (requires the lua-zlib package installed)
  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. --"groups"; -- Shared roster support
  69. "announce"; -- Send announcement to all online users
  70. --"welcome"; -- Welcome users who register accounts
  71. --"watchregistrations"; -- Alert admins of registrations
  72. --"motd"; -- Send a message to users when they log in
  73. "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
  74. "carbons";
  75. "smacks";
  76. "smacks_offline";
  77. "csi";
  78. "filter_chatstates";
  79. "throttle_presence";
  80. "http_upload";
  81. "blocking";
  82. };
  83.  
  84. -- These modules are auto-loaded, but should you want
  85. -- to disable them then uncomment them here:
  86. modules_disabled = {
  87. -- "offline"; -- Store offline messages
  88. -- "c2s"; -- Handle client connections
  89. -- "s2s"; -- Handle server-to-server connections
  90. };
  91.  
  92. -- Disable account creation by default, for security
  93. -- For more information see http://prosody.im/doc/creating_accounts
  94. allow_registration = false;
  95.  
  96. consider_bosh_secure = true;
  97.  
  98. -- These are the SSL/TLS-related settings. If you don't want
  99. -- to use SSL/TLS, you may comment or remove this
  100. ssl = {
  101. key = "/etc/letsencrypt/live/XXXXXX/privkey.pem";
  102. certificate = "/etc/letsencrypt/live/XXXXXX/fullchain.pem";
  103. }
  104.  
  105. -- Force clients to use encrypted connections? This option will
  106. -- prevent clients from authenticating unless they are using encryption.
  107.  
  108. c2s_require_encryption = true
  109.  
  110. -- Force certificate authentication for server-to-server connections?
  111. -- This provides ideal security, but requires servers you communicate
  112. -- with to support encryption AND present valid, trusted certificates.
  113. -- NOTE: Your version of LuaSec must support certificate verification!
  114. -- For more information see http://prosody.im/doc/s2s#security
  115.  
  116. s2s_require_encryption = true
  117. s2s_secure_auth = true
  118.  
  119. -- Many servers don't support encryption or have invalid or self-signed
  120. -- certificates. You can list domains here that will not be required to
  121. -- authenticate using certificates. They will be authenticated using DNS.
  122.  
  123. s2s_insecure_domains = { "pod.fulll.name", "linux.it" }
  124.  
  125. -- Even if you leave s2s_secure_auth disabled, you can still require valid
  126. -- certificates for some domains by specifying a list here.
  127.  
  128. --s2s_secure_domains = { "jabber.org" }
  129.  
  130. -- Required for init scripts and prosodyctl
  131. pidfile = "/var/run/prosody/prosody.pid"
  132.  
  133. -- Select the authentication backend to use. The 'internal' providers
  134. -- use Prosody's configured data storage to store the authentication data.
  135. -- To allow Prosody to offer secure authentication mechanisms to clients, the
  136. -- default provider stores passwords in plaintext. If you do not trust your
  137. -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
  138. -- for information about using the hashed backend.
  139.  
  140. authentication = "internal_plain"
  141.  
  142. -- Select the storage backend to use. By default Prosody uses flat files
  143. -- in its configured data directory, but it also supports more backends
  144. -- through modules. An "sql" backend is included by default, but requires
  145. -- additional dependencies. See http://prosody.im/doc/storage for more info.
  146.  
  147. --storage = "sql" -- Default is "internal"
  148.  
  149. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  150. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  151. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  152. --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  153.  
  154. -- Logging configuration
  155. -- For advanced logging see http://prosody.im/doc/logging
  156. log = {
  157. info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
  158. error = "/var/log/prosody/prosody.err";
  159. "*syslog";
  160. }
  161.  
  162. ----------- Virtual hosts -----------
  163. -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
  164. -- Settings under each VirtualHost entry apply *only* to that host.
  165.  
  166. VirtualHost "localhost"
  167. enabled = false -- Remove this line to enable this host
  168.  
  169. VirtualHost "XXX.XXX.XXX"
  170.  
  171. authentication = "diaspora"
  172. auth_diaspora = { driver = "MySQL", database = "XXXXXX", username = "XXXXXX", password = "XXXXXX", host = "localhost" }
  173.  
  174. modules_enabled = {
  175. "diaspora_contacts";
  176. };
  177.  
  178. -- Assign this host a certificate for TLS, otherwise it would use the one
  179. -- set in the global section (if any).
  180. -- Note that old-style SSL on port 5223 only supports one certificate, and will always
  181. -- use the global one.
  182. ssl = {
  183. key = "/etc/letsencrypt/live/XXXXXX/privkey.pem";
  184. certificate = "/etc/letsencrypt/live/XXXXXX/fullchain.pem";
  185. }
  186.  
  187.  
  188. ------ Components ------
  189. -- You can specify components to add hosts that provide special services,
  190. -- like multi-user conferences, and transports.
  191. -- For more information on components, see http://prosody.im/doc/components
  192.  
  193. ---Set up a MUC (multi-user chat) room server on conference.example.com:
  194. --Component "conference.example.com" "muc"
  195.  
  196. -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
  197. --Component "proxy.example.com" "proxy65"
  198.  
  199. ---Set up an external component (default component port is 5347)
  200. --
  201. -- External components allow adding various services, such as gateways/
  202. -- transports to other networks like ICQ, MSN and Yahoo. For more info
  203. -- see: http://prosody.im/doc/components#adding_an_external_component
  204. --
  205. --Component "gateway.example.com"
  206. -- component_secret = "password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement