Installation and Administration

Configuring the Nuxeo Platform as a Daemon with Systemd

Updated: July 17, 2023

Here is a systemd script which starts Nuxeo as a daemon or like any other service after Elasticsearch and PostgreSQL.

/etc/systemd/system/nuxeo.service

[Unit]
Description=Starts and stops a single Nuxeo instance
After=syslog.target network.target postgresql.service elasticsearch.service

[Service]
Type=forking
User=nuxeo
Group=nuxeo
ExecStart=/opt/nuxeo/bin/nuxeoctl --quiet startbg
ExecReload=/opt/nuxeo/bin/nuxeoctl --quiet restartbg
ExecStop=/opt/nuxeo/bin/nuxeoctl --quiet stop
Restart=on-abnormal
RestartSec=15
# See MAX_OPEN_FILES in sysconfig
LimitNOFILE=65535
TimeoutStopSec=60
Environment=NUXEO_CONF=/etc/nuxeo/nuxeo.conf

[Install]
WantedBy=multi-user.target

  1. Copy the systemd script to /etc/systemd/system/nuxeo.service, replacing paths to match your installation.
  2. Enable the autostart creating the links in the rcX.d directories running the command (as root):

    $ systemctl daemon-reload
    $ systemctl enable nuxeo
    
    
  3. Restart the machine and verify that the Nuxeo Platform is started automatically looking at the log file.

If you want to remove the automatic startup use the command (as root):

$ systemctl disable nuxeo

You can manage the service with the following command:

systemctl [start|stop|reload] nuxeo

 

Credits to undefined who contributed it for CentOs or SUSE.

Other Linux-Related Documentation