Skip to main content

Websocket on cPanel?

Comments

7 comments

  • cPRex Jurassic Moderator
    Hey there! We don't provide any type of official support for Laravel, but we have an installation guide here you might find helpful:
    0
  • suto
    Hey there! We don't provide any type of official support for Laravel, but we have an installation guide here you might find helpful: Introducing laravel-websockets, an easy to use WebSocket server implemented in PHP | freek.dev i did saw one video with Daemons to open a port for it and run a 24/7 command, but what are my options?
    0
  • cPRex Jurassic Moderator
    Thanks for the additional details. The first thing I would check would be the port itself to see if the service is listening. You can do that with the following command, and this example uses port 80 for the webserver: netstat -lpn | grep 80
    You would just need to change 80 to whatever port you are expecting this to be listening on. If nothing shows up there, you'll want to ensure the service is running correctly on that port. Once that is working you'll need to make sure the port is open in the server's firewall.
    0
  • suto
    netstat -lpn | grep 80
    That command doesn't seem to work on the cPanel terminal, but the command to start the websocket does except it shows no incoming connections compared to local testing when going to the address and just gives me the same error as before (which is due the service not actually being online, tested this locally by not having the service on) php artisan websockets:serve
    0
  • cPRex Jurassic Moderator
    Ah, that command would only work as the root user. If you only have cPanel-level access to the system you might need to reach out to your host to see if they need to update anything on their end to get this working.
    0
  • suto
    Ah, so the root user needs to do something with the established port in the application? what does the root user need to do? open the said port or run php artisan websockets:serve
    command somewhere to have it run 24/7 for that application? or something else, because i can imagine if i tell them my current info they might not even know what to do.
    0
  • cPRex Jurassic Moderator
    If laravel is running on a separate port I would expect that to have to be opened by a root user, yes.
    0

Please sign in to leave a comment.