Automatic Plone (re)starts


Tips on how to automatically start Plone on server boot.

This manual assumes, that you are installed Plone via the Unified-Installer as root install if you did a different install, please addjust the examples below for your own needs, the user as which you are running Plone maybe different for example.

plonectl script

The general-purpose plonectl control command for Plone installations is:


yourbuildoutfolder is the topmost folder of your Plone installation. It will always contain a buildout.cfg file and a bin directory.

The plonectl command is a convenience script that controls standalone or cluster configurations. In a standalone installation, this will restart the instance part. In a ZEO cluster install it will restart the zeoserver and client parts.

If you have installed Plone in production mode, the Plone server components are meant to be run as a special user, usually plone_daemon. (In older versions, this was typically plone.) In this case, the start, stop and restart commands are:

# start
sudo -u plone_daemon bin/plonectl start
# stop
sudo -u plone_daemon bin/plonectl stop
# restart
sudo -u plone_daemon bin/plonectl restart

Starting on boot

It is best practice to start Plone service if the server is rebooted. This way your site will automatically recover from power loss etc.

On a Linux or BSD system, you have two major alternatives to arrange automatic starting for a production install:

  1. A process-control system, like supervisor.
  1. Through init.d (BSD rc.d) scripts.

Using supervisor

supervisor is a general-purpose process-control system that is well-known and highly recommended in the Plone community.

Process-control systems generally run their controlled programs as subprocesses. This means that the controlled program must not detach itself from the console (daemonize).

Zope/Plone's "start" command does not work for this purpose. Instead use console. Do not use fg which turns on debug switches that will dramatically slow your site.

Supervisor is well-documented, easy to set up, and included as an instalable package with popular Linux and BSD distributions.

Debian LSBInitScripts

Short documentation about how to make an Init Script LSB

This example will start a plone site on boot:

# Provides:
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      my plone site
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start plone at boot time
# Description:       Start my plone site at boot time

su - plone_daemon -c "/usr/local/Plone/zeocluster/bin/plonectl start"

Save this script as in /etc/init.d and make it executable.

add the script to dependency-based booting:


Where is an executable init script placed in /etc/init.d, insserv will produce no output if everything went OK. Examine the error code in $? if you want to be sure.

This another example (/etc/init.d/plone):


# Provides:          plone
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Should-Start:      $remote_fs
# Should-Stop:       $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start plone instances
# Description:       Start the instances located at /srv/Plone/zeocluster/bin/plonectl


[ -f /usr/local/Plone/zeocluster/bin/plonectl ] || exit 0

NAME="plone "
DESC="daemon zeoserver & client"

. /lib/lsb/init-functions

case "$1" in
        log_daemon_msg "Starting $DESC" "$NAME"
        if start-stop-daemon --quiet --oknodo --chuid plone:plone \
                             --exec ${DAEMON} --start start
            log_end_msg 0
            log_end_msg 1

        log_daemon_msg "Stopping $DESC" "$NAME"
        if start-stop-daemon --quiet --oknodo --chuid plone:plone \
                             --exec ${DAEMON} --start stop
            log_end_msg 0
            log_end_msg 1

        log_daemon_msg "Restarting $DESC" "$NAME"
        if start-stop-daemon --quiet --oknodo --chuid plone:plone \
                             --exec ${DAEMON} --start restart
            log_end_msg 0
            log_end_msg 1

        start-stop-daemon --chuid plone:plone \
                            --exec ${DAEMON} --start status

        echo "Plone doesn't support force-reload, use restart instead."

        echo "Usage: /etc/init.d/plone {start|stop|status|restart}"
        exit 1

exit 0

Make sure to read:


Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running. It was originally developed for the Ubuntu distribution, but is intended to be suitable for deployment in all Linux distributions as a replacement for the venerable System-V init.

Example of a plone.conf file in /etc/init/ -> /etc/init/plone.conf:

# Plone - Web-Content Management System
# Based on Python and ZOPE

description "start plone"
author "Josh Sehn based on previous work by Christoph Glaubitz"
version "0.3"

console none

start on (local-filesystems and net-device-up and runlevel [2345])
stop on runlevel [!2345]

exec sudo -u plone_daemon /usr/local/Plone/zeocluster/bin/plonectl start

Make sure to read:

Also check the original source of this sample file:

The above sample has not been extensively tested and is intended for use with in a zeocluster configuration. To use the above sample for a normal (non-root) user installation, replace the last line with:

exec /home/$USERID/Plone/plonectl start


Create services file plone.service in /etc/systemd/system:

Description=Plone content management system

ExecStart=/usr/local/Plone/zeocluster/bin/plonectl start
ExecStop=/usr/local/Plone/zeocluster/bin/plonectl stop
ExecReload=/usr/local/Plone/zeocluster/bin/plonectl restart


Make systemd take notice of it:

systemctl daemon-reload

Activate a service immediately:

systemctl start plone.service

Check status of service:

systemctl status plone.service

Enable a service to be started on bootup:

systemctl enable plone.service

More detailed log information:

systemd-journalctl -a

Make sure to read:


These instructions apply for Debian-based Linuxes.

Example crontab of yourploneuser:

@reboot /usr/local/Plone/zeocluster/bin/plonectl start

rc.local script

For Debian-based Linuxes, add the following line to the /etc/rc.local script:

/usr/local/Plone/zeocluster/bin/plonectl restart