Skip to content

Instantly share code, notes, and snippets.

@thomasjsn
Last active August 20, 2025 15:41
Show Gist options
  • Save thomasjsn/bc7d3a3b81d0118f6e89eef7d43f66f3 to your computer and use it in GitHub Desktop.
Save thomasjsn/bc7d3a3b81d0118f6e89eef7d43f66f3 to your computer and use it in GitHub Desktop.
Laravel queue worker using systemd.
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue.service
#
# run this command to enable service:
# systemctl enable queue.service
[Unit]
Description=Laravel queue worker
[Service]
User=www-data
Group=www-data
Restart=on-failure
ExecStart=/usr/bin/php /path/to/laravel/artisan queue:work --daemon --env=production
[Install]
WantedBy=multi-user.target
@mohroba
Copy link

mohroba commented Aug 20, 2025

@glaszig @thomasjsn Sorry About the mess.
I created a simple repo for my script, I hope it helps others:
Laravel Services Setup (Queue Workers, Reverb, Scheduler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment