docker icon indicating copy to clipboard operation
docker copied to clipboard

Document how to use `NC_*` environment variables with Nextcloud Server via the image

Open joshtrichards opened this issue 1 year ago • 2 comments

  • via docker run / command line
  • via docker compose / Compose File

Should significantly cut down on many requests to add additional configuration variables to the image.

E.g.

Optionally, most configuration parameters of Nextcloud otherwise normally specified in thr config.php can be specified (or overriden) using Nextcloud's built-in in - but undocumented and somewhat discouraged officially - support for injecting NC_* config values via the environment. Note this last approach should not be used for any parameters supported by the image already. It's also not well documented or supported upstream.

Refs:

  • nextcloud/server#3966
  • nextcloud/documentation#426
  • nextcloud/documentation#9143

joshtrichards avatar May 25 '24 12:05 joshtrichards

Though I'm thinking maybe we should nudge people towards simply using the Auto configuration via hooks support (#2231) since all config.php values can be set via occ config:system:set whereas NC_* doesn't support any parameters with . in them nor any array values (which are both big limitations). It's also not documented and thus not well supported upstream.

joshtrichards avatar May 30 '24 23:05 joshtrichards

Upstream handling of NC_* variables should have better visibility now that nextcloud/server#46140 is merged (it'll be in next maintenance release for each supported major).

joshtrichards avatar Sep 18 '24 22:09 joshtrichards