Deploying Horizon To Laravel Forge

Taylor Otwell
2 min readJul 31, 2017

--

Deploying Horizon to Laravel Forge is a breeze. After installing your Laravel project via the Forge dashboard, you need to add a “Daemon” to run the php artisan horizon command. This will make sure the horizon command is always run and will restart it if it fails unexpectedly. Here’s what your daemon configuration should look like:

Of course, you should replace “yoursite.com” with the relevant directory for your site.

After you have added the daemon, you only need to add the php artisan horizon:terminate command to the end of your deployment script. This will make sure the old Horizon workers are gracefully terminated on each deployment, and fresh Horizon workers will be started thanks to our daemon configuration:

That’s it. Horizon is now running on Forge!

If you don’t have a Forge account, now is a great time to sign up. Forge allows you to painlessly create and manage PHP 7.1 servers which include MySQL, Redis, Memcached, and everything else you need to run robust, modern Laravel applications.

--

--