From faedc6189085a0d2ddea27a709800458bf402ba0 Mon Sep 17 00:00:00 2001 From: Julian Foad Date: Thu, 10 Oct 2024 10:14:45 +0100 Subject: [PATCH] nextcloud: document non-interactive post-install --- docs/services/nextcloud.md | 56 ++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/docs/services/nextcloud.md b/docs/services/nextcloud.md index e1bea9e..e885f32 100644 --- a/docs/services/nextcloud.md +++ b/docs/services/nextcloud.md @@ -15,7 +15,9 @@ This service requires the following other services: ## Configuration -To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process: +To enable this service, add the following configuration to your `vars.yml` file. This is a minimal example. See also the [Optional Configuration](#optional-configuration) sections below. + +Then proceed with the [Installation](#installation) as described below, noting that it includes pre-install and post-install steps. ```yaml ######################################################################## @@ -29,7 +31,10 @@ nextcloud_enabled: true nextcloud_hostname: mash.example.com nextcloud_path_prefix: /nextcloud -# KeyDB configuration, as described below +nextcloud_initial_admin_username: admin # or a name if using personal accounts for admin +nextcloud_initial_admin_password: '' + +# Optional configuration, as described below ######################################################################## # # @@ -42,6 +47,38 @@ In the example configuration above, we configure the service to be hosted at `ht You can remove the `nextcloud_path_prefix` variable definition, to make it default to `/`, so that the service is served at `https://mash.example.com/`. +You can choose any username/password for the initial account. This account will have [super administrator](https://docs.nextcloud.com/server/30/admin_manual/configuration_user/user_configuration.html#granting-administrator-privileges-to-a-user) privileges, by being a member of the `admin` group, but is not otherwise special or unique. + +## Installation + +Installation of Nextcloud requires two or three steps. + +### Pre-Install + +If you've decided to install a dedicated KeyDB instance for Nextcloud, make sure to first do [installation](../installing.md) for the supplementary inventory host (e.g. `nextcloud.example.com-deps`), before running installation for the main one (e.g. `nextcloud.example.com`). + +### Main Install and Start Services + +Run the [installation](../installing.md) for the main nextcloud host, e.g. `just run-tags install-all,start`. + +Ensure Nextcloud and all services it depends on are installed and started. + +### Post-Install + +After the main installation, and services are running, you need to run a post-install step before Nextcloud will be available to use. + +Run the post-install step: `just post-install-nextcloud` (or `just post-install-all`). + +This post-install step: + +- runs the Nextcloud [initial installation](https://docs.nextcloud.com/server/latest/admin_manual/installation/command_line_installation.html) `occ maintenance:install`, if it hasn't yet run. +- adjusts the configuration of URL paths, trusted reverse-proxies, etc. +- configures Nextcloud settings including those you define in `nextcloud_config_additional_parameters`. + +Run it again after making any changes. + +## Optional Configuration + ### KeyDB KeyDB can **optionally** be enabled to improve Nextcloud performance. @@ -228,21 +265,6 @@ To enable [Samba](https://www.samba.org/) external Windows fileshares using [smb nextcloud_container_image_customizations_samba_enabled: true ``` -## Installation - -If you've decided to install a dedicated KeyDB instance for Nextcloud, make sure to first do [installation](../installing.md) for the supplementary inventory host (e.g. `nextcloud.example.com-deps`), before running installation for the main one (e.g. `nextcloud.example.com`). - -## Usage - -After [installation](../installing.md), you should follow Nextcloud's setup wizard at the URL you've chosen. - -You can choose any username/password for your account. - -In **Storage & database**, you should choose PostgreSQL (changing the default **SQLite** choice), with the credentials you see after running `just run-tags print-nextcloud-db-credentials` - -Once you've fully installed Nextcloud, you'd better adjust its default configuration (URL paths, trusted reverse-proxies, etc.) by running: `just run-tags adjust-nextcloud-config` - - ## Recommended other services ### Collabora Online