> 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!!**
