Open Source


System Integration


Installing web applications on Herald

This document describes how to install a number of web applications on Herald. In each case, the instructions describe setting up the application within a local directory for later synchronization with Herald. This adds a bit of complexity but leaves the web applications managed in the same way as static files.

We call the local directory Local Root/ and the remote directory on Herald Remote Root/. Under the conditions of the default install, Remote Root/ is /mnt/sda1/var/www/example.com on Herald. We also reference Remote Parent/ which is /mnt/sda1/var/www/ by default.

Nextcloud server


  1. 1.

    Download the Nextcloud Server source code.

  2. 2.

    Extract the source code at Local Root/ and rename its top-level folder to share.

  3. 3.

    Synchronize Local Root/ with Herald.

  4. 4.

    Create the directory Remote Root/example.com/share/data.

  5. 5.

    Run chgrp www-data Remote Root/example.com/share/apps Remote Root/example.com/share/config Remote Root/example.com/share/data.

  6. 6.

    Run chmod 770 Remote Root/example.com/share/apps Remote Root/example.com/share/config Remote Root/example.com/share/data.

  7. 7.

    Ensure that the file /etc/ssl/openssl.cnf exists, even if it is empty.

  8. 8.

    Use a browser to visit https://www.example.com/share/.

Once functioning, it is desirable to move Nextcloud Server’s data directory to Remote Parent/nextcloud-data.

  1. 9.

    Run mv Remote Root/example.com/share/data Remote Parent/nextcloud-data.

  2. 10.

    Update Remote Root/example.com/share/config/config.php to contain the following definition of datadirectory (replace Remote Parent/):

    datadirectory => Remote Parent/nextcloud-data/’,

You might want to install a number of NextCloud applications, namely:

  • Calendar

  • Contacts

  • Deck

  • JavaScript XMPP Client

  • Mail

  • Polls

  • Workflow external scripts

Finally copy the apps and config directories back to Local Root/share. You should do this again each time you install a new Nextcloud application.


Using the Nextcloud Settings interface, configure Nextcloud in the following way:

  1. 1.

    Under Administration: Groupware, set a provisional email account.

  2. 2.

    Under Administration: JavaScript XMPP Client, set an external XMPP server.


  1. 1.

    Place the new version of Nextcloud at Local Root/share-new.

  2. 2.

    Synchronize Local Root/ with Herald.

  3. 3.

    Run chgrp www-data Remote Root/example.com/share-new/apps Remote Root/example.com/share-new/config.

  4. 4.

    Run chmod 770 Remote Root/example.com/share-new/apps Remote Root/example.com/share-new/config.

  5. 5.

    Run cp -a Remote Parent/nextcloud-data Remote Parent/nextcloud-data-new.

  6. 6.

    From Remote Root/example.com/share-new/, run php-cli occ upgrade.

  7. 7.

    Run mv Remote Root/example.com/share Remote Root/example.com/share-old.

  8. 8.

    Run mv Remote Root/example.com/share-new Remote Root/example.com/share.

  9. 9.

    Run mv Remote Parent/nextcloud-data Remote Parent/nextcloud-data-old.

  10. 10.

    Run mv Remote Parent/nextcloud-data-new Remote Parent/nextcloud-data.