Supervisord cheatsheet
supervisorctl
| Command | Description |
|---|---|
supervisorctl status | Status of all programs |
supervisorctl status myapp | Status of one program |
supervisorctl start myapp | Start a program |
supervisorctl stop myapp | Stop a program |
supervisorctl restart myapp | Restart a program |
supervisorctl start all | Start every program |
supervisorctl tail -f myapp | Follow stdout log |
supervisorctl tail myapp stderr | View stderr log |
supervisorctl reread | Reload config files from disk |
supervisorctl update | Apply config changes (add/remove programs) |
Daemon control
| Command | Description |
|---|---|
supervisord -c /etc/supervisor/supervisord.conf | Start daemon with config |
supervisorctl shutdown | Stop supervisord and all children |
systemctl status supervisor | Check service (when managed by systemd) |
ps aux | grep supervisord | Confirm daemon is running |
Config file locations
| Path | Description |
|---|---|
/etc/supervisor/supervisord.conf | Main config (Debian/Ubuntu) |
/etc/supervisor/conf.d/*.conf | Per-app program configs |
/var/log/supervisor/ | Default supervisord log directory |
/var/run/supervisor.sock | Default RPC unix socket |
Example program config
# /etc/supervisor/conf.d/myapp.conf
[program:myapp]
command=/opt/myapp/venv/bin/gunicorn -w 4 app:app
directory=/opt/myapp
user=deploy
autostart=true
autorestart=unexpected
stdout_logfile=/var/log/supervisor/myapp.log
stderr_logfile=/var/log/supervisor/myapp.err
environment=PATH="/opt/myapp/venv/bin",DJANGO_SETTINGS_MODULE="app.settings"
Example group config
[group:workers]
programs=celery-worker,celery-beat
# Control the group:
# supervisorctl start workers:*
Pro tips
- After editing config:
supervisorctl rereadthenupdate - Use absolute paths in
command=— supervisord has a minimal PATH autorestart=unexpectedavoids restart loops on intentional exits- For new deployments on Linux, consider a systemd unit instead
Practice scenarios
Hands-on Supervisord scenarios on live Linux VMs: supervisord