The "websocket" Module


This module allows WebSocket clients to connect to the IRC server.


To load this module use the following <module> tag:

<module name="websocket">


This module extends the core <bind> tags with the following hook types:

Name Description
websocket Listens for WebSocket connections.
Example Usage

Listens for plaintext WebSocket connections on the endpoint:

<bind address=""


The <websocket> tag defines settings about how the websocket module should behave. This tag can only be defined once.

Name Type Default Value Description
proxyranges Text None New in v3.5.0! A space-delimited list of glob or CIDR matches to trust the X-Real-IP or X-Forwarded-For headers from.
sendastext Text Yes Whether to send messages to WebSocket clients using text frames instead of binary frames. This requires all text to be transcoded to UTF-8.
Example Usage
<websocket proxyranges=" 198.51.100.*"


The <wsorigin> tag defines an WebSocket origin that is allowed to connect to the server. This tag can be defined as many times as required.

Name Type Default Value Description
allow Text None Required! A glob pattern for an URL of a web page that is allowed to connect.
Example Usage

Allows access to the server from all subdomains of

<wsorigin allow="https://*">

Special Notes

The following HTTP errors are sent by this module:

If you add an encrypted WebSocket listener you should create a custom SSL profile that has requestclientcert="no" set. This is required to allow connections to your server using Google Chrome.

Some reverse proxy providers (e.g. Cloudflare) drop idle WebSocket connections which can cause problems with this module. It is recommended that you avoid these providers.