Skip to content

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 ​

  1. Go to FlashPanel > Servers > your server > Apps and open the Not Installed tab.
  2. Find Sockudo and click Install.
  3. Choose the Version and enter the Port Sockudo listens on (default 6001). Click Install.
  4. 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 ​

  1. In the Installed tab of the Apps page, click the Config button (gear icon) on the Sockudo row.
  2. The configuration file opens. Find the [[app_manager.array.apps]] section:
toml
[[app_manager.array.apps]]
id = "..."      # App ID
key = "..."     # App Key
secret = "..."  # App Secret

The port line at the top of the file is the port Sockudo listens on.

Connect a Laravel application ​

  1. Open your site's .env file and set the following values. Replace the placeholders with the details from the configuration file and your domain:
ini
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
  1. Build your frontend again (for example npm run build) so the browser uses the new VITE_PUSHER_* values.
  • PUSHER_* is used by your Laravel backend to send events. When the site and Sockudo are on the same server, keep 127.0.0.1 and the Sockudo port.
  • VITE_PUSHER_* is used by the browser to connect. Use your domain with port 443 and https, 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:

  1. Open your site and edit its Nginx configuration.
  2. Add this block inside the server { ... } block that listens on port 443. Change 6001 if you chose another port:
nginx
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;
}
  1. Save the configuration. Your browser now connects to wss://your-domain.com/app/your-app-key.

Change the port or settings ​

  1. Click the Config button on the Sockudo row and edit the file (for example change port = 6001).
  2. Save the file.
  3. Click Restart on the Sockudo row to apply the change.
  4. Update PUSHER_PORT in your .env and the proxy_pass port 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.

  1. In the Installed tab, click Uninstall on the Soketi row and confirm.
  2. Install Sockudo as described above. If you keep the default port 6001, uninstall Soketi first because both use the same port.
  3. Update PUSHER_APP_ID, PUSHER_APP_KEY and PUSHER_APP_SECRET in your .env with 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-js reconnect 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.