Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've had a good hunt and can't find a good example of an upstart script for Unicorn.

From what I've read however I think that upstart and unicorn might step on each others toes if I just try to set up a basic upstart config file given that unicorn manages its own workers etc...

Any tips or shortcuts before I dig in myself?

share|improve this question
I would suggest looking at the init.d scripts that have been written for Unicorn. They should provide you with a good starting point. – Matt F Nov 6 '11 at 18:15

You may use this config, but my personal choice is to use BluePill instead. It will give you more flexibility

description "Starts unicorn as the user 'rails'"
start on filesystem
chdir /apps/rails/sample_app
exec sudo -u deployer -i 'rvm ree; unicorn_rails -c /apps/rails/sample_app/config/unicorn.rb -E production' 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.