Background Workers (Daemons)
Daemons are long-running background processes that run alongside your app — queue workers, scheduled task runners, WebSocket servers, or any process that needs to stay alive independently of your web container.
Each daemon runs in its own container on the same server as your app, managed by Vessl just like the app itself.
Adding a daemon
Go to your app → Daemons tab → Add Daemon.
Fill in the form:
- Name — a label for this daemon (e.g.
queue-worker,scheduler) - Command — the command to run (e.g.
php artisan queue:work,python manage.py qcluster) - Restart policy — what happens if the process exits (see below)
- Memory limit and CPU limit — optional resource caps for this daemon's container
Click Save daemon. The daemon will start on the next deploy (or when you manually restart it).
Restart policies
| Policy | Behavior |
|---|---|
unless-stopped | Restarts automatically unless you explicitly stop it — good for queue workers |
always | Always restarts, even after a clean exit |
on-failure | Only restarts if the process exits with a non-zero code |
no | Never restarts automatically |
For most queue workers and schedulers, unless-stopped is the right choice.
Managing daemons
From the Daemons tab you can:
- Enable / disable — toggle a daemon on or off. The change takes effect on the next deploy (or next restart).
- Restart — immediately restart a daemon's container without redeploying the app.
- Delete — remove the daemon. Its container will be torn down on the next deploy.
Daemons run the same Docker image as your app — they're just started with a different command. If you need the queue worker to use the same code as your web process, no extra build step is needed.
Plan limits
| Plan | Daemons per app |
|---|---|
| Hobby | Not available |
| Starter | Up to 3 per app |
| Pro | Unlimited |
Common examples
Laravel queue worker:
php artisan queue:work --sleep=3 --tries=3
Laravel scheduler (every minute):
php artisan schedule:work
Django Q cluster:
python manage.py qcluster
Node.js BullMQ worker:
node dist/workers/queue.js