The initial installation of Nextcloud doesn't do that much by itself - at the very least you need to explicitly enable the default apps you want to use, and others are available as automatic downloads from the app store. For this instance the focus is going to be on the shared file space, and also testing some other collaboration app in terms of how best to use them rather than a simple do they work.

During the initial setup you're invited to enable / install a standard set of apps, which I declined as we don't want a dedicated email or video conference capability - everyone has their own email accounts already and meet up every week for anything that needs to be discussed face to face.

The initial request was for shared document storage, so that's the focus of this. Some other apps are enabled so they can have a play and see what is genuinely useful.

Contents:

 

User Concept

The leadership of a Beaver Scout Colony is made up entirely of volunteers, and while many have been involved since they were Cubs / Brownies themselves there can be a turnover of leaders as people change their real-life job, or their own Beavers move on to Cubs and Scounts etc. We really don't want anything to be owned or controlled by a single person - this is all about sharing. And if this turns out to be useful then it's quite likely it'll be extended to Cubs and maybe other sections too, so we also need to keep things flexible enough to cope with expansion.

Within Nextcloud most content is owned by an individual user though, so this presents a bit of a problem. Especially as I also want to have each leader using their own account for login.

The solution is to have a Content Admin account that will "own" shared resources, but is not used to create items of that resource. We'll have to take people on trust on using this, although of course all actions are visible in logs should somebody need more help to understand the concept.

User Concept Diagram

  1. At the top level will be the Nextcloud Admin User. This should rarely be used after initial setup though.
  2. The next level of user will be a dedicated Content Owner that will only be used to:
    1. Create their Content Group
    2. Create other shared resources
    3. Grant rights to the shared resources to their Content Group
    4. Add users to their Content Group
  3. Each leader will have their own personal User account

Each leader will then have rights to all content through group membership so this should be really simple to manage. As new leaders join, just add them to the group and they get access to all the content too.

The credentials for the Admin User and Content Owners should be known to at least two people so we don't end up stuck if somebody is away and something interesting happens.

With only four leaders (at least for now) we don't need anything more complicated. One enhancement to this could be a Content Admin Group that will have greater admin rights where applications support it. The key thing is to avoid giving permissions directly to individual users - I want this to manage itself as much as possible since we've all got day jobs and family commitments too. But we also have to be realistic and accept that some people are, to put it nicely, likely to cause problems if given too much ability to break things.

If any of the other sections want to join in all I need to do is create another Content Owner user and Content group  for them.

Creating Content Users & Groups

Creating Groups and Users is done through the Settings > Users menu as the Admin (or a member of the Admin group). Nextcloud will send a welcome email to newly added users so make sure you have completed the admin email setup before adding new users.

Click on Add Group to create the Content Group, which I simply called Beavers.

Add Group menu

If you're prompted to authenticate again then give your password. There's no other info needed for a group.

To create the Content Owner click on New User and add details as shown.

Create Content Owner

I suggest a non-obvious user name, set the Display Name to something like Beaver Content and use a suitably complex password. Set user as Admin for the Content group, for example the Beavers group created above and optionally make them a member of the group too. When ready click the Add a new user button at the bottom.

You can then log in as the content owner - and if you use a private window you can stay logged in as the admin account too. If you don't want to hide the profile for the Content Owner add a suitable profile pic and a comment in the About box that it's not a real user and only for creating shared resources. It's also worth adding a suitable entry to the Role and Headline fields too. You may want to hide the email address under profile visibility.

It's a similar process to add all the other user too. Make sure they're added to the group, and if appropriate make them admins of the Content group too.

 

Evaluation Apps

Based on the original request the apps to enable the use as shared file space were activated as soon as the test instance was ready. Deck and shared calendar and contacts were then added during a first walk-through with the "customer lead".

Group Folders

Even though I created a specific user to own all shared content so that we don't end up with documents owned by any single person and could have use that crate a share a folder,  Group Folders lets an administrator share a folder to all members of a Group - not individual users - and give that group additional write, share and delete permissions and a usage quota, independently of any users.

