Skip to content

Nextcloud (Personal Cloud)

Nextcloud 🡕 hosts files, calendars and contacts for the network. The service is linked to Kanidm : no Nextcloud password to create, the network account is enough.

On workstations, the desktop client is installed and already linked to the account. No synchronization is set up by default.

etc/config.yaml
hosts:
- hostname: "server1"
profile: "server"
services:
nextcloud:
title: "Mon cloud"
domain: "cloud"

The service secrets are generated along with those of the rest of the fleet, and this must be run before the first deployment :

Fenêtre de terminal
just configure-admin-host
SecretRole
nextcloud-admin-passwordLocal administration account
nextcloud-whiteboard-secretToken shared with the whiteboard
oidc-secret-nextcloud…Service OAuth2 client against Kanidm

None of these three secrets makes sense to a human : they are drawn at random. The name of the last one follows the declared subdomain (oidc-secret-nextcloud if the service answers on nextcloud, oidc-secret-nextcloud-cloud if it answers on cloud).

With a network.smtp relay, Nextcloud also reads smtp/password, provided by the mail provider and entered by hand. It takes precedence over the password entered in the administration interface.

OptionDefaultEffect
darkone.service.nextcloud.pluginscalendar, contacts, tasksEnabled applications
darkone.service.nextcloud.adminUseradminAdministration account name
darkone.service.nextcloud.enableSsoRedirecttrueRedirects directly to Kanidm

With enableSsoRedirect, Nextcloud no longer displays its login form and sends the user to Kanidm. One less click on every login, including for the desktop client.

notify_push is enabled : workstations receive changes over websocket instead of polling the server every thirty seconds. Server load is clearly reduced, synchronisation almost immediate.

Check from the server :

Fenêtre de terminal
sudo nextcloud-occ notify_push:self-test

The test requires the public URL of the service, so the zone’s reverse proxy must be reachable. The unit retries for fifteen minutes after a deployment, to give the gateway time to finish starting.

The client is installed as soon as a nextcloud service exists on the network.

OptionDefaultEffect
darkone.home.office.nextcloud.enableservice detectedInstalls the desktop client
darkone.home.office.nextcloud.servernullForces a different instance
darkone.home.office.nextcloud.enableAutoStarttrueStarts in the background at login
darkone.home.office.nextcloud.enableWebdavtrueProvides the account linking wizard
darkone.home.office.nextcloud.syncDirnullFolder suggested in the wizard

nextcloud.server accepts any URL, including an instance outside the network.

Only two launchers appear in the applications menu :

LauncherOriginRole
Nextcloud sync clientnextcloud-client packageSynchronizes a local folder
Webdav Loginframework, if enableWebdavLinks the account to the desktop (files, calendar, contacts)

Everything else (account, folders, pause) is managed from the system tray icon : the framework no longer adds a settings launcher.

Two GNOME module settings make it visible. A workstation running a different desktop must provide the equivalent.

SettingValueWhy
GNOME Extensionstatus-tray 🡕appindicator, the old one, no longer shows the client icon
qt.platformThemeqt5ctgnome deprives all Qt applications of the system tray
  1. At login, the client window opens with the server address already filled in.
  2. The user clicks Log in: the browser opens Kanidm, where their session is generally already active.
  3. They grant access. No password is entered.
  4. The wizard then offers to choose a folder. It can be closed here without syncing anything: the account remains connected.

To browse files from the file manager without syncing anything, the user launches Webdav Login from the applications menu, or nextcloud-webdav-login in a terminal.

  1. The browser opens on Kanidm, the user grants access.
  2. The wizard saves a GNOME online account : the share appears in the file manager, the calendar and contacts in Evolution.
  3. Nothing else to enter. The wizard nonetheless displays the application password, usable from any other WebDAV client.

The pre-filled address is only valid for account creation in the wizard. A machine that already carries one (inherited from a previous instance, for example) keeps it as-is, with its former address: the client then displays as “offline”, frozen, with no possible action.

Fenêtre de terminal
systemctl --user stop nextcloud-client.service
rm -rf ~/.config/Nextcloud
systemctl --user start nextcloud-client.service

The online account itself is reset from Settings → Online accounts, or simply by relaunching the wizard.

Nextcloud refuses to skip a major version. The version is pinned in the module and must be moved forward one major at a time, after checking that the instance indeed reports the previous one. The full procedure, backup included, is described in Services.

SymptomLead
Administrator unable to log inGo through /login?direct=1
occ fails under sudo -u nextcloudRun sudo nextcloud-occ
Slow synchronisation on workstationsnotify_push:self-test on the server
The whiteboard does not respondwhiteboard absent from plugins, or just configure-admin-host never re-run since
The client asks for authorisation every sessionSession keyring not unlocked
The client shows an unknown account, offlineEarlier configuration: clear ~/.config/Nextcloud
Sharing asks for a password in the file managerAssistant never started, or keyring locked
No icon in the status bar, hence no access to settingsstatus-tray extension disabled, or qt.platformTheme reset to gnome