> For the complete documentation index, see [llms.txt](https://edentech.gitbook.io/glover/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edentech.gitbook.io/glover/supervisor-setup-vps/websocket-setup.md).

# Websocket Setup

### Supervisor Configuration

Just as creating queue\_manager.conf to help keep laravel queue running, we need to create new conf for laravel reverb.

To create a new file from within the supervisor config directory called "**reverb\_manager.conf**" or "**reverb\_manager.ini**" and the content of the file should be as follows.

Create the config file using the command below:

**Ubuntu**&#x20;

```
nano /etc/supervisor/conf.d/reverb_manager.conf
```

**CentOS**

```
nano /etc/supervisord.d/reverb_manager.ini
```

Then paste the follow code in the file:

```
[program:laravel_reverb]
process_name=%(program_name)s_%(process_num)02d
command=php /PATH_TO_YOUR_BACKEND/artisan reverb:start
startsecs = 0
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stderr_logfile=/PATH_TO_YOUR_BACKEND/storage/logs/larareverb.err.log
stdout_logfile=/PATH_TO_YOUR_BACKEND/storage/logs/larareverb.out.log
stderr_logfile_maxbytes=1MB
stdout_logfile_maxbytes=1MB
```

In the code above, you have to replace the following with the right values on your server:\
**PATH\_TO\_*****YOUR\_BACKEND** replace with the directory path of where you backend files is location, usually its something like **home/USERNAME/public\_*****html**

You may also need to change the **"user=root"**, change it to the user you are logged in in your terminal, usually is root user, so you can set: **user=root**

### Step 3: Start/Restart Supervisor

Once you have created the configuration, you can start/restart the supervisor process. To start supervisor you can run the following commands.

```
sudo supervisorctl stop all
sudo supervisorctl reread
sudo supervisorctl update
```

### **Step 4: Start the queue**

Run the command below to start just the **laravel\_reverb** you just created above

<pre><code><strong>sudo supervisorctl start laravel_reverb
</strong></code></pre>

<mark style="color:red;">**Note:**</mark> If nothing works after run the command above, you can rather run the command below, to make supervisor start all configs:

```
sudo supervisorctl start all
```

**Done!!**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edentech.gitbook.io/glover/supervisor-setup-vps/websocket-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
