prosody.cfg.lua 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. -- These are commented by default as they have a performance impact
  39. --"privacy"; -- Support privacy lists
  40. --"compression"; -- Stream compression (Debian: requires lua-zlib module to work)
  41. -- Nice to have
  42. "version"; -- Replies to server version requests
  43. "uptime"; -- Report how long server has been running
  44. "time"; -- Let others know the time here on this server
  45. "ping"; -- Replies to XMPP pings with pongs
  46. "pep"; -- Enables users to publish their mood, activity, playing music and more
  47. "register"; -- Allow users to register on this server using a client and change passwords
  48. -- Admin interfaces
  49. "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
  50. --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
  51. -- HTTP modules
  52. --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
  53. --"http_files"; -- Serve static files from a directory over HTTP
  54. -- Other specific functionality
  55. "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
  56. --"groups"; -- Shared roster support
  57. --"announce"; -- Send announcement to all online users
  58. --"welcome"; -- Welcome users who register accounts
  59. --"watchregistrations"; -- Alert admins of registrations
  60. --"motd"; -- Send a message to users when they log in
  61. --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
  62. {{ if .Env.GLOBAL_MODULES }}
  63. "{{ join "\";\n\"" (splitList "," .Env.GLOBAL_MODULES) }}";
  64. {{ end }}
  65. };
  66. https_ports = { }
  67. -- These modules are auto-loaded, but should you want
  68. -- to disable them then uncomment them here:
  69. modules_disabled = {
  70. -- "offline"; -- Store offline messages
  71. -- "c2s"; -- Handle client connections
  72. -- "s2s"; -- Handle server-to-server connections
  73. };
  74. -- Disable account creation by default, for security
  75. -- For more information see http://prosody.im/doc/creating_accounts
  76. allow_registration = false;
  77. daemonize = false;
  78. pidfile = "/config/data/prosody.pid";
  79. -- Force clients to use encrypted connections? This option will
  80. -- prevent clients from authenticating unless they are using encryption.
  81. c2s_require_encryption = false
  82. -- Force certificate authentication for server-to-server connections?
  83. -- This provides ideal security, but requires servers you communicate
  84. -- with to support encryption AND present valid, trusted certificates.
  85. -- NOTE: Your version of LuaSec must support certificate verification!
  86. -- For more information see http://prosody.im/doc/s2s#security
  87. s2s_secure_auth = false
  88. -- Many servers don't support encryption or have invalid or self-signed
  89. -- certificates. You can list domains here that will not be required to
  90. -- authenticate using certificates. They will be authenticated using DNS.
  91. --s2s_insecure_domains = { "gmail.com" }
  92. -- Even if you leave s2s_secure_auth disabled, you can still require valid
  93. -- certificates for some domains by specifying a list here.
  94. --s2s_secure_domains = { "jabber.org" }
  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" (Debian: "sql" requires one of the
  107. -- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
  108. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  109. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  110. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  111. --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  112. -- Logging configuration
  113. -- For advanced logging see http://prosody.im/doc/logging
  114. --
  115. -- Debian:
  116. -- Logs info and higher to /var/log
  117. -- Logs errors to syslog also
  118. log = {
  119. { levels = {min = "{{ $LOG_LEVEL }}"}, to = "console"};
  120. }
  121. {{ if .Env.GLOBAL_CONFIG }}
  122. {{ join "\n" (splitList "\\n" .Env.GLOBAL_CONFIG) }}
  123. {{ end }}
  124. -- Enable use of native prosody 0.11 support for epoll over select
  125. network_backend = "epoll";
  126. -- Set the TCP backlog to 511 since the kernel rounds it up to the next power of 2: 512.
  127. network_settings = {
  128. tcp_backlog = 511;
  129. }
  130. component_interface = { "*" }
  131. data_path = "/config/data"
  132. Include "conf.d/*.cfg.lua"