Sockudo
Overview
Sockudo is a fast, self-hosted WebSocket server compatible with the Pusher protocol. Use it to add realtime features (notifications, live updates, chat) to your applications without paying for a hosted service. Laravel Broadcasting, Laravel Echo and pusher-js work with Sockudo without any code changes: you only point them to your server.
Sockudo replaces Soketi, which is no longer maintained.
Install Sockudo
- Go to FlashPanel > Servers > your server > Apps and open the Not Installed tab.
- Find Sockudo and click Install.
- Choose the Version and enter the Port Sockudo listens on (default
6001). Click Install. - Follow the progress on the Events page. Installation usually takes less than a minute.
When installation finishes, FlashPanel creates an app with a random App ID, Key and Secret for you. Sockudo starts automatically and starts again when the server reboots.
Get the connection details
- In the Installed tab of the Apps page, click the Config button (gear icon) on the Sockudo row.
- The configuration file opens. Find the
[[app_manager.array.apps]]section:
[[app_manager.array.apps]]
id = "..." # App ID
key = "..." # App Key
secret = "..." # App SecretThe port line at the top of the file is the port Sockudo listens on.
Connect a Laravel application
- Open your site's
.envfile and set the following values. Replace the placeholders with the details from the configuration file and your domain:
BROADCAST_CONNECTION=pusher
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-app-key
PUSHER_APP_SECRET=your-app-secret
PUSHER_HOST=127.0.0.1
PUSHER_PORT=6001
PUSHER_SCHEME=http
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST=your-domain.com
VITE_PUSHER_PORT=443
VITE_PUSHER_SCHEME=https- Build your frontend again (for example
npm run build) so the browser uses the newVITE_PUSHER_*values.
PUSHER_*is used by your Laravel backend to send events. When the site and Sockudo are on the same server, keep127.0.0.1and the Sockudo port.VITE_PUSHER_*is used by the browser to connect. Use your domain with port443andhttps, then set up the Nginx proxy below.
Connect through your domain with SSL
Browsers on an HTTPS site can only open secure WebSocket connections (wss://). Proxy Sockudo through your site's Nginx so it uses the same domain and SSL certificate:
- Open your site and edit its Nginx configuration.
- Add this block inside the
server { ... }block that listens on port 443. Change6001if you chose another port:
location /app {
proxy_pass http://127.0.0.1:6001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 60;
}- Save the configuration. Your browser now connects to
wss://your-domain.com/app/your-app-key.
Change the port or settings
- Click the Config button on the Sockudo row and edit the file (for example change
port = 6001). - Save the file.
- Click Restart on the Sockudo row to apply the change.
- Update
PUSHER_PORTin your.envand theproxy_passport in Nginx to match.
View logs
Click the Log button on the Sockudo row to view the server logs. You can also start, stop or restart Sockudo from the Systemd Service page.
Migrate from Soketi
Soketi no longer appears in the Not Installed tab. Servers that already have it keep running and can still uninstall it.
- In the Installed tab, click Uninstall on the Soketi row and confirm.
- Install Sockudo as described above. If you keep the default port
6001, uninstall Soketi first because both use the same port. - Update
PUSHER_APP_ID,PUSHER_APP_KEYandPUSHER_APP_SECRETin your.envwith the new values from the Sockudo configuration file, then build your frontend again.
Notes & Warnings
- Note: Reinstalling or updating Sockudo keeps the existing configuration file, so your App ID, Key, Secret and port do not change. The Port you enter when reinstalling is ignored; change it in the configuration file instead.
- Note: Restarting Sockudo disconnects all clients for a few seconds. Laravel Echo and
pusher-jsreconnect automatically, but events sent during that time are lost. - Warning: Keep the Secret private. Anyone who has it can send events to your users. Never put it in
VITE_*variables or frontend code. - Warning: Do not open the Sockudo port in the Firewall Rules unless clients must connect to it directly. Connecting through your domain with Nginx is safer and supports SSL.