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 secrets for the service are generated alongside those for the rest of the fleet, to 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…OAuth2 client for the service in Kanidm

None of these three secrets is meaningful to a human: they are randomly generated. The last one’s name follows the declared subdomain (oidc-secret-nextcloud if the service responds on nextcloud, oidc-secret-nextcloud-cloud if it responds on cloud).

OptionDefaultEffect
darkone.service.nextcloud.pluginscalendar, contactsEnabled 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 via websocket instead of polling the server every thirty seconds. Significantly reduced server load, near-instant synchronization.

Verification from the server :

Fenêtre de terminal
sudo -u nextcloud 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, waiting for the gateway 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 advanced one major version at a time, after verifying that the instance reports the previous one. The full procedure, including backup, is described in Services.

SymptomTip
Administrator cannot log inUse /login?direct=1
Slow synchronization on workstationsRun notify_push:self-test on the server
Whiteboard not respondingwhiteboard missing from plugins, or just configure-admin-host never re-run since
Client re-requests authorization each sessionSession keyring not unlocked
Client shows unknown account, offlinePrevious configuration: clear ~/.config/Nextcloud
Share asks for password in file managerWizard never run, or keyring locked
No icon in system tray, therefore no access to settingsstatus-tray extension disabled, or qt.platformTheme reset to gnome