Installation is from Settings > Apps and Group Folders can be found under the App Bundles : Education Edition, Featured Apps or Files sections. Just click the Download & Install button.

Configuration

Go to Settings > Administration Settings > Administration : Group Folders

Define group folder

To create a new group folder, type the name into the Folder name box and click create. The new group folder will initially have no quota or groups assigned. Put the mouse pointer on the row for your new folder and it'll be highlighted and then you can edit the settings. Click on the pencil icon next to the Folder Name to rename it, or click the wastebin icon on the right to delete the folder completely.

Files will be saved into a the __groupfolders folder of your Nextcloud Data directory. The top-level appears to be based on an internal ID for each group folder, after that files and folder names appear as shown in Nextcloud for each folder.

Group Permissions

To allow access to a Group Folder, click on the pencil icon that appears next to the groups entry (default: none) for the folder then select which groups from the pop-up list should have access. All selected groups will always have read access, you can also grant addition permissions on a group-by-group basis:

Group folder permissions

  • Write: Group members can create and edit files in the folder
  • Share: Group members can share links to files in the folder
  • Delete: Group members can delete files in the folder
  • X : Remove this group from the folder.

Advanced Permissions

If you enable the advanced permissions on a group folder, you can then select which users and groups will be able to specify per-file and per-folder permissions to allow or deny read, write, create, delete and share with permissions inherited from parent folders.

Full documentation is on https://github.com/nextcloud/groupfolders

WebDAV Server

This is a build-in feature rather than an app. It allows easy access documents and folders from WebDAV clients and can be mapped as a shared drive in Windows, a mount in Linux and I guess something similar on a Mac. And together with the Group Folders this might be more than enough to meet their needs for a shared document space.

Although you don't need to install anything on Nextcloud, you may need to install a client on your device / PC. Under Settings > Personal Settings > Personal : Mobile and Desktop are links to file sync clients for Linux, Android, Windows and Mac along with a link to the Nextcloud Help documention for configuring WebDAV on various desktops too.

On the Files app click on Files Settings in the bottom left corner of the screen to get your personal WebDAV URL

Deck

This is once of the best kept secrets of Nextcloud. It's an implementation of a job card (or kanban board if you want to sound like a management consultant) and can be a very powerful technique for tracking progress on tasks.  I'm using this in the test system to keep track of technical configuration tasks and any issues through a Technical board which is open to all, and I think it's also going to be very useful as a planning tool for events but there' s a bit of a learning curve associated with it.

Deck example

An example scenario is each possible activity is put on a card on an Ideas List. Periodically the leaders go though the ideas and create lists for the current and next three or four periods (terms or calendar quarters perhaps?) and move the card to which term seems most appropriate. Tags could be used to show any milestones and the date for actions due. Any related documents can be linked to the card from the Group Files as well. How to make this work nicely with a related calendar entry still needs thinking about - up to Nextcloud 24 the Project function would have been ideal but that's now been removed.

Installation is from Settings > Apps and Deck can be found under the App Bundles : Groupware or Featured Apps sections. Just click the Download & Install button.

Configuration

To create a board (in may case logged in as the Content Owner user) go to the Deck app and click on Add Board in the left panel. To share the board with others, click on the ... icon next to the board name and selecting Board Details. This will open the details pane on the right of the screen. Select the details tab click on the box labelled Share board with a user, group or circle ...  and pick the target group which in this case is the Beavers content group.

Tick the box for Can Edit, and the ... next to it opens up additional permissions and I enabled the Can manage permission to allow all the Leaders to manage the board. This may be restricted for Live use to an admins group.

Sharing a Deck board to the group

On a newly created board the main screen will show a prompt to create a first list. Lists can also be created by clicking on the + in the top right corner of the screen.

Once you have a list, click on the + at the top of the list to create a card. Cards can then be updated, moved to another list, archived or deleted as things progress.

Hopefully my Technical board will help illustrate how it can be used. I added an Ideas list and a First Idea card just so there's some content to show and hopefully they'll have a play with it.

