|
|
Line 250: |
Line 250: |
|
| |
|
| No password is required. | | No password is required. |
|
| |
|
| |
| === Add missing indices ===
| |
|
| |
| Nextcloud regularly complains about missing indices or missing primary keys and asks you to e.g. run <code>occ db:add-missing-indices</code> manually. In order to automate this, you can create a postStart task for the Nextcloud systemd service to always run that command.
| |
|
| |
| <syntaxhighlight lang="nix">
| |
| # Add missing indices after every Nextcloud start.
| |
| systemd.services.phpfpm-nextcloud = {
| |
| postStart = ''
| |
| php ${pkgs.nextcloud28}/occ db:add-missing-indices
| |
| '';
| |
| path = with pkgs; [ config.services.nextcloud.phpPackage config.services.nextcloud.package ];
| |
| };
| |
| </syntaxhighlight>
| |
|
| |
| You can add other maintenance commands to the <code>postStart</code> multi-line string.
| |
|
| |
| An [https://github.com/NixOS/nixpkgs/pull/308291 ongoing pull request] is trying to bring this into the upstream Nextcloud module.
| |
|
| |
| == Clients == | | == Clients == |
|
| |
|