Migrate from PieSocket to Vask (Laravel). Drop-in host swap.
PieSocket and Vask both speak the Pusher protocol. A Laravel app using the pusher broadcast connection keeps its events, Echo subscriptions, and channel auth logic; only the host and credentials change.
Migration summary
At a glance
- Type
- Drop-in host swap
- Typical time
- 10-15 minutes
- Server SDK
- pusher-http-php unchanged
- Client SDK
- laravel-echo and pusher-js unchanged
- Auth changes
- verify existing /broadcasting/auth
- Rollback
- restore old PieSocket env vars
Files touched
- .env
- config/broadcasting.php
- resources/js/echo.js
Get started
Realtime made simple.
Free Tier: 500K broadcasts/mo and 100 concurrent across unlimited apps. $10/mo when you outgrow it.
Minimal cutover
Save the current PieSocket values first. Then update the env block. If your app still uses BROADCAST_DRIVER, keep that name and set it to pusher.
BROADCAST_CONNECTION=pusher
-PUSHER_APP_ID=your_piesocket_app_id
-PUSHER_APP_KEY=your_piesocket_key
-PUSHER_APP_SECRET=your_piesocket_secret
-PUSHER_HOST=ws.piesocket.com
+PUSHER_APP_ID=your_vask_key
+PUSHER_APP_KEY=your_vask_key
+PUSHER_APP_SECRET=your_vask_secret
+PUSHER_HOST=wss.vask.dev
PUSHER_PORT=443
PUSHER_SCHEME=https
-PUSHER_APP_CLUSTER=v3
+PUSHER_APP_CLUSTER=mt1
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"If your SDK asks for an app id, use the Vask app key. Vask does not issue a separate customer-facing app id.
Rollback
Put the saved PieSocket values back, redeploy or rebuild the client bundle if VITE_PUSHER_* values are embedded, and clear config cache. Rollback is only credentials and endpoint state.
Laravel package shortcut
composer require vask/laravel
php artisan vask:installThe installer writes the same Pusher-compatible env values and runs php artisan vask:doctor. Source: github.com/vask-dev/laravel · packagist.
Server publish
Confirm config/broadcasting.php reads host from env:
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'host' => env('PUSHER_HOST'),
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
],Replace any hardcoded ws.piesocket.com host with env('PUSHER_HOST').
Client subscribe
Echo should read the same Vite env values:
window.Echo = new Echo({
broadcaster: 'pusher',
key: import.meta.env.VITE_PUSHER_APP_KEY,
cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER,
wsHost: import.meta.env.VITE_PUSHER_HOST,
wsPort: import.meta.env.VITE_PUSHER_PORT,
wssPort: import.meta.env.VITE_PUSHER_PORT,
forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
enabledTransports: ['ws', 'wss'],
});Private and presence channels
Keep routes/channels.php, /broadcasting/auth, and existing private- / presence- channel names. The auth signature stays Pusher-compatible; only the secret used for signing changes.
Verify
- Deploy the env change to staging.
- Confirm the browser opens a WebSocket to
wss.vask.dev, not PieSocket. - Trigger one Broadcast event and verify the client receives it.
- Verify one private or presence subscription returns 200 from
/broadcasting/auth.
Gotchas
- Host and cluster mismatch.
PUSHER_APP_CLUSTER=v3does not route Vask traffic.PUSHER_HOST=wss.vask.devis the important value. - Mixed credentials. A Vask key with a PieSocket secret, or the reverse, usually appears as publish failures or private-channel 403s.
- Stale Vite bundle. The browser may keep connecting to PieSocket until the client bundle is rebuilt.
- Auth endpoint assumptions. Custom auth endpoints can stay, but they must sign with the Vask secret after the env swap.
Where to go next
- Read the PieSocket vs Vask comparison for architecture and pricing context.
- Check the Laravel docs for advanced setup.
- Run the fan-out calculator if cost is the migration driver.
- Which host should replace the PieSocket host?
- Use PUSHER_HOST=wss.vask.dev with port 443 and scheme https. Do not keep a PieSocket-specific host once the Vask credentials are in place.
- What if my cluster is still v3?
- Vask routes by the explicit host, not by a customer-facing cluster. Keep PUSHER_APP_CLUSTER only as an SDK compatibility placeholder such as mt1, and make sure PUSHER_HOST is wss.vask.dev.
- How do I roll back to PieSocket credentials?
- Restore the previous PieSocket app id, key, secret, host, port, scheme, and cluster values, then redeploy or rebuild anything that embeds VITE_PUSHER_* values.
- Will private and presence channels keep working?
- Yes, if your Laravel auth endpoint already works. Keep /broadcasting/auth, private- and presence- channel names, and routes/channels.php callbacks unchanged; verify one authenticated subscription after the swap.
Get going
Keep the channel code. Swap host and credentials. Verify authenticated channels before production traffic moves.
Make the switch
Swap the credentials. Keep the events.
Use Vask credentials, keep your existing Broadcast events, and point the Pusher-compatible config at wss.vask.dev.