Shared Calendar

While Deck is a useful planning tool, having an official planning calendar could still be useful so that dates for activities can be pencilled in. This is going to require a little bit of thinking about workflow to make the best use of this. There is also a calendar facility in OSM which should probably be the official list given to parents - again this needs to be considered in the workflow so that finalised activities are updated onto this list.

Another potential use is for noting county/district events, or even significant dates for local schools that might impact on attendance. I guess it's possible we might have a couple of different calendars. Categories could also be useful here although need to find a way to edit the list so it makes more sense in this context.

While the server part of Calendar is included by default, you need to install the user app. Go to Settings > Apps and Calendar can be found under the App Bundles : Hub and Groupware bundles, Featured Apps, Office & Text and Organization sections. Just click the Download & Install button.

Configuration

As the Content Owner go to the Calendar app and click the + New Calendar in the left panel and you get a choice of New Calendar, New Calendar with Task List or New Subscription from link.  I chose the New Calendar since I'm expecting Deck to be used for managing shared tasks. Type a suitably descriptive name into the box, such as Beaver Calendar, and press enter to create it.

Create shared calendar

To share calendar to the group, put the mouse pointer over the calendar name and click on the pencil icon that appears. In the Edit Calendar box that appears select the content group - you need to type any letter of the group name for it to display the group. You can then tick the box if members of the group should be able to edit the calendar.

With the initial configuration where HTTPS was terminated on the proxy I was getting warnings about redirects for the CalDAV URLs under Settings > Administration Settings > Administration : Overview, but since switching to HTTPS between the HAproxy and Nextcloud to resolve issues with Nextcloud Office this has gone away.

On my original Nextcloud 24 system there was a Project feature that could link related items together and that could have worked quite nicely here to link an activity entry on the calendar to a related card in Deck. For some reason this has been removed and its replacement has yet to appear, which is a pity.

Shared Contacts

The idea is to have a shared contact list for suppliers and other partners, not for Beavers or their parents details since that information is already maintained in OSM and we only want to have one source of the truth.

Just like the Calendar app, the server part of Contacts is already included in Nextcloud but we need to enable the user app. Go to Settings > Apps and Calendar can be found under the App Bundles : Hub and Groupware bundles, Featured Apps, Office & Text and Organization sections. Just click the Download & Install button.

Configuration

As the Content Owner I created an Address Book which had the equally imaginative name Beaver Contact. This is shared to the Beavers group with Can Edit permissions as well.

Create share contacts

To create, go to the Contacts App and click on Contacts settings in the bottom left corner. Add the address book by typing your chosen name into the Add new address book box and clicking the arrow icon.

Once the new address book has been created click the Share icon to allow you to pick the users or groups such as Beaver Content to share the address book with and also grant edit permissions

To add a contact to the shared address book, go to the Contacts app and click on New Contact and fill in the details as needed.

Share a contact

Set the Address Book to the shared contact list you created.

Nextcloud Office & Collabora Online Dev

While using Group Folders and WebDAV is probably the easiest way to get going, being able to edit documents directly in Nextcloud could be a really useful feature - if it will behave. On a local network performance is fine although whether it works as well over a VDSL internet connection remains to be seen.

Current Status : OK with workaround

After a restart of Apache & PHP-FPM the first requests seem to work fine most of the time. The CODE service gets started and documents can be opened and edited. But rerunning the same test later it appears to be starting a process that never completes and every call to a Files feature appears to start another process, resulting in the PHP-FPM service running out of available processes at which point the whole of Nextcloud becomes unresponsive.

It appears to be an issue between the Files and Preview apps, my suspicion is that after a restart the CODE service is not running so any request for a document icon that hasn't been prepared causes the preview app to fail. With Preview disabled (see below) the problem goes away. This applies to versions 26.0 and 26.0.1. I will be testing 26.0.2 shortly.

This configuration is a work-in-progress so by all means use it for inspiration but there's at least one error or omission here.

Configuration

