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 am playing with CouchDB and whenever I do, I first have to issue

sudo couchdb -i -u couchdb couchdb -b

This starts CouchDB as the user couchdb, group couchdb. I then also have to enter my password again (I am admin but still need to, when doing a sudo) and all is fine.

How do I run CouchDB or anything similar at startup? Anytime anyone logs in, without any user interaction in OS X?

share|improve this question

You want to check out writing a launchd plist for CouchDB.

Specifically, it has fields for UserName and GroupName which provide the functionality you're after.

share|improve this answer

Login scripts run with root permissions when anyone logs in. It would remove the need to use sudo.

share|improve this answer
Use launchd instead. It's hairy, but it works better for managing the startup of system wide programs like DB's or servers – tegbains Jan 18 '10 at 3:45

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.