Installation and setup | laravel-webhook-server | Spatie       

 SPATIE  

==

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-webhook-server](https://spatie.be/docs/laravel-webhook-server/v4)  Installation and setup

 Version   v4      

 Other versions for crawler [v4](https://spatie.be/docs/laravel-webhook-server/v4) 

  Installation and setup    
- [ Introduction ](https://spatie.be/docs/laravel-webhook-server/v4/introduction)
- [ Installation and setup ](https://spatie.be/docs/laravel-webhook-server/v4/installation-and-setup)
- [ Sending webhooks ](https://spatie.be/docs/laravel-webhook-server/v4/sending-webhooks)
- [ Signing requests ](https://spatie.be/docs/laravel-webhook-server/v4/signing-requests)
- [ Retrying failed webhooks ](https://spatie.be/docs/laravel-webhook-server/v4/retrying-failed-webhooks)
- [ Transport options ](https://spatie.be/docs/laravel-webhook-server/v4/transport-options)
- [ Events ](https://spatie.be/docs/laravel-webhook-server/v4/events)
- [ Testing webhooks ](https://spatie.be/docs/laravel-webhook-server/v4/testing-webhooks)
- [ Upgrading from v3 ](https://spatie.be/docs/laravel-webhook-server/v4/upgrading)

 Installation and setup
======================

###  On this page 

1. [ Configure a queue worker ](#content-configure-a-queue-worker)

This version requires PHP 8.4 and Laravel 13. Use [v3](https://github.com/spatie/laravel-webhook-server/tree/3.11.0) if your application uses an older version. Existing users should read [the upgrading guide](/docs/laravel-webhook-server/v4/upgrading) before deploying v4.

Install the package using Composer:

```
composer require spatie/laravel-webhook-server:^4.0
```

The service provider is registered automatically. Publish the configuration with:

```
php artisan vendor:publish --provider="Spatie\WebhookServer\WebhookServerServiceProvider"
```

The published `config/webhook-server.php` controls the queue, HTTP defaults, signing, delivery ID header, retry policy, TLS verification and Horizon tags. See [the complete configuration file](https://github.com/spatie/laravel-webhook-server/blob/main/config/webhook-server.php).

Configure a queue worker
--------------------------------------------------------------------------------------------------------------------------------

Use a real queue connection, such as `database` or `redis`, in production. Set up the connection according to [Laravel's queue documentation](https://laravel.com/docs/13.x/queues) and run a worker:

```
php artisan queue:work
```

The `sync` connection does not wait or loop through delayed retries. The package schedules retries using Laravel's delayed queue jobs.

Choose a queue and connection globally using the `queue` and `connection` configuration keys, or override them per call:

```
WebhookCall::create()
    ->url('https://other-app.com/webhooks')
    ->payload(['event' => 'order.created'])
    ->useSecret('your-shared-secret')
    ->onConnection('redis')
    ->onQueue('webhooks')
    ->dispatch();
```

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