To enable this, login as an Administrator and go to Settings > Apps > Office & Text and click on Download and Enable for both the Collabora Online - Built-in CODE Server and Nextcloud Office applications. This will take a while to download and install.

There are some configuration options under Settings > Administration Settings > Administration : Nextcloud Office. The most important is under the Nextcloud Office section to set Use the buit-in CODE- Collabora Online Development Edition and hopefully get a green tick and status of Collabora Online server is reachable.

Advanced Settings

There are options to switch to Office Open XML instead of OpenDocument Format by default, restrict open and edit rights to selected groups, use a canonical webroot and enable access for external groups. All of which I've left in the default unselected state.

There is also an ability to restrict which endpoints can make WOPI request which I've restricted to the internal subnets and loopback via 192.168.0.0/16, 127.0.0.0/8 for now with a note to try further restrictions. There's a thread on the help forum seeking clarification of what means but it not getting much attention from the development community.

I've also left watermarking and templates disabled for now, that's something for the leaders to play with.

Cache

This definitely benefits from the APCu cache which is enabled in the config.php file.

<?php
$CONFIG = array (
...
'memcache.local' => '\OC\Memcache\APCu',
...
);

The documentation also refers to using Redis for transaction locking, which I've not implemented as I'm really not convinced of the need for a small test system like this, but I might have a go later.

Disable Preview for Documents

While disabling the Preview application appears to prevent the problem occuring it also disables thumbnails in the Photos app, which is not exactly user friendly. Instead we can control which files the Preview app will act on and exclude OpenDocument from that list. I'm not sure we'll keep MarkDown either as a standard icon might be clearer.

Edit the config.php file

<?php
$CONFIG = array (
...
'enabledPreviewProviders' => [
'\OC\Preview\PNG',
'\OC\Preview\JPEG',
'\OC\Preview\GIF',
'\OC\Preview\BMP',
'\OC\Preview\TXT',
'\OC\Preview\MarkDown',
]
...
);

Adding \OC\OpenDocument to the list makes the problem come right back again, which to me is proof that it's preview related.

Server Config

The CODE Server is only started when the first user tries to create or edit a document. Once launched it looks to require approximately 500 MB of RAM for the server itself, so make allowance for that in your server sizing.

No other configuration has been applied to the CODE server at this time.

HAproxy Config

External access for the leaders has to be via a reverse proxy since I only have one public IP address for all services, plus it lets me set up some security controls as well. The proxy also needs the TLS certificate and I ended up using one from Lets Encrypt and installing Certbot on there as well to handle the renewals - see HAproxy with LetsEncrypt certificate for that details of that.

This worked great for everything, although Nextcloud's "who am I really" detection gets a little confused so needed to be overidden to use the HTTPS address via the proxy. Unfortunately the RichDocument process does not handle this at all well and I had a lot of issues trying to get it to work at all until I reconfigured the Apache2 server for Nextcloud with an internal TLS certificate and configured HAproxy to connect using HTTPS.

While this means I'm doing a bunch of unnecessary calculation to decrypt HTTPS in the HAproxy VM, encrypt again to talk HTTPS across a vNet to another VM on the same server which then needs to decrypt, it seems to fix that particular issue.

Updated haproxy.cfg

frontend HTTPS
# Terminates TLS - finds required cert(s) in the haproxy dir.
  bind *:443 ssl crt /etc/ssl/haproxy/
...
acl is_host_nctest hdr(host) -i nctest.example.com
 use_backend HTTPS-nctest if is_host_nctest

backend HTTPS-nctest
# nctest.internal.example.com, TLS
  server nctest 192.168.451.503:443 check ssl verify none

The apache2 config also needs to be updated to support TLS, it's easier to create a new configuration with TLS enabled and then disable plain HTTP later.

Other Ideas

Some other thoughts on the list that may be of interest once we've evaluated the first round of applications and have some thoughts about what should be in the live version.

  • Wiki / Collectives
  • Document Search
  • Edit with Libre Office
  • User 2FA
  • ClamAV scanning of documents