Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mhalahmdi's avatar

PM2 start not working with socketi in AWS

I am trying to deploy the soketi in aws elastic Beanstalk to run in the background with pm2 my bash file contains as

#!/bin/bash

cd /var/app/current/

curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash -

sudo yum install -y nodejs

sudo npm install -g npm

sudo npm install -g @soketi/soketi

 sudo npm install -g pm2

 pm2 start soketi -- start --config=/var/app/current/my_soketi/config.json

The script work and install all the requirements without any error by when writing the command

   pm2 status

it is not given that the soketi is running on the list

when I run the command manually in EC2 it's working

    pm2 start soketi -- start --config=/var/app/current/my_soketi/config.json
0 likes
1 reply
mhalahmdi's avatar
mhalahmdi
OP
Best Answer
Level 1

I found the solution, I should write

      sudo pm2 status

Please or to participate in this conversation.