WebSockets are an advanced technology that allows for a two-way, interactive communication session between a user's browser and the server. For BeDesk, this is essential for powering all real-time functionality.
When configured, WebSockets enable:
Instantaneous live chat messages.
Real-time typing indicators for both agents and customers.
Immediate desktop notifications for new tickets or replies.
Live updates across the agent dashboard without needing to refresh the page.
While beneficial for the entire platform, a properly configured WebSocket server is especially critical if you have installed the Live Chat module, as it is required to provide a truly instant and professional chat experience.
You can configure your WebSockets provider by navigating from Admin > Settings > System > Websockets page. You will be presented with several options to handle real-time messaging on your BeDesk instance.
The Local option utilizes Laravel Reverb, a high-performance, first-party WebSocket server built by the creators of the Laravel framework that powers BeDesk. This is the recommended approach for self-hosted users as it gives you full control over your infrastructure without relying on third-party services.
All the necessary application-level configuration for Reverb is already included in BeDesk. You only need to enable it on your server.
To get started, select Local from the "Websockets Provider" dropdown in your BeDesk settings and click Save changes.
For the server-side setup, which includes starting the Reverb server and ensuring it runs continuously in a production environment, please refer to the official Laravel Reverb documentation. It provides the most up-to-date and comprehensive instructions for deployment and process management.
➡️ View the Official Laravel Reverb Documentation
If you prefer not to manage your own WebSocket server, you can use a managed, cloud-based service like Pusher or Ably. These services handle all the complexity of running a WebSocket infrastructure for you, offering a reliable and hassle-free alternative.
Pusher: A popular and robust platform for building real-time features.
Ably: A powerful real-time experience platform that provides a wide range of features beyond WebSockets.
To use one of these providers:
Create an account on their respective website (Pusher.com or Ably.com).
From their dashboard, create a new application to get your API credentials (usually an App ID, Key, Secret, and Cluster).
In your BeDesk settings, select either Pusher or Ably from the dropdown menu.
Additional fields will appear asking for the API credentials you obtained. Enter them, save your changes, and you're all set.
If you select None (Disabled), your helpdesk's real-time functionality will still work, but it will use a fallback method called HTTP polling.
Polling is a technique where the user's browser repeatedly sends requests to your server every few seconds to ask, "Is there any new information?" While this works, it is vastly inferior to a WebSocket connection for several reasons:
Slower Updates: Information is not truly instant. Users will experience a noticeable delay in receiving new chat messages and notifications, typically between 2-5 seconds, depending on the polling frequency.
Increased Server Load: Imagine 50 active users all asking your server for updates every 3 seconds. This creates a constant, significant load on your server's resources (CPU, memory, and network), which can slow down the entire application.
Poor User Experience: The inherent delay makes the application feel sluggish. This is most damaging to the Live Chat module, where real-time conversation is the primary feature. A multi-second delay between messages can make a conversation frustrating and appear unprofessional.
A WebSocket connection, by contrast, opens a single, persistent connection. The server can "push" new information to the browser the moment it becomes available. This is far more efficient and provides the truly instantaneous experience your users expect.