Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Prosody XMPP Server Configuration
- --
- -- Information on configuring Prosody can be found on our
- -- website at http://prosody.im/doc/configure
- --
- -- Tip: You can check that the syntax of this file is correct
- -- when you have finished by running: luac -p prosody.cfg.lua
- -- If there are any errors, it will let you know what and where
- -- they are, otherwise it will keep quiet.
- --
- -- Good luck, and happy Jabbering!
- ------------------------------[ Server-wide settings ]------------------------------
- -- Settings in this section apply to the whole server and are the default settings
- -- for any virtual hosts
- -- This is a (by default, empty) list of accounts that are admins
- -- for the server. Note that you must create the accounts separately
- -- (see http://prosody.im/doc/creating_accounts for info)
- -- Example: admins = { "user1@example.com", "user2@example.com" }
- admins = {"example-admin-user@example.com"}
- -- Enable use of libevent for better performance under high load
- -- For more information see: http://prosody.im/doc/libevent
- --use_libevent = true;
- -- This is the list of modules Prosody will load on startup.
- -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
- -- Documentation on modules can be found at: http://prosody.im/doc/modules
- plugin_paths = { "/usr/lib/prosody/modules/", "/usr/lib/prosody/modules_community/" }
- modules_enabled = {
- -- Core modules (alphabetical order) -- default location is "/usr/lib/prosody/modules"
- "admin_adhoc"; -- Admin interfaces -- Allows administration via an XMPP client that supports ad-hoc commands
- "admin_telnet"; -- Admin interfaces -- Opens telnet console interface on localhost port 5582
- "announce"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_announce
- --"bosh"; -- HTTP modules -- Enable BOSH clients, aka "Jabber over HTTP"
- --"compression"; -- These are commented by default as they have a performance impact -- Stream compression (requires the lua-zlib package installed)
- "dialback"; -- Generally required -- s2s dialback support
- "disco"; -- Generally required -- Service discovery
- --"groups"; -- Other specific functionality -- Shared roster support
- "http"; -- HTTP modules -- https://prosody.im/doc/modules/mod_http
- --"http_files"; -- HTTP modules -- Serve static files from a directory over HTTP
- "http_upload"; -- HTTP modules -- https://modules.prosody.im/mod_http_upload.html
- --"legacyauth"; -- Other specific functionality -- Legacy authentication. Only used by some old clients and bots.
- --"motd"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_motd
- "pep"; -- Nice to have -- Enables users to publish their mood, activity, playing music and more
- "ping"; -- Nice to have -- Replies to XMPP pings with pongs
- "posix"; -- Generally required -- POSIX functionality, sends server to background, enables syslog, etc.
- --"privacy"; -- These are commented by default as they have a performance impact -- Support privacy lists
- "private"; -- Not essential, but recommended -- Private XML storage (for room bookmarks, etc.)
- "register"; -- Nice to have -- https://prosody.im/doc/modules/mod_register
- "roster"; -- Generally required -- Allow users to have a roster. Recommended ;)
- "saslauth"; -- Generally required -- Authentication for clients and servers. Recommended if you want to log in.
- "time"; -- Nice to have -- Let others know the time here on this server
- "tls"; -- Generally required -- Add support for secure TLS on c2s/s2s connections
- "uptime"; -- Nice to have -- Report how long server has been running
- "vcard"; -- Not essential, but recommended -- Allow users to set vCards
- "version"; -- Nice to have -- Replies to server version requests
- "watchregistrations"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_watchregistrations
- "welcome"; -- Other specific functionality -- Welcome users who register accounts
- -- Community modules (alphabetical order) -- default location is "/usr/lib/prosody/modules_community"
- "carbons"; -- https://modules.prosody.im/mod_carbons.html
- "csi"; -- https://modules.prosody.im/mod_csi.html
- "filter_chatstates"; -- https://modules.prosody.im/mod_filter_chatstates.html
- "mam"; -- https://modules.prosody.im/mod_mam.html
- "smacks"; -- https://modules.prosody.im/mod_smacks.html
- "throttle_presence"; -- https://modules.prosody.im/mod_throttle_presence.html
- };
- -- These modules are auto-loaded, but should you want
- -- to disable them then uncomment them here:
- modules_disabled = {
- -- "offline"; -- Store offline messages
- -- "c2s"; -- Handle client connections
- -- "s2s"; -- Handle server-to-server connections
- };
- ------------------------------[ Settings for section "modules_enabled" (see above) ]------------------------------
- --- Settings for CORE MODS (alphabetical order)
- ---- Settings for "mod_motd" -- https://prosody.im/doc/modules/mod_motd
- ---- Using [[ .. ]] instead of " .. " here allows the text to span multiple lines.
- motd_text = [[MotD EXAMPLE LINE1.
- MotD EXAMPLE LINE2.]]
- ---- Settings for "mod_register" -- https://prosody.im/doc/modules/mod_register
- allow_registration = false -- Whether to allow registration of new accounts via Jabber clients
- --allow_registration = true -- Whether to allow registration of new accounts via Jabber clients
- registration_blacklist = { } -- List of IP addresses to deny registration
- registration_whitelist = { } -- List of IP addresses to allow registration (bypassing all throttling and limits)
- whitelist_registration_only = false -- Whether to only allow IPs in registration_whitelist to register
- min_seconds_between_registrations = 300 -- The number of seconds a client at a particular IP address must wait before it can register another account
- registration_throttle_max = nil -- Defaults to 1 if min_seconds_between_registrations is set, otherwise unset. New in 0.10
- registration_throttle_period = nil -- Defaults to the same value as min_seconds_between_registrations. New in 0.10
- registration_throttle_cache_size = 100 -- How many IP addresses to keep track of for throttling. New in 0.10
- blacklist_on_registration_throttle_overload = false -- Determines behavior if the above cache overflows. If true and the IP is still over the limit, add it to the registration blacklist. New in 0.10
- ---- Settings for "mod_watchregistrations" -- https://prosody.im/doc/modules/mod_watchregistrations
- registration_watchers = { "example-user@example.com" } -- mod_watchregistrations will use this list of users instead of the admin list
- registration_notification = "User $username just registered on $host from $ip"
- ---- Settings for "mod_welcome" -- https://prosody.im/doc/modules/mod_welcome
- welcome_message = "Welcome $username - please take a look at https://example.com/xmpp-im/ for further information about this instant messaging service and use OMEMO or at least OTR encryption. Dif-tor heh smusma!"
- --- Settings for COMMUNITY MODS (alphabetical order)
- ---- Settings for "http_upload" -- https://modules.prosody.im/mod_http_upload.html
- http_upload_path = "/var/lib/prosody/http_upload/"
- --http_upload_file_size_limit = 1024 -- bytes
- http_upload_file_size_limit = 2097152 -- bytes
- ---- Settings for "mod_mam" -- https://modules.prosody.im/mod_mam.html
- ----- Storage backend
- storage = {
- archive2 = "sql";
- }
- ----- Query size limits
- max_archive_query_results = 20;
- ----- Archive expiry
- --archive_expires_after = "1d" -- one day
- --archive_expires_after = "1w" -- one week, the default
- archive_expires_after = "2m" -- two months
- --archive_expires_after = "1y" -- one year
- --archive_expires_after = 60 * 60 -- one hour
- --archive_expires_after = "never" -- forever
- ----- Message matching policy
- --default_archive_policy = false -- stores no messages
- --default_archive_policy = "roster" -- stores messages to/from contacts in the users roster
- default_archive_policy = true -- stores all messages. This is the default.
- ---- Settings for "mod_mam_muc" -- https://modules.prosody.im/mod_mam_muc.html
- muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
- muc_log_all_rooms = false; -- set to true to force logging of all rooms
- max_archive_query_results = 20; -- "20" is the largest number of messages that are allowed to be retrieved in one MAM request.
- max_history_messages = 5; -- -- "1000" is the largest number of messages that are allowed to be retrieved when joining a room.
- ---- Settings for "mod_smacks" -- https://modules.prosody.im/mod_smacks.html
- smacks_hibernation_time = 300 -- The number of seconds a disconnected session should stay alive for (to allow reconnect)
- smacks_enabled_s2s = false -- Enable Stream Management on server connections? Experimental
- smacks_max_unacked_stanzas = 0 -- How many stanzas to send before requesting acknowledgement
- smacks_max_ack_delay = 60 -- The number of seconds an ack must be unanswered to trigger an "smacks-ack-delayed" event
- ------------------------------[ Non-module related Prosody settings ]------------------------------
- -- These are the SSL/TLS-related settings. If you don't want
- -- to use SSL/TLS, you may comment or remove this
- ssl = {
- key = "/etc/prosody/certs/privkey.pem";
- certificate = "/etc/prosody/certs/fullchain.pem";
- }
- -- Force clients to use encrypted connections? This option will
- -- prevent clients from authenticating unless they are using encryption.
- c2s_require_encryption = true
- -- Force certificate authentication for server-to-server connections?
- -- This provides ideal security, but requires servers you communicate
- -- with to support encryption AND present valid, trusted certificates.
- -- NOTE: Your version of LuaSec must support certificate verification!
- -- For more information see http://prosody.im/doc/s2s#security
- s2s_secure_auth = true
- -- Many servers don't support encryption or have invalid or self-signed
- -- certificates. You can list domains here that will not be required to
- -- authenticate using certificates. They will be authenticated using DNS.
- --s2s_secure_domains = { "jabber.org" }
- -- Required for init scripts and prosodyctl
- pidfile = "/var/run/prosody/prosody.pid"
- -- Select the authentication backend to use. The 'internal' providers
- -- use Prosody's configured data storage to store the authentication data.
- -- To allow Prosody to offer secure authentication mechanisms to clients, the
- -- default provider stores passwords in plaintext. If you do not trust your
- -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
- -- for information about using the hashed backend.
- authentication = "internal_hashed"
- -- Select the storage backend to use. By default Prosody uses flat files
- -- in its configured data directory, but it also supports more backends
- -- through modules. An "sql" backend is included by default, but requires
- -- additional dependencies. See http://prosody.im/doc/storage for more info.
- --storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
- -- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
- -- For the "sql" backend, you can uncomment *one* of the below to configure:
- --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
- --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
- sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "a34877965dfd22142cdb380687bdca0850c0bda491acb86054534feeae64a6ca", host = "localhost" }
- -- Logging configuration
- -- For advanced logging see http://prosody.im/doc/logging
- log = {
- info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
- error = "/var/log/prosody/prosody.err";
- "*syslog";
- }
- ------------------------------[ Virtual hosts ]------------------------------
- -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
- -- Settings under each VirtualHost entry apply *only* to that host.
- VirtualHost "example.com"
- -- Assign this host a certificate for TLS, otherwise it would use the one
- -- set in the global section (if any).
- -- Note that old-style SSL on port 5223 only supports one certificate, and will always
- -- use the global one.
- -- ssl = {
- -- key = "/etc/prosody/certs/example.com.key";
- -- certificate = "/etc/prosody/certs/example.com.crt";
- -- }
- ------------------------------[ Components ]------------------------------
- -- You can specify components to add hosts that provide special services,
- -- like multi-user conferences, and transports.
- -- For more information on components, see http://prosody.im/doc/components
- ---Set up a MUC (multi-user chat) room server on conference.example.com:
- Component "conference.example.com" "muc"
- name = "The example.com chatrooms server - check https://example.com/xmpp-im/ for further information."
- max_history_messages = 5
- modules_enabled = {
- "mam_muc"; -- https://modules.prosody.im/mod_mam_muc.html
- }
- -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
- --Component "proxy.example.com" "proxy65"
- ---Set up an external component (default component port is 5347)
- --
- -- External components allow adding various services, such as gateways/
- -- transports to other networks like ICQ, MSN and Yahoo. For more info
- -- see: http://prosody.im/doc/components#adding_an_external_component
- --
- --Component "gateway.example.com"
- -- component_secret = "password"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement