Yes these servers need a copy of your app instance to run the jobs on, but they are specifically for the workers . So to answer your question yes it needs a copy of your app running so you can run php artisan horizon running as a Daemon on the Worker server.
Breakdown of a setup of a production server
For example if I have an app I'll have 2 servers broken down like this:
- Public facing server that serves the app to my users
- Worker Server (Has workers running specific queues)
When deploying new code I'll deploy to both servers since the queue server needs to be running the same code as the public facing server.
My deploy script would look something like this: Notice that I do a horizon:purge, horizon:terminate and queue:restart
cd /home/forge/myapp.com # update your app's path here
php artisan down
git fetch
git pull origin production # update your prod branch here
composer install --no-interaction --prefer-dist --optimize-autoloader
sudo -S service php8.x-fpm reload # update your PHP version here
composer dump-autoload
php artisan migrate --force
php artisan horizon:purge
php artisan horizon:terminate
php artisan queue:restart
php artisan up
On my public facing server I have no queue workers or daemons setup in Forge. However on my Worker server I have php artisan horizon running as a Daemon for the path of my project running as the user forge running as 1 process. Next on the Worker server, I have my app code running with the same deploy script as above but I on the queue tab I have two Active Workers setup for different queue's.
Hope this helps.