Realtime Functionality Using Websockets

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:

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.

Configuration

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

Third-Party Providers (Pusher & Ably)

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.

To use one of these providers:

  1. Create an account on their respective website (Pusher.com or Ably.com).

  2. From their dashboard, create a new application to get your API credentials (usually an App ID, Key, Secret, and Cluster).

  3. In your BeDesk settings, select either Pusher or Ably from the dropdown menu.

  4. Additional fields will appear asking for the API credentials you obtained. Enter them, save your changes, and you're all set.

What Happens Without WebSockets?

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:

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.