boinc as a system service on mac os x

here’s how to setup boinc to start up automatically on mac os x, without a user being logged in — this takes advantage of the /library/statupitems/ folder. you’ll have to be comfortable with using the terminal, and will also need to have know the system administrator/root user’s password.

  1. start up a terminal: use your finder and go to applications > utilities > terminal
  2. create the folder that will contain the boinc command line application. i like to install it directly in the root folder, so doing ‘mkdir /boinc’ should be sufficient. you may have to become the super user at this point to create the folder. do this by typing ’sudo mkdir /boinc’ and then enter the sys admin’s password. (i’ll preface all the remaining commands with sudo so that there is no confusion).
  3. get a copy of the boinc command line client and save it in /boinc. you’ll be using the file “boinc” to start things up at boot time.
  4. make sure the “boinc” program is executable. it should have permissions “-rwxr-xr-x” so that it executes correctly. run the command “sudo chmod +x boinc” if you are having trouble.
  5. attach any projects that you are involved with. you want to do this first so that when the app starts up at boot time, it knows what work to do. something like “sudo ./boinc -attach_project [url] [key]” where [url] is the project’s url and [key] is your account key. it’ll do the benchmarks. if you need to add another project, stop boinc, attach the other project, and continue.
  6. now the trick: create the actual startup item. change to the directory /library/startupitems: “cd /Library/StartupItems/”
  7. create a folder called boinc, and change to it: “sudo mkdir boinc” followed by “sudo cd boinc”. you should now be in the folder “/Library/StartupItems/boinc”.
  8. create a text file called “boinc” — the same as the folder you just created. this is where you’ll give the commands to start boinc up at boot time. here’s the file i’ve used successfully. make sure that this file can execute as well: change mode if necesary, “sudo chmod +x boinc” as before.
  9. you’ll also need to create another text file in “/Library/StartupItems/boinc/” called “StartupParameters.plist” with these contents
  10. that’s it! if you were able to start up boinc earlier, and you create the files listed, you should be all done. reboot your system, and check the “/boinc/boinc.log” file for boinc’s log. any errors will show up there.

oh, and if you’ve stumbled on this by accident, do checkout the boinc distributed computing projects, especially climateprediction.net — put your computers to good use… it’s fun!

(this post was originally published on a previous server with notes that you had to be root user to accomplish the task. i have since updated the post, taking in to account the comments that were made. thanks to those that did!)

Other Entries

Services I use and recommend…