prosody.cfg.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. {{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }}
  2. -- Prosody Example Configuration File
  3. --
  4. -- Information on configuring Prosody can be found on our
  5. -- website at http://prosody.im/doc/configure
  6. --
  7. -- Tip: You can check that the syntax of this file is correct
  8. -- when you have finished by running: luac -p prosody.cfg.lua
  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. ---------- Server-wide settings ----------
  15. -- Settings in this section apply to the whole server and are the default settings
  16. -- for any virtual hosts
  17. -- This is a (by default, empty) list of accounts that are admins
  18. -- for the server. Note that you must create the accounts separately
  19. -- (see http://prosody.im/doc/creating_accounts for info)
  20. -- Example: admins = { "user1@example.com", "user2@example.net" }
  21. admins = { }
  22. -- Enable use of libevent for better performance under high load
  23. -- For more information see: http://prosody.im/doc/libevent
  24. --use_libevent = true;
  25. -- This is the list of modules Prosody will load on startup.
  26. -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
  27. -- Documentation on modules can be found at: http://prosody.im/doc/modules
  28. modules_enabled = {
  29. -- Generally required
  30. "roster"; -- Allow users to have a roster. Recommended ;)
  31. "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
  32. "tls"; -- Add support for secure TLS on c2s/s2s connections
  33. "dialback"; -- s2s dialback support
  34. "disco"; -- Service discovery
  35. -- Not essential, but recommended
  36. "private"; -- Private XML storage (for room bookmarks, etc.)
  37. "vcard"; -- Allow users to set vCards
  38. "limits"; -- Enable bandwidth limiting for XMPP connections
  39. -- These are commented by default as they have a performance impact
  40. --"privacy"; -- Support privacy lists
  41. --"compression"; -- Stream compression (Debian: requires lua-zlib module to work)
  42. -- Nice to have
  43. "version"; -- Replies to server version requests
  44. "uptime"; -- Report how long server has been running
  45. "time"; -- Let others know the time here on this server
  46. "ping"; -- Replies to XMPP pings with pongs
  47. "pep"; -- Enables users to publish their mood, activity, playing music and more
  48. "register"; -- Allow users to register on this server using a client and change passwords
  49. -- Admin interfaces
  50. "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
  51. --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
  52. -- HTTP modules
  53. --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
  54. --"http_files"; -- Serve static files from a directory over HTTP
  55. -- Other specific functionality
  56. "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
  57. --"groups"; -- Shared roster support
  58. --"announce"; -- Send announcement to all online users
  59. --"welcome"; -- Welcome users who register accounts
  60. --"watchregistrations"; -- Alert admins of registrations
  61. --"motd"; -- Send a message to users when they log in
  62. --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
  63. {{ if .Env.GLOBAL_MODULES }}
  64. "{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES) }}";
  65. {{ end }}
  66. };
  67. component_ports = { }
  68. https_ports = { }
  69. -- These modules are auto-loaded, but should you want
  70. -- to disable them then uncomment them here:
  71. modules_disabled = {
  72. -- "offline"; -- Store offline messages
  73. -- "c2s"; -- Handle client connections
  74. "s2s"; -- Handle server-to-server connections
  75. };
  76. -- Disable account creation by default, for security
  77. -- For more information see http://prosody.im/doc/creating_accounts
  78. allow_registration = false;
  79. -- Enable rate limits for incoming client and server connections
  80. limits = {
  81. c2s = {
  82. rate = "10kb/s";
  83. };
  84. s2sin = {
  85. rate = "30kb/s";
  86. };
  87. }
  88. pidfile = "/config/data/prosody.pid";
  89. -- Force clients to use encrypted connections? This option will
  90. -- prevent clients from authenticating unless they are using encryption.
  91. c2s_require_encryption = false
  92. -- Force certificate authentication for server-to-server connections?
  93. -- This provides ideal security, but requires servers you communicate
  94. -- with to support encryption AND present valid, trusted certificates.
  95. -- NOTE: Your version of LuaSec must support certificate verification!
  96. -- For more information see http://prosody.im/doc/s2s#security
  97. s2s_secure_auth = false
  98. -- Many servers don't support encryption or have invalid or self-signed
  99. -- certificates. You can list domains here that will not be required to
  100. -- authenticate using certificates. They will be authenticated using DNS.
  101. --s2s_insecure_domains = { "gmail.com" }
  102. -- Even if you leave s2s_secure_auth disabled, you can still require valid
  103. -- certificates for some domains by specifying a list here.
  104. --s2s_secure_domains = { "jabber.org" }
  105. -- Select the authentication backend to use. The 'internal' providers
  106. -- use Prosody's configured data storage to store the authentication data.
  107. -- To allow Prosody to offer secure authentication mechanisms to clients, the
  108. -- default provider stores passwords in plaintext. If you do not trust your
  109. -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
  110. -- for information about using the hashed backend.
  111. authentication = "internal_hashed"
  112. -- Select the storage backend to use. By default Prosody uses flat files
  113. -- in its configured data directory, but it also supports more backends
  114. -- through modules. An "sql" backend is included by default, but requires
  115. -- additional dependencies. See http://prosody.im/doc/storage for more info.
  116. --storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
  117. -- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
  118. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  119. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  120. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  121. --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  122. -- Logging configuration
  123. -- For advanced logging see http://prosody.im/doc/logging
  124. --
  125. -- Debian:
  126. -- Logs info and higher to /var/log
  127. -- Logs errors to syslog also
  128. log = {
  129. { levels = {min = "{{ $LOG_LEVEL }}"}, to = "console"};
  130. }
  131. {{ if .Env.GLOBAL_CONFIG }}
  132. {{ join "\n" (splitList "\\n" .Env.GLOBAL_CONFIG) }}
  133. {{ end }}
  134. -- Enable use of native prosody 0.11 support for epoll over select
  135. network_backend = "epoll";
  136. -- Set the TCP backlog to 511 since the kernel rounds it up to the next power of 2: 512.
  137. network_settings = {
  138. tcp_backlog = 511;
  139. }
  140. http_ports = { 5280 }
  141. http_interfaces = { "*", "::" }
  142. data_path = "/config/data"
  143. smacks_max_unacked_stanzas = 5;
  144. smacks_hibernation_time = 60;
  145. smacks_max_hibernated_sessions = 1;
  146. smacks_max_old_sessions = 1;
  147. Include "conf.d/*.cfg.lua"