You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prosody.cfg.lua.example 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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: prosodyctl check config
  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. ---------- Server-wide settings ----------
  13. -- Settings in this section apply to the whole server and are the default settings
  14. -- for any virtual hosts
  15. -- This is a (by default, empty) list of accounts that are admins
  16. -- for the server. Note that you must create the accounts separately
  17. -- (see http://prosody.im/doc/creating_accounts for info)
  18. -- Example: admins = { "user1@example.com", "user2@example.net" }
  19. admins = { }
  20. daemonize = true
  21. cross_domain_bosh = true;
  22. component_ports = { 5347 }
  23. --component_interface = "192.168.0.10"
  24. -- Enable use of libevent for better performance under high load
  25. -- For more information see: http://prosody.im/doc/libevent
  26. --use_libevent = true
  27. -- This is the list of modules Prosody will load on startup.
  28. -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
  29. -- Documentation on modules can be found at: http://prosody.im/doc/modules
  30. modules_enabled = {
  31. -- Generally required
  32. "roster"; -- Allow users to have a roster. Recommended ;)
  33. "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
  34. "tls"; -- Add support for secure TLS on c2s/s2s connections
  35. "dialback"; -- s2s dialback support
  36. "disco"; -- Service discovery
  37. "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
  38. -- Not essential, but recommended
  39. "private"; -- Private XML storage (for room bookmarks, etc.)
  40. "vcard"; -- Allow users to set vCards
  41. -- These are commented by default as they have a performance impact
  42. --"privacy"; -- Support privacy lists
  43. "compression"; -- Stream compression (requires the lua-zlib package installed)
  44. -- Nice to have
  45. "version"; -- Replies to server version requests
  46. "uptime"; -- Report how long server has been running
  47. "time"; -- Let others know the time here on this server
  48. "ping"; -- Replies to XMPP pings with pongs
  49. "pep"; -- Enables users to publish their mood, activity, playing music and more
  50. "register"; -- Allow users to register on this server using a client and change passwords
  51. -- Admin interfaces
  52. "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
  53. --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
  54. -- HTTP modules
  55. "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
  56. --"http_files"; -- Serve static files from a directory over HTTP
  57. -- Other specific functionality
  58. --"groups"; -- Shared roster support
  59. --"announce"; -- Send announcement to all online users
  60. --"welcome"; -- Welcome users who register accounts
  61. --"watchregistrations"; -- Alert admins of registrations
  62. --"motd"; -- Send a message to users when they log in
  63. --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
  64. -- jitsi
  65. "smacks";
  66. "carbons";
  67. "mam";
  68. "lastactivity";
  69. "offline";
  70. "pubsub";
  71. "adhoc";
  72. "websocket";
  73. "http_altconnect";
  74. }
  75. -- These modules are auto-loaded, but should you want
  76. -- to disable them then uncomment them here:
  77. modules_disabled = {
  78. -- "offline"; -- Store offline messages
  79. -- "c2s"; -- Handle client connections
  80. -- "s2s"; -- Handle server-to-server connections
  81. }
  82. -- Disable account creation by default, for security
  83. -- For more information see http://prosody.im/doc/creating_accounts
  84. allow_registration = false
  85. -- These are the SSL/TLS-related settings. If you don't want
  86. -- to use SSL/TLS, you may comment or remove this
  87. ssl = {
  88. key = "/etc/prosody/certs/localhost.key";
  89. certificate = "/etc/prosody/certs/localhost.crt";
  90. }
  91. -- Force clients to use encrypted connections? This option will
  92. -- prevent clients from authenticating unless they are using encryption.
  93. -- c2s_require_encryption = true
  94. -- Force certificate authentication for server-to-server connections?
  95. -- This provides ideal security, but requires servers you communicate
  96. -- with to support encryption AND present valid, trusted certificates.
  97. -- NOTE: Your version of LuaSec must support certificate verification!
  98. -- For more information see http://prosody.im/doc/s2s#security
  99. -- s2s_secure_auth = false
  100. -- Many servers don't support encryption or have invalid or self-signed
  101. -- certificates. You can list domains here that will not be required to
  102. -- authenticate using certificates. They will be authenticated using DNS.
  103. --s2s_insecure_domains = { "gmail.com" }
  104. -- Even if you leave s2s_secure_auth disabled, you can still require valid
  105. -- certificates for some domains by specifying a list here.
  106. --s2s_secure_domains = { "jabber.org" }
  107. -- Required for init scripts and prosodyctl
  108. pidfile = "/var/run/prosody/prosody.pid"
  109. -- Select the authentication backend to use. The 'internal' providers
  110. -- use Prosody's configured data storage to store the authentication data.
  111. -- To allow Prosody to offer secure authentication mechanisms to clients, the
  112. -- default provider stores passwords in plaintext. If you do not trust your
  113. -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
  114. -- for information about using the hashed backend.
  115. -- authentication = "internal_plain"
  116. authentication = "internal_hashed"
  117. -- Select the storage backend to use. By default Prosody uses flat files
  118. -- in its configured data directory, but it also supports more backends
  119. -- through modules. An "sql" backend is included by default, but requires
  120. -- additional dependencies. See http://prosody.im/doc/storage for more info.
  121. --storage = "sql" -- Default is "internal"
  122. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  123. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  124. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  125. --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  126. -- Logging configuration
  127. -- For advanced logging see http://prosody.im/doc/logging
  128. log = {
  129. info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
  130. error = "/var/log/prosody/prosody.err";
  131. "*syslog";
  132. }
  133. ----------- Virtual hosts -----------
  134. -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
  135. -- Settings under each VirtualHost entry apply *only* to that host.
  136. --VirtualHost "localhost"
  137. VirtualHost "jitsi.example.com"
  138. -- enabled = false -- Remove this line to enable this host
  139. authentication = "anonymous"
  140. -- Assign this host a certificate for TLS, otherwise it would use the one
  141. -- set in the global section (if any).
  142. -- Note that old-style SSL on port 5223 only supports one certificate, and will always
  143. -- use the global one.
  144. ssl = {
  145. key = "/var/lib/prosody/jitsi.example.com.key";
  146. certificate = "/var/lib/prosody/jitsi.example.com.crt";
  147. }
  148. ------ Components ------
  149. -- You can specify components to add hosts that provide special services,
  150. -- like multi-user conferences, and transports.
  151. -- For more information on components, see http://prosody.im/doc/components
  152. ---Set up a MUC (multi-user chat) room server on conference.example.com:
  153. --Component "conference.example.com" "muc"
  154. -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
  155. --Component "proxy.example.com" "proxy65"
  156. ---Set up an external component (default component port is 5347)
  157. --
  158. -- External components allow adding various services, such as gateways/
  159. -- transports to other networks like ICQ, MSN and Yahoo. For more info
  160. -- see: http://prosody.im/doc/components#adding_an_external_component
  161. --
  162. --Component "gateway.example.com"
  163. -- component_secret = "password"
  164. Component "conference.jitsi.example.com" "muc"
  165. Component "jitsi-videobridge.jitsi.example.com"
  166. component_secret = "IfGaish6"