Herald applications

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. Download the Nextcloud Server source code.
  2. Extract the source code at Local Root and rename its top-level folder to share.
  3. Synchronize Local Root with Herald.
  4. Create the directory Remote Root/example.com/share/data.
  5. Run chgrp -R www-data Remote Root/example.com/share/apps Remote Root/example.com/share/config Remote Root/example.com/share/data.
  6. Run chmod -R g+w Remote Root/example.com/share/apps Remote Root/example.com/share/config Remote Root/example.com/share/data.
  7. Ensure that the file /etc/ssl/openssl.cnf exists, even if it is empty.
  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. Run mv Remote Root/example.com/share/data Remote Parent/nextcloud-data.
  2. 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
  • Forms
  • JavaScript XMPP Client
  • Mail
  • Polls
  • Talk
  • 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. Under Administration: Groupware, set a provisional email account.
  2. Under Administration: JavaScript XMPP Client, set an external XMPP server.


  1. Place the new version of Nextcloud at Local Root/share-new.
  2. Synchronize Local Root with Herald.
  3. Copy the old configuration into the new directory, but edit to use nextcloud-data-new.
  4. Run chgrp -R www-data Remote Root/example.com/share-new/apps Remote Root/example.com/share-new/config.
  5. Run chmod -R g+w Remote Root/example.com/share-new/apps Remote Root/example.com/share-new/config.
  6. Run cp -a Remote Parent/nextcloud-data Remote Parent/nextcloud-data-new.
  7. From Remote Root/example.com/share-new/, run php-cli occ upgrade.
  8. Run mv Remote Root/example.com/share Remote Root/example.com/share-old.
  9. Run mv Remote Root/example.com/share-new Remote Root/example.com/share.
  10. Run mv Remote Parent/nextcloud-data Remote Parent/nextcloud-data-old.
  11. Run mv Remote Parent/nextcloud-data-new Remote Parent/nextcloud-data.