Supervisord Setup on Ubuntu 16.04

For applications that need to run forever, supervisord is awesome. It can monitor processes and automatically restart them if necessary. In addition, it can also provide log rotating and so much more. There's more to it, of course. Google is your friend.

Anyways, start by grabbing easy_install which will be used to get supervisord (credits to SaltyCrane Blog for the source:

$ sudo apt-get install python-pip python-dev build-essential 
$ sudo pip install --upgrade pip 
$ sudo pip install --upgrade virtualenv

Now, get supervisord (for more detailed docs on installation, checkout the source here):

easy_install supervisor  

Check your installation, the following command should output a bunch of text:

$ echo_supervisord_conf

Create a configuration file:

echo_supervisord_conf > /etc/supervisord.conf  

Add this to the end:


We are effectively creating a program which supervisord will manage.

Start supervisord (for official documentation, see here:

supervisord -c /etc/supervisord.conf  

supervisorctl allows you to manipulate processes managed by supervisord. Check the current processes:

$ supervisorctl status all

Stop or start all processes (substitute the content within the [] with the following options):

$ supervisorctl [stop|start] [<program name>|all]


Notes and Extras

  • supervisord is a process and thus must be managed by some kind of init.d bootup script like Upstart. Google is your friend.

Here's a slightly more sophisticated program block:


That's the program definition for my side project, You So Salty.

Here's my program definition for a ghost blog:

command=node /var/www/ghost/index.js  
user = ghost  
stdout_logfile = /var/log/supervisor/ghost.log  
stderr_logfile = /var/log/supervisor/ghost_err.log  
environment = NODE_ENV="production"