Alfresco startup script for Ubuntu/Debian

If you have used the script that comes with Alfresco, you have most likely already made your own. I created one for Ubuntu, but it should work with other variants.


  • NEW! Added support for JPDA debugging and JMX console
  • NEW! Also support for status (/etc/init.d/alfresco status)
  • NEW! Precise doesn’t come with ‘bc’. (Really Canonical?) I removed that dependency.
  • NEW! Added support for Alfresco 4.X!
  • Can configure script to run Alfresco as root or a non-privileged user.
  • Firewall rules will be setup at system boot if configured to run as a non-privileged user.
  • Will attempt to shutdown all instances of Alfresco cleanly, will kill them after a set time if they are hung up with a default of 30 seconds.
  • Cleans up rogue processes such as OpenOffice
  • Able to change the umask that Alfresco creates files as. (Handy for multiuser environments.)


  • Only tested on Ubuntu Server 10.04 and 12.04 (Lucid and Precise LTS releases)
  • The script directly calls Java, bypassing and even It was the only way I could seem to get everything working smoothly including umasks. So the biggest downside of this, is that future versions of Alfresco may have different Tomcat start up parameters.


  1. Copy and paste the script into the file: /etc/init.d/alfresco
  2. Edit the “### Configurable variables” section in the script to suit your environment
  3. chmod +x /etc/init.d/alfresco
  4. update-rc.d alfresco start 99 2 3 4 5 . stop 99 0 1 6 .

Feel free to email myself any bugs, feedback ,or requests. My email address is the user name you see here at the top of the blog

The Script

Here is a link with proper indentation and easier copying:

This entry was posted in Alfresco, ECM and tagged , by Bookmark the permalink.


Alfresco Certified Engineer

Trevor is a Systems Architect that has a broad and extensive understanding of many software and hardware platforms. Specializing in designing highly available environments and applications. Over the years he has gained experience with dozens programming and scripting languages.

Trevor likes contributing to the open source ecosystem in his spare time when he is not chasing after the wind with one of his windsurfers.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>