BOSH allows clients to use HTTP to communicate with XMPP servers. Often used to allow browser based webclients to connect to an XMPP server, BOSH is also useful in situations where a user is behind a firewall or NAT is preventing connections to the required server ports.


mod_bosh implements XEP-0124 and XEP-0206. For more advanced configuration options see Setting up a BOSH server.


    modules_enabled = {
        -- Other modules
        "bosh"; -- Enable mod_bosh


Option Default Notes
bosh_ports { 5280 } List of ports to listen for BOSH requests on (also see the advanced ports config) :!: Note: This option was removed in 0.9.0, see upgrading
bosh_max_inactivity 60 Maximum amount of time in seconds a client may remain silent for, with no requests
consider_bosh_secure false If true then BOSH connections will be allowed when requiring encryption, even if unencrypted
cross_domain_bosh false Set to true to enable cross-domain requests from websites, or a list like { "", "" }
These advanced options are best left at their defaults unless you know what you are doing
bosh_default_hold 1 Maximum number of requests the server will hold open for a client
bosh_max_requests 2 Maximum number of requests a client may make to the server at a time
trusted_proxies { "" } A list of proxies to trust, used to find a client's real IP


    modules_enabled = {
        -- Other modules
        "bosh"; -- Enable mod_bosh
    bosh_ports = { 5280 }
    bosh_max_inactivity = 60
    consider_bosh_secure = true -- Use if proxying HTTPS->HTTP on the server side
    cross_domain_bosh = true -- Allow access from scripts on any site with no proxy (requires a modern browser)
doc/modules/mod_bosh.txt · Last modified: 2016/08/20 16:25 by Kim Alvefur