This page assumes you ran the steps on Installation.
Start the server
php artisan resonate:start
The server reads config/reverb.php. Every option below overrides the matching config value for this run only:
| Option | Purpose |
|---|---|
--host= |
The IP address the server binds to. |
--port= |
The port the server listens on. |
--path= |
A path prefix for all routes. |
--hostname= |
The hostname the server is accessible from. |
--force |
Start even when the PID file names a running server. resonate:reload uses it during a swap. |
--debug |
Print debug messages in the terminal. |
php artisan resonate:start --host=127.0.0.1 --port=8080 --debug
Check that it is up
GET /up returns the PID of the process that answered together with a health value.
The four commands
| Command | What it does |
|---|---|
resonate:install |
Adds the environment variables, publishes config/reverb.php and configures broadcasting. |
resonate:start |
Runs the server as one long-lived process. |
resonate:restart |
Hard restart through the laravel:reverb:restart cache key. Connections drop and your supervisor respawns the process. |
resonate:reload |
Zero-downtime swap. See Deployment. |
Stop the server
SIGTERM and SIGINT stop the server gracefully. The listener closes, every client gets a 1001 close frame, the PID file is removed and the process exits 0.
Runtime files
resonate:start writes two files into storage/:
| File | Contents |
|---|---|
resonate.pid |
The server PID, written once the listening sockets are bound. |
resonate.json |
The PID, the effective host, port and path the server was started with, and the supervised key. |
A second resonate:start fails while the PID file names a live process. SO_REUSEPORT would otherwise let it bind the same port and split the node into two processes with separate channel state. Pass --force to start anyway.
Next steps
- Configuration for limits, proxies and applications.
- Deployment for production reloads and the event loop.
- Examples for complete, copyable setups.