No Description
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.j2 7.2KB

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