From a83c4e2ed1716acd5b7635063f7377e1cd52ac23 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 8 Jan 2026 15:25:23 +0100 Subject: [PATCH 01/66] nextcloud-entrypoint: remove custom logic for ldap.conf again as it does not work Signed-off-by: Simon L. --- Containers/nextcloud/entrypoint.sh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh index 6825f04c..43432e6d 100644 --- a/Containers/nextcloud/entrypoint.sh +++ b/Containers/nextcloud/entrypoint.sh @@ -65,14 +65,6 @@ if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then done - # Custom logic for ldap conf - if ! grep -q "TLS_" /etc/openldap/ldap.conf; then - cat << EOL >> /etc/openldap/ldap.conf -TLS_CACERT $CERTIFICATE_BUNDLE -TLS_REQCERT try -EOL - fi - # Backwards compatibility with older instances if [ -f "/var/www/html/config/postgres.config.php" ]; then sed -i "s|/var/www/html/data/certificates/POSTGRES|/var/www/html/data/certificates/ca-bundle.crt|" /var/www/html/config/postgres.config.php From 6200327a778321afab206a38be20cd6ab088d90a Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 8 Jan 2026 16:15:51 +0100 Subject: [PATCH 02/66] add two further commands to the bug-report template Signed-off-by: Simon L. --- .github/ISSUE_TEMPLATE/Bug_report.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index ec25fc4a..5d6cc059 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -32,6 +32,10 @@ labels: 0. Needs triage #### Output of `sudo docker logs nextcloud-aio-mastercontainer` +#### Output of `sudo docker inspect nextcloud-aio-mastercontainer` + +#### Output of `sudo docker ps -a` + #### Other valuable info #### A picture of a cute animal From 71550aeeccf9a010f9bb4fa59ab1baf366a9be88 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 8 Jan 2026 12:41:42 +0100 Subject: [PATCH 03/66] run playwright tests also on push Signed-off-by: Simon L. --- .github/workflows/playwright-on-push.yml | 123 ++++++++++++++++++ ...ml => playwright-on-workflow-dispatch.yml} | 0 2 files changed, 123 insertions(+) create mode 100644 .github/workflows/playwright-on-push.yml rename .github/workflows/{playwright.yml => playwright-on-workflow-dispatch.yml} (100%) diff --git a/.github/workflows/playwright-on-push.yml b/.github/workflows/playwright-on-push.yml new file mode 100644 index 00000000..af8dec02 --- /dev/null +++ b/.github/workflows/playwright-on-push.yml @@ -0,0 +1,123 @@ +name: Playwright Tests on push + +on: + pull_request: + paths: + - 'php/**' + push: + branches: + - main + paths: + - 'php/**' + +concurrency: + group: playwright-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + BASE_URL: https://localhost:8080 + +jobs: + test: + timeout-minutes: 60 + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6.0.1 + + - uses: actions/setup-node@v6 + with: + node-version: lts/* + + - name: Install dependencies + run: cd php/tests && npm ci + + - name: Install Playwright Browsers + run: cd php/tests && npx playwright install --with-deps chromium + + - name: Set up php 8.4 + uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2.36.0 + with: + extensions: apcu + php-version: 8.4 + coverage: none + ini-file: development + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Adjust some things and fix permissions + run: | + cd php + rm -r ./data + rm -r ./session + composer install --no-dev + composer clear-cache + sudo chmod 777 -R ./ + + - name: Start fresh development server + run: | + docker rm --force nextcloud-aio-{mastercontainer,apache,notify-push,nextcloud,redis,database,domaincheck,whiteboard,imaginary,talk,collabora,borgbackup} || true + docker volume rm nextcloud_aio_{mastercontainer,apache,database,database_dump,nextcloud,nextcloud_data,redis,backup_cache,elasticsearch} || true + docker pull ghcr.io/nextcloud-releases/all-in-one:develop + docker run \ + -d \ + --init \ + --name nextcloud-aio-mastercontainer \ + --restart always \ + --publish 8080:8080 \ + --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \ + --volume ./php:/var/www/docker-aio/php \ + --volume /var/run/docker.sock:/var/run/docker.sock:ro \ + --env SKIP_DOMAIN_VALIDATION=true \ + --env APACHE_PORT=11000 \ + ghcr.io/nextcloud-releases/all-in-one:develop + echo Waiting for 10 seconds for the development container to start ... + sleep 10 + + - name: Run Playwright tests for initial setup + run: | + cd php/tests + export DEBUG=pw:api + if ! npx playwright test tests/initial-setup.spec.js; then + docker logs nextcloud-aio-mastercontainer + docker logs nextcloud-aio-borgbackup + exit 1 + fi + + - name: Start fresh development server + run: | + docker rm --force nextcloud-aio-{mastercontainer,apache,notify-push,nextcloud,redis,database,domaincheck,whiteboard,imaginary,talk,collabora,borgbackup} || true + docker volume rm nextcloud_aio_{mastercontainer,apache,database,database_dump,nextcloud,nextcloud_data,redis,backup_cache,elasticsearch} || true + docker run \ + -d \ + --init \ + --name nextcloud-aio-mastercontainer \ + --restart always \ + --publish 8080:8080 \ + --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \ + --volume ./php:/var/www/docker-aio/php \ + --volume /var/run/docker.sock:/var/run/docker.sock:ro \ + --env SKIP_DOMAIN_VALIDATION=false \ + --env APACHE_PORT=11000 \ + ghcr.io/nextcloud-releases/all-in-one:develop + echo Waiting for 10 seconds for the development container to start ... + sleep 10 + + - name: Run Playwright tests for backup restore + run: | + cd php/tests + export DEBUG=pw:api + if ! npx playwright test tests/restore-instance.spec.js; then + docker logs nextcloud-aio-mastercontainer + docker logs nextcloud-aio-borgbackup + exit 1 + fi + + - uses: actions/upload-artifact@v6 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: php/tests/playwright-report/ + retention-days: 14 + overwrite: true diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright-on-workflow-dispatch.yml similarity index 100% rename from .github/workflows/playwright.yml rename to .github/workflows/playwright-on-workflow-dispatch.yml From a53e315e7fc87e58e20a4bb98fe4e0858d075edb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 11 Jan 2026 15:05:21 +0000 Subject: [PATCH 04/66] build(deps): bump docker in /Containers/mastercontainer Bumps docker from 29.1.3-cli to 29.1.4-cli. --- updated-dependencies: - dependency-name: docker dependency-version: 29.1.4-cli dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/mastercontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index c5b91b7d..d2019e49 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:latest # Docker CLI is a requirement -FROM docker:29.1.3-cli AS docker +FROM docker:29.1.4-cli AS docker # Caddy is a requirement FROM caddy:2.10.2-alpine AS caddy From b998fa8ebf6907f9d3aa14f09446af2675e775ee Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 12 Jan 2026 10:58:58 +0100 Subject: [PATCH 05/66] s3.config.php: allow to configure num_buckets Signed-off-by: Simon L. --- Containers/nextcloud/config/s3.config.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Containers/nextcloud/config/s3.config.php b/Containers/nextcloud/config/s3.config.php index 59217a78..6ea06697 100644 --- a/Containers/nextcloud/config/s3.config.php +++ b/Containers/nextcloud/config/s3.config.php @@ -10,6 +10,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'class' => '\OC\Files\ObjectStore\S3', 'arguments' => array( 'multibucket' => $multibucket === 'true', + 'num_buckets' => (int)getenv('OBJECTSTORE_S3_NUM_BUCKETS') ?: 64, 'bucket' => getenv('OBJECTSTORE_S3_BUCKET'), 'key' => getenv('OBJECTSTORE_S3_KEY') ?: '', 'secret' => getenv('OBJECTSTORE_S3_SECRET') ?: '', From b1baefb959119199291ad0a33226b7e4c8760f30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 16:03:10 +0000 Subject: [PATCH 06/66] build(deps): bump softprops/turnstyle in /.github/workflows Bumps [softprops/turnstyle](https://github.com/softprops/turnstyle) from 3.2.2 to 3.2.3. - [Release notes](https://github.com/softprops/turnstyle/releases) - [Changelog](https://github.com/softprops/turnstyle/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/turnstyle/compare/15f9da4059166900981058ba251e0b652511c68f...e565d2d86403c5d23533937e95980570545e5586) --- updated-dependencies: - dependency-name: softprops/turnstyle dependency-version: 3.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/helm-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml index 639b0785..a4f441c2 100644 --- a/.github/workflows/helm-release.yml +++ b/.github/workflows/helm-release.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v6.0.1 - name: Turnstyle - uses: softprops/turnstyle@15f9da4059166900981058ba251e0b652511c68f # v2 + uses: softprops/turnstyle@e565d2d86403c5d23533937e95980570545e5586 # v2 with: continue-after-seconds: 180 env: From 95a320a3e470aa50c2fe14bba347464d8c5b7740 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 13 Jan 2026 11:06:14 +0100 Subject: [PATCH 07/66] DockerActionManager: disable seccomp policy for borgbackup container Signed-off-by: Simon L. --- php/src/Docker/DockerActionManager.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 9e8a8ff2..67134576 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -376,6 +376,11 @@ readonly class DockerActionManager { // Special things for the backup container which should not be exposed in the containers.json if (str_starts_with($container->GetIdentifier(), 'nextcloud-aio-borgbackup')) { + // Disable seccomp policy if seccomp is enabled in the kernel to fix issues like https://github.com/nextcloud/all-in-one/issues/7308 + if (!$this->configurationManager->isSeccompDisabled()) { + $requestBody['HostConfig']['SecurityOpt'] = ["apparmor:unconfined", "label:disable", "seccomp:unconfined"]; + } + // Additional backup directories foreach ($this->getAllBackupVolumes() as $additionalBackupVolumes) { if ($additionalBackupVolumes !== '') { From c2f070b278a4772f3b75818a185817e4b946317c Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 13 Jan 2026 11:44:05 +0100 Subject: [PATCH 08/66] aio-cadddy: mention how to remove the container again Signed-off-by: Simon L. --- community-containers/caddy/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/community-containers/caddy/readme.md b/community-containers/caddy/readme.md index a8baf9ea..a8d673b0 100644 --- a/community-containers/caddy/readme.md +++ b/community-containers/caddy/readme.md @@ -17,6 +17,7 @@ This container bundles caddy and auto-configures it for you. It also covers [vau - After the container was started the first time, you should see a new `nextcloud-aio-caddy` folder and inside there an `allowed-countries.txt` file when you open the files app with the default `admin` user. In there you can adjust the allowed country codes for caddy by adding them to the first line, e.g. `IT FR` would allow access from italy and france. Private ip-ranges are always allowed. Additionally, in order to activate this config, you need to get an account at https://dev.maxmind.com/geoip/geolite2-free-geolocation-data and download the `GeoLite2-Country.mmdb` and upload it with this exact name into the `nextcloud-aio-caddy` folder. Afterwards restart all containers from the AIO interface and your new config should be active! - You can add your own Caddy configurations in `/data/caddy-imports/` inside the Caddy container (`sudo docker exec -it nextcloud-aio-caddy bash`). These will be imported on container startup. **Please note:** If you do not have CLI access to the server, you can now run docker commands via a web session by using this community container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/container-management - See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack +- If you want to remove the container again and revert back to the default, you need to follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#8-removing-the-reverse-proxy ### Repository https://github.com/szaimen/aio-caddy From 81f477211fdf95bdf5386a5a9b57c54623d8e776 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 13 Jan 2026 11:44:43 +0100 Subject: [PATCH 09/66] fix detail Signed-off-by: Simon L. --- community-containers/caddy/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-containers/caddy/readme.md b/community-containers/caddy/readme.md index a8d673b0..803bbec2 100644 --- a/community-containers/caddy/readme.md +++ b/community-containers/caddy/readme.md @@ -17,7 +17,7 @@ This container bundles caddy and auto-configures it for you. It also covers [vau - After the container was started the first time, you should see a new `nextcloud-aio-caddy` folder and inside there an `allowed-countries.txt` file when you open the files app with the default `admin` user. In there you can adjust the allowed country codes for caddy by adding them to the first line, e.g. `IT FR` would allow access from italy and france. Private ip-ranges are always allowed. Additionally, in order to activate this config, you need to get an account at https://dev.maxmind.com/geoip/geolite2-free-geolocation-data and download the `GeoLite2-Country.mmdb` and upload it with this exact name into the `nextcloud-aio-caddy` folder. Afterwards restart all containers from the AIO interface and your new config should be active! - You can add your own Caddy configurations in `/data/caddy-imports/` inside the Caddy container (`sudo docker exec -it nextcloud-aio-caddy bash`). These will be imported on container startup. **Please note:** If you do not have CLI access to the server, you can now run docker commands via a web session by using this community container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/container-management - See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack -- If you want to remove the container again and revert back to the default, you need to follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#8-removing-the-reverse-proxy +- If you want to remove the container again and revert back to the default, you need to disable the container via the AIO-interface and follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#8-removing-the-reverse-proxy ### Repository https://github.com/szaimen/aio-caddy From 6fe3337a21ff0e6f63a45b22f55a648555ecd0ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 04:09:32 +0000 Subject: [PATCH 10/66] build(deps): bump elasticsearch in /Containers/fulltextsearch Bumps elasticsearch from 8.19.9 to 8.19.10. --- updated-dependencies: - dependency-name: elasticsearch dependency-version: 8.19.10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Containers/fulltextsearch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/fulltextsearch/Dockerfile b/Containers/fulltextsearch/Dockerfile index 7975bcbb..ed0cafe9 100644 --- a/Containers/fulltextsearch/Dockerfile +++ b/Containers/fulltextsearch/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:latest # Probably from here https://github.com/elastic/elasticsearch/blob/main/distribution/docker/src/docker/Dockerfile -FROM elasticsearch:8.19.9 +FROM elasticsearch:8.19.10 USER root From eadf0dc5cde07f21ebe75cc96aa7eba65e91d081 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 04:10:53 +0000 Subject: [PATCH 11/66] build(deps): bump nextcloud-releases/whiteboard Bumps nextcloud-releases/whiteboard from v1.5.0 to v1.5.1. --- updated-dependencies: - dependency-name: nextcloud-releases/whiteboard dependency-version: v1.5.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Containers/whiteboard/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/whiteboard/Dockerfile b/Containers/whiteboard/Dockerfile index f6b8cc7d..37ba25e0 100644 --- a/Containers/whiteboard/Dockerfile +++ b/Containers/whiteboard/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:latest # Probably from this file: https://github.com/nextcloud/whiteboard/blob/main/Dockerfile -FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.0 +FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.1 USER root RUN set -ex; \ From 9a6e2cbe4975ba09c3a46caaeb14cc451fc59a3c Mon Sep 17 00:00:00 2001 From: szaimen <42591237+szaimen@users.noreply.github.com> Date: Wed, 14 Jan 2026 11:54:57 +0000 Subject: [PATCH 12/66] Helm Chart updates Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- nextcloud-aio-helm-chart/Chart.yaml | 2 +- .../templates/nextcloud-aio-apache-deployment.yaml | 2 +- .../templates/nextcloud-aio-clamav-deployment.yaml | 4 ++-- .../templates/nextcloud-aio-collabora-deployment.yaml | 4 ++-- .../templates/nextcloud-aio-database-deployment.yaml | 4 ++-- .../templates/nextcloud-aio-fulltextsearch-deployment.yaml | 4 ++-- .../templates/nextcloud-aio-imaginary-deployment.yaml | 2 +- .../templates/nextcloud-aio-nextcloud-deployment.yaml | 4 ++-- .../templates/nextcloud-aio-notify-push-deployment.yaml | 2 +- .../templates/nextcloud-aio-onlyoffice-deployment.yaml | 4 ++-- .../templates/nextcloud-aio-redis-deployment.yaml | 2 +- .../templates/nextcloud-aio-talk-deployment.yaml | 2 +- .../templates/nextcloud-aio-talk-recording-deployment.yaml | 2 +- .../templates/nextcloud-aio-whiteboard-deployment.yaml | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/nextcloud-aio-helm-chart/Chart.yaml b/nextcloud-aio-helm-chart/Chart.yaml index 16e7a82c..7d990549 100755 --- a/nextcloud-aio-helm-chart/Chart.yaml +++ b/nextcloud-aio-helm-chart/Chart.yaml @@ -1,6 +1,6 @@ name: nextcloud-aio-helm-chart description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose -version: 12.3.0 +version: 12.4.0 apiVersion: v2 keywords: - latest diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml index 6eddefe9..6cdf8db8 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml @@ -61,7 +61,7 @@ spec: value: "{{ .Values.TIMEZONE }}" - name: WHITEBOARD_HOST value: nextcloud-aio-whiteboard - image: ghcr.io/nextcloud-releases/aio-apache:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-apache:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml index 26eda032..d7627802 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml @@ -36,7 +36,7 @@ spec: {{- end }} initContainers: - name: init-subpath - image: ghcr.io/nextcloud-releases/aio-alpine:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-alpine:20260114_114729 command: - mkdir - "-p" @@ -59,7 +59,7 @@ spec: value: "{{ .Values.NEXTCLOUD_UPLOAD_LIMIT }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-clamav:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-clamav:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-deployment.yaml index c0984e1d..7e86c402 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-deployment.yaml @@ -36,9 +36,9 @@ spec: - name: server_name value: "{{ .Values.NC_DOMAIN }}" {{- if contains "--o:support_key=" (join " " (.Values.ADDITIONAL_COLLABORA_OPTIONS | default list)) }} - image: ghcr.io/nextcloud-releases/aio-collabora-online:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-collabora-online:20260114_114729 {{- else }} - image: ghcr.io/nextcloud-releases/aio-collabora:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-collabora:20260114_114729 {{- end }} readinessProbe: exec: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml index b7b54647..055ecd0a 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml @@ -35,7 +35,7 @@ spec: {{- end }} initContainers: - name: init-subpath - image: ghcr.io/nextcloud-releases/aio-alpine:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-alpine:20260114_114729 command: - mkdir - "-p" @@ -64,7 +64,7 @@ spec: value: nextcloud - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-postgresql:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-postgresql:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 14f19447..df30e6a8 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml @@ -24,7 +24,7 @@ spec: spec: initContainers: - name: init-volumes - image: ghcr.io/nextcloud-releases/aio-alpine:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-alpine:20260114_114729 command: - chmod - "777" @@ -54,7 +54,7 @@ spec: value: basic - name: xpack.security.enabled value: "false" - image: ghcr.io/nextcloud-releases/aio-fulltextsearch:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-fulltextsearch:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml index 9f0c54c5..d2fc1375 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml @@ -38,7 +38,7 @@ spec: value: "{{ .Values.IMAGINARY_SECRET }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-imaginary:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-imaginary:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 3cbfa2fe..fe72d307 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -38,7 +38,7 @@ spec: # AIO settings start # Do not remove or change this line! initContainers: - name: init-volumes - image: ghcr.io/nextcloud-releases/aio-alpine:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-alpine:20260114_114729 command: - chmod - "777" @@ -190,7 +190,7 @@ spec: value: "{{ .Values.WHITEBOARD_ENABLED }}" - name: WHITEBOARD_SECRET value: "{{ .Values.WHITEBOARD_SECRET }}" - image: ghcr.io/nextcloud-releases/aio-nextcloud:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-nextcloud:20260114_114729 {{- if eq (.Values.RPSS_ENABLED | default "no") "yes" }} # AIO-config - do not change this comment! securityContext: # The items below only work in container context diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml index a9822a80..5b05336e 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml @@ -57,7 +57,7 @@ spec: value: "6379" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-notify-push:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-notify-push:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index c8160edd..0e3a7fda 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml @@ -24,7 +24,7 @@ spec: spec: initContainers: - name: init-volumes - image: ghcr.io/nextcloud-releases/aio-alpine:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-alpine:20260114_114729 command: - chmod - "777" @@ -42,7 +42,7 @@ spec: value: "{{ .Values.ONLYOFFICE_SECRET }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-onlyoffice:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-onlyoffice:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml index 8446167d..1ccebd79 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml @@ -39,7 +39,7 @@ spec: value: "{{ .Values.REDIS_PASSWORD }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-redis:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-redis:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-deployment.yaml index c28e7335..8635a6ce 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-deployment.yaml @@ -52,7 +52,7 @@ spec: value: "{{ .Values.TURN_SECRET }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-talk:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-talk:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-deployment.yaml index a0d36c08..2cfcaa53 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-deployment.yaml @@ -44,7 +44,7 @@ spec: value: "{{ .Values.RECORDING_SECRET }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-talk-recording:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-talk-recording:20260114_114729 readinessProbe: exec: command: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-whiteboard-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-whiteboard-deployment.yaml index e311f230..50dfc3c4 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-whiteboard-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-whiteboard-deployment.yaml @@ -50,7 +50,7 @@ spec: value: redis - name: TZ value: "{{ .Values.TIMEZONE }}" - image: ghcr.io/nextcloud-releases/aio-whiteboard:20251218_095503 + image: ghcr.io/nextcloud-releases/aio-whiteboard:20260114_114729 readinessProbe: exec: command: From 045e5edf841324dd8eff918be27fa9e3fd332efb Mon Sep 17 00:00:00 2001 From: szaimen <42591237+szaimen@users.noreply.github.com> Date: Wed, 14 Jan 2026 12:03:59 +0000 Subject: [PATCH 13/66] php dependency updates Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- php/composer.lock | 95 ++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/php/composer.lock b/php/composer.lock index ed6667ed..ce1ae80f 100644 --- a/php/composer.lock +++ b/php/composer.lock @@ -391,16 +391,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v2.0.7", + "version": "v2.0.8", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "cb291e4c998ac50637c7eeb58189c14f5de5b9dd" + "reference": "7581a4407012f5f53365e11bafc520fd7f36bc9b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/cb291e4c998ac50637c7eeb58189c14f5de5b9dd", - "reference": "cb291e4c998ac50637c7eeb58189c14f5de5b9dd", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/7581a4407012f5f53365e11bafc520fd7f36bc9b", + "reference": "7581a4407012f5f53365e11bafc520fd7f36bc9b", "shasum": "" }, "require": { @@ -448,7 +448,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2025-11-21T20:52:36+00:00" + "time": "2026-01-08T16:22:46+00:00" }, { "name": "nikic/fast-route", @@ -2755,22 +2755,22 @@ }, { "name": "danog/advanced-json-rpc", - "version": "v3.2.2", + "version": "v3.2.3", "source": { "type": "git", "url": "https://github.com/danog/php-advanced-json-rpc.git", - "reference": "aadb1c4068a88c3d0530cfe324b067920661efcb" + "reference": "ae703ea7b4811797a10590b6078de05b3b33dd91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/danog/php-advanced-json-rpc/zipball/aadb1c4068a88c3d0530cfe324b067920661efcb", - "reference": "aadb1c4068a88c3d0530cfe324b067920661efcb", + "url": "https://api.github.com/repos/danog/php-advanced-json-rpc/zipball/ae703ea7b4811797a10590b6078de05b3b33dd91", + "reference": "ae703ea7b4811797a10590b6078de05b3b33dd91", "shasum": "" }, "require": { "netresearch/jsonmapper": "^5", "php": ">=8.1", - "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0 || ^6" }, "replace": { "felixfbecker/php-advanced-json-rpc": "^3" @@ -2801,9 +2801,9 @@ "description": "A more advanced JSONRPC implementation", "support": { "issues": "https://github.com/danog/php-advanced-json-rpc/issues", - "source": "https://github.com/danog/php-advanced-json-rpc/tree/v3.2.2" + "source": "https://github.com/danog/php-advanced-json-rpc/tree/v3.2.3" }, - "time": "2025-02-14T10:55:15+00:00" + "time": "2026-01-12T21:07:10+00:00" }, { "name": "daverandom/libdns", @@ -3455,16 +3455,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.6", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8" + "reference": "02600c041e7d0f4b7d1fe1d260565ec525472fa9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/5cee1d3dfc2d2aa6599834520911d246f656bcb8", - "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/02600c041e7d0f4b7d1fe1d260565ec525472fa9", + "reference": "02600c041e7d0f4b7d1fe1d260565ec525472fa9", "shasum": "" }, "require": { @@ -3472,8 +3472,8 @@ "ext-filter": "*", "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7|^2.0", + "phpdocumentor/type-resolver": "^2.0", + "phpstan/phpdoc-parser": "^2.0", "webmozart/assert": "^1.9.1 || ^2" }, "require-dev": { @@ -3483,7 +3483,8 @@ "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "psalm/phar": "^5.26" + "psalm/phar": "^5.26", + "shipmonk/dead-code-detector": "^0.5.1" }, "type": "library", "extra": { @@ -3513,44 +3514,44 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.6" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/6.0.0" }, - "time": "2025-12-22T21:13:58+00:00" + "time": "2026-01-07T20:22:53+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.12.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.18|^2.0" + "phpstan/phpdoc-parser": "^2.0" }, "require-dev": { "ext-tokenizer": "*", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "psalm/phar": "^4" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -3571,22 +3572,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.0.0" }, - "time": "2025-11-21T15:09:14+00:00" + "time": "2026-01-06T21:53:42+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495" + "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1e0cd5370df5dd2e556a36b9c62f62e555870495", - "reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/16dbf9937da8d4528ceb2145c9c7c0bd29e26374", + "reference": "16dbf9937da8d4528ceb2145c9c7c0bd29e26374", "shasum": "" }, "require": { @@ -3618,9 +3619,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.1" }, - "time": "2025-08-30T15:50:23+00:00" + "time": "2026-01-12T11:33:04+00:00" }, { "name": "revolt/event-loop", @@ -4735,16 +4736,16 @@ }, { "name": "webmozart/assert", - "version": "2.0.0", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "1b34b004e35a164bc5bb6ebd33c844b2d8069a54" + "reference": "ce6a2f100c404b2d32a1dd1270f9b59ad4f57649" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/1b34b004e35a164bc5bb6ebd33c844b2d8069a54", - "reference": "1b34b004e35a164bc5bb6ebd33c844b2d8069a54", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/ce6a2f100c404b2d32a1dd1270f9b59ad4f57649", + "reference": "ce6a2f100c404b2d32a1dd1270f9b59ad4f57649", "shasum": "" }, "require": { @@ -4791,9 +4792,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/2.0.0" + "source": "https://github.com/webmozarts/assert/tree/2.1.2" }, - "time": "2025-12-16T21:36:00+00:00" + "time": "2026-01-13T14:02:24+00:00" } ], "aliases": [], From 069195bf237fab2fe9f831bb6d815d011bea14fa Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 15 Jan 2026 12:47:51 +0100 Subject: [PATCH 14/66] nextcloud: update to 32.0.4 Signed-off-by: Simon L. --- Containers/nextcloud/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 6b6be7f8..9c468bbb 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -8,7 +8,7 @@ ENV SOURCE_LOCATION=/usr/src/nextcloud ENV REDIS_DB_INDEX=0 # AIO settings start # Do not remove or change this line! -ENV NEXTCLOUD_VERSION=32.0.3 +ENV NEXTCLOUD_VERSION=32.0.4 ENV AIO_TOKEN=123456 ENV AIO_URL=localhost # AIO settings end # Do not remove or change this line! From b5b642232891dccc59ef4e7c8bc5bc8c5b7bb626 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 15 Jan 2026 13:41:20 +0100 Subject: [PATCH 15/66] Revert "DockerActionManager: disable seccomp policy for borgbackup container" Signed-off-by: Simon L. --- php/src/Docker/DockerActionManager.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 67134576..9e8a8ff2 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -376,11 +376,6 @@ readonly class DockerActionManager { // Special things for the backup container which should not be exposed in the containers.json if (str_starts_with($container->GetIdentifier(), 'nextcloud-aio-borgbackup')) { - // Disable seccomp policy if seccomp is enabled in the kernel to fix issues like https://github.com/nextcloud/all-in-one/issues/7308 - if (!$this->configurationManager->isSeccompDisabled()) { - $requestBody['HostConfig']['SecurityOpt'] = ["apparmor:unconfined", "label:disable", "seccomp:unconfined"]; - } - // Additional backup directories foreach ($this->getAllBackupVolumes() as $additionalBackupVolumes) { if ($additionalBackupVolumes !== '') { From 9e362e1dc9ece2fc4bbfd5f10b656d99cae4e6ce Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Thu, 15 Jan 2026 13:48:06 +0100 Subject: [PATCH 16/66] increase to 12.5.0 Signed-off-by: Simon L. --- php/templates/containers.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/templates/containers.twig b/php/templates/containers.twig index c318e8a6..9c55350e 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -17,7 +17,7 @@
-

Nextcloud AIO v12.4.0

+

Nextcloud AIO v12.5.0

{# Add 2nd tab warning #} From 792ba0dfb352fe6a0018dd7ee470c777da5658df Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 16 Jan 2026 22:54:58 +0100 Subject: [PATCH 17/66] update NPMplus images in reverse proxy guide Signed-off-by: Zoey --- reverse-proxy.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/reverse-proxy.md b/reverse-proxy.md index 50a6bccd..bdeb3244 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -564,19 +564,14 @@ Note: this will cause that a non root user can bind privileged ports. Second, see these screenshots for a working config: -![grafik](https://github.com/user-attachments/assets/c32c8fe8-7417-4f8f-9625-24b95651e630) +image -![grafik](https://github.com/user-attachments/assets/f14bba5c-69ce-4514-a2ac-5e5d7fb97792) +image - +image -![grafik](https://github.com/user-attachments/assets/75d7f539-35d1-4a3e-8c51-43123f698893) +image -![grafik](https://github.com/user-attachments/assets/e494edb5-8b70-4d45-bc9b-374219230041) - -`proxy_set_header Accept-Encoding $http_accept_encoding;` - -⚠️ **Please note:** Nextcloud will complain that X-XXS-Protection is set to the wrong value, this is intended by NPMplus.
⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration. From d5c3e79b31f34a66687db78bc9f1065bf24b31e4 Mon Sep 17 00:00:00 2001 From: ph818 <71797925+ph818@users.noreply.github.com> Date: Sat, 17 Jan 2026 17:17:28 -0500 Subject: [PATCH 18/66] Update local-instance.md Clarifying DNS-challenge description. Signed-off-by: ph818 <71797925+ph818@users.noreply.github.com> --- local-instance.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/local-instance.md b/local-instance.md index 1da26280..8abbddb6 100644 --- a/local-instance.md +++ b/local-instance.md @@ -22,10 +22,11 @@ The normal way is the following: **Hint:** You may have a look at [this video](https://youtu.be/zk-y2wVkY4c) for a more complete but possibly outdated example. ## 3. Use the ACME DNS-challenge -You can alternatively use the ACME DNS-challenge to get a valid certificate for Nextcloud. Here is described how to set it up: https://github.com/nextcloud/all-in-one#how-to-get-nextcloud-running-using-the-acme-dns-challenge +You can alternatively use the ACME DNS-challenge to get a valid certificate for Nextcloud. Here is described how to set it up using an external caddy reverse proxy: https://github.com/nextcloud/all-in-one#how-to-get-nextcloud-running-using-the-acme-dns-challenge ## 4. Use Cloudflare If you do not have any control over the network, you may think about using Cloudflare Tunnel to get a valid certificate for your Nextcloud. However it will be opened to the public internet then. See https://github.com/nextcloud/all-in-one#how-to-run-nextcloud-behind-a-cloudflare-tunnel how to set this up. ## 5. Buy a certificate and use that If none of the above ways work for you, you may simply buy a certificate from an issuer for your domain. You then download the certificate onto your server, configure AIO in [reverse proxy mode](./reverse-proxy.md) and use the certificate for your domain in your reverse proxy config. + From a3e43c5cd913d45b34d137bbecfb806d559cb6e7 Mon Sep 17 00:00:00 2001 From: ph818 <71797925+ph818@users.noreply.github.com> Date: Sat, 17 Jan 2026 17:22:42 -0500 Subject: [PATCH 19/66] Update readme.md Clarifying the Instructions for DNS-challenge so following the links will make more sense (configuring the caddyfile of the external caddy reverse proxy). Signed-off-by: ph818 <71797925+ph818@users.noreply.github.com> --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index bcbf7d57..66059954 100644 --- a/readme.md +++ b/readme.md @@ -340,7 +340,7 @@ Although it does not seems like it is the case but from AIO perspective a Cloudf For a reverse proxy example guide for Tailscale, see this guide by [@Perseus333](https://github.com/Perseus333): https://github.com/nextcloud/all-in-one/discussions/6817 ### How to get Nextcloud running using the ACME DNS-challenge? -You can install AIO in reverse proxy mode where is also documented how to get it running using the ACME DNS-challenge for getting a valid certificate for AIO. See the [reverse proxy documentation](./reverse-proxy.md). (Meant is the `Caddy with ACME DNS-challenge` section). Also see https://github.com/dani-garcia/vaultwarden/wiki/Running-a-private-vaultwarden-instance-with-Let%27s-Encrypt-certs#getting-a-custom-caddy-build for additional docs on this topic. +You can install AIO behind an external reverse proxy where is also documented how to get it running using the ACME DNS-challenge for getting a valid certificate for AIO. See the [reverse proxy documentation](./reverse-proxy.md). (Meant is the `Caddy with ACME DNS-challenge` section). Also see https://github.com/dani-garcia/vaultwarden/wiki/Running-a-private-vaultwarden-instance-with-Let%27s-Encrypt-certs#getting-a-custom-caddy-build for additional docs on this topic. ### How to run Nextcloud locally? No domain wanted, or wanting intranet access within your LAN. If you do not want to open Nextcloud to the public internet, you may have a look at the following documentation on how to set it up locally: [local-instance.md](./local-instance.md), but keep in mind you're still required to have https working properly. From b7d63253db7e5d74a83bd0d5f4bd7c51793c8da1 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 20 Jan 2026 11:50:04 +0100 Subject: [PATCH 20/66] postgres.config.php: fix `PDO::MYSQL_ATTR_SSL_CA` Signed-off-by: Simon L. --- Containers/nextcloud/config/postgres.config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/nextcloud/config/postgres.config.php b/Containers/nextcloud/config/postgres.config.php index 71a657a7..0dc835cc 100644 --- a/Containers/nextcloud/config/postgres.config.php +++ b/Containers/nextcloud/config/postgres.config.php @@ -10,7 +10,7 @@ if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_POSTGRES')) { if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_MYSQL')) { $CONFIG = array( 'dbdriveroptions' => array( - 'PDO::MYSQL_ATTR_SSL_CA' => '/var/www/html/data/certificates/ca-bundle.crt', + PDO::MYSQL_ATTR_SSL_CA => '/var/www/html/data/certificates/ca-bundle.crt', ), ); } From 88a45d1a8087b8097c257905b91ea77db30f4a6c Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Tue, 20 Jan 2026 13:20:09 +0100 Subject: [PATCH 21/66] add cooldown to dependabot Signed-off-by: Simon L. --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f79c4ce2..7fe1067e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,8 @@ updates: labels: - 3. to review - dependencies + cooldown: + default-days: 7 - package-ecosystem: composer directory: "/php/" schedule: From 5b41770b68bdfde4ce64332498d1825bd4e1ac82 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Wed, 7 Jan 2026 17:29:24 +0100 Subject: [PATCH 22/66] Cache config, introduce get() and set() helpers to guide new way to set attributes Use cached config, use set() for single attributes, setMultiple to wrap multiple calls to set() Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 50 ++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 320bc477..3b09c5b3 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -9,15 +9,19 @@ class ConfigurationManager { private array $secrets = []; + private array $config = []; + + private bool $noWrite = false; + public function GetConfig() : array { - if(file_exists(DataConst::GetConfigFile())) + if ($this->config === [] && file_exists(DataConst::GetConfigFile())) { $configContent = (string)file_get_contents(DataConst::GetConfigFile()); - return json_decode($configContent, true, 512, JSON_THROW_ON_ERROR); + $this->config = json_decode($configContent, true, 512, JSON_THROW_ON_ERROR); } - return []; + return $this->config; } public function GetPassword() : string { @@ -34,6 +38,34 @@ class ConfigurationManager $this->WriteConfig($config); } + private function get(string $key, mixed $fallbackValue = null) : mixed { + return $this->GetConfig()[$key] ?? $fallbackValue; + } + + private function set(string $key, mixed $value) : void { + $this->GetConfig(); + $this->config[$key] = $value; + // Only write if this isn't called via setMultiple(). + if ($this->noWrite !== true) { + $this->WriteConfig(); + } + } + + /** + * This allows to assign multiple attributes without saving the config to disk in between (as would + * calling set() do). + */ + public function setMultiple(\Closure $closure) : void { + $this->noWrite = true; + try { + $this->GetConfig(); + $closure($this); + $this->WriteConfig(); + } finally { + $this->noWrite = false; + } + } + public function GetAndGenerateSecret(string $secretId) : string { if ($secretId === '') { return ''; @@ -599,17 +631,25 @@ class ConfigurationManager /** * @throws InvalidSettingConfigurationException */ - public function WriteConfig(array $config) : void { + public function WriteConfig(?array $config) : void { + if ($config) { + $this->config = $config; + } if(!is_dir(DataConst::GetDataDirectory())) { throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not exist! Something was set up falsely!"); } + // Shouldn't happen, but as a precaution we won't write an empty config to disk. + if ($this->config === []) { + return; + } $df = disk_free_space(DataConst::GetDataDirectory()); - $content = json_encode($config, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR); + $content = json_encode($this->config, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR); $size = strlen($content) + 10240; if ($df !== false && (int)$df < $size) { throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not have enough space for writing the config file! Not writing it back!"); } file_put_contents(DataConst::GetConfigFile(), $content); + $this->config = []; } private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string { From e2ca4af0b99fbbfd74657cdbc0b8e40dcd8e14ad Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 11:43:43 +0100 Subject: [PATCH 23/66] Adapt GetEnvironmentalVariableOrConfig() to get() and set() Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 3b09c5b3..0ee4bae2 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -654,23 +654,21 @@ class ConfigurationManager private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string { $envVariableOutput = getenv($envVariableName); + $configValue = $this->get($configName, ''); if ($envVariableOutput === false) { - $config = $this->GetConfig(); - if (!isset($config[$configName]) || $config[$configName] === '') { - $config[$configName] = $defaultValue; + if ($configValue === '') { + $this->set($configName, $defaultValue); + return $defaultValue; } - return $config[$configName]; + return $configValue; } - if(file_exists(DataConst::GetConfigFile())) { - $config = $this->GetConfig(); - if (!isset($config[$configName])) { - $config[$configName] = ''; - } - if ($envVariableOutput !== $config[$configName]) { - $config[$configName] = $envVariableOutput; - $this->WriteConfig($config); + + if (file_exists(DataConst::GetConfigFile())) { + if ($envVariableOutput !== $configValue) { + $this->set($configName, $envVariableOutput); } } + return $envVariableOutput; } From e95c13b86df04bbe8a1b4e21c35b5e40a7cf7ec7 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 18:22:40 +0100 Subject: [PATCH 24/66] Adapt GetAndGenerateSecret() to get() and set() Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 0ee4bae2..27a98d03 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -71,17 +71,17 @@ class ConfigurationManager return ''; } - $config = $this->GetConfig(); - if(!isset($config['secrets'][$secretId])) { - $config['secrets'][$secretId] = bin2hex(random_bytes(24)); - $this->WriteConfig($config); + $secrets = $this->get('secrets', []); + if (!isset($secrets[$secretId])) { + $secrets[$secretId] = bin2hex(random_bytes(24)); + $this->set('secrets', $secrets); } if ($secretId === 'BORGBACKUP_PASSWORD' && !file_exists(DataConst::GetBackupSecretFile())) { - $this->DoubleSafeBackupSecret($config['secrets'][$secretId]); + $this->DoubleSafeBackupSecret($secrets[$secretId]); } - return $config['secrets'][$secretId]; + return $secrets[$secretId]; } public function GetRegisteredSecret(string $secretId) : string { From 66b0c579d1718e712e87d77f712dfcf2986dd415 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:37:36 +0100 Subject: [PATCH 25/66] Make `AIO_TOKEN` an attribute Signed-off-by: Pablo Zmdl --- php/src/Auth/AuthManager.php | 2 +- php/src/Controller/DockerController.php | 5 +---- php/src/Data/ConfigurationManager.php | 9 +++++---- php/src/Docker/DockerActionManager.php | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/php/src/Auth/AuthManager.php b/php/src/Auth/AuthManager.php index 925ff89f..b4533c1e 100644 --- a/php/src/Auth/AuthManager.php +++ b/php/src/Auth/AuthManager.php @@ -19,7 +19,7 @@ readonly class AuthManager { } public function CheckToken(string $token) : bool { - return hash_equals($this->configurationManager->GetToken(), $token); + return hash_equals($this->configurationManager->AIO_TOKEN, $token); } public function SetAuthState(bool $isLoggedIn) : void { diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 27a06bc8..0e8f7e08 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -213,10 +213,7 @@ readonly class DockerController { } public function startTopContainer(bool $pullImage) : void { - $config = $this->configurationManager->GetConfig(); - // set AIO_TOKEN - $config['AIO_TOKEN'] = bin2hex(random_bytes(24)); - $this->configurationManager->WriteConfig($config); + $this->configurationManager->AIO_TOKEN = bin2hex(random_bytes(24)); // Stop domaincheck since apache would not be able to start otherwise $this->StopDomaincheckContainer(); diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 27a98d03..6b80c71b 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -13,6 +13,11 @@ class ConfigurationManager private bool $noWrite = false; + public string $AIO_TOKEN { + get => $this->get('AIO_TOKEN', ''); + set { $this->set('AIO_TOKEN', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -28,10 +33,6 @@ class ConfigurationManager return $this->GetConfig()['password']; } - public function GetToken() : string { - return $this->GetConfig()['AIO_TOKEN']; - } - public function SetPassword(string $password) : void { $config = $this->GetConfig(); $config['password'] = $password; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 9e8a8ff2..73d69476 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -544,7 +544,7 @@ readonly class DockerActionManager { return match ($placeholder) { 'NC_DOMAIN' => $this->configurationManager->GetDomain(), 'NC_BASE_DN' => $this->configurationManager->GetBaseDN(), - 'AIO_TOKEN' => $this->configurationManager->GetToken(), + 'AIO_TOKEN' => $this->configurationManager->AIO_TOKEN, 'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(), 'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(), 'AIO_URL' => $this->configurationManager->GetAIOURL(), From c408fcdd87ebb3bf782bf327020cdf0cc9f325ff Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 14:55:29 +0100 Subject: [PATCH 26/66] Make `password` an attribute Signed-off-by: Pablo Zmdl --- php/src/Auth/AuthManager.php | 2 +- php/src/Data/ConfigurationManager.php | 19 +++++++------------ php/src/Data/Setup.php | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/php/src/Auth/AuthManager.php b/php/src/Auth/AuthManager.php index b4533c1e..1d558aed 100644 --- a/php/src/Auth/AuthManager.php +++ b/php/src/Auth/AuthManager.php @@ -15,7 +15,7 @@ readonly class AuthManager { } public function CheckCredentials(string $password) : bool { - return hash_equals($this->configurationManager->GetPassword(), $password); + return hash_equals($this->configurationManager->password, $password); } public function CheckToken(string $token) : bool { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 6b80c71b..1c40508f 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -18,6 +18,11 @@ class ConfigurationManager set { $this->set('AIO_TOKEN', $value); } } + public string $password { + get => $this->get('password', ''); + set { $this->set('password', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -29,16 +34,6 @@ class ConfigurationManager return $this->config; } - public function GetPassword() : string { - return $this->GetConfig()['password']; - } - - public function SetPassword(string $password) : void { - $config = $this->GetConfig(); - $config['password'] = $password; - $this->WriteConfig($config); - } - private function get(string $key, mixed $fallbackValue = null) : mixed { return $this->GetConfig()[$key] ?? $fallbackValue; } @@ -586,7 +581,7 @@ class ConfigurationManager throw new InvalidSettingConfigurationException("Please enter your current password."); } - if ($currentPassword !== $this->GetPassword()) { + if ($currentPassword !== $this->password) { throw new InvalidSettingConfigurationException("The entered current password is not correct."); } @@ -603,7 +598,7 @@ class ConfigurationManager } // All checks pass so set the password - $this->SetPassword($newPassword); + $this->set('password', $newPassword); } public function GetApachePort() : string { diff --git a/php/src/Data/Setup.php b/php/src/Data/Setup.php index f8f43e4b..e409eef8 100644 --- a/php/src/Data/Setup.php +++ b/php/src/Data/Setup.php @@ -17,7 +17,7 @@ readonly class Setup { } $password = $this->passwordGenerator->GeneratePassword(8); - $this->configurationManager->SetPassword($password); + $this->configurationManager->password = $password; return $password; } From 395c8dea1dc6b2d3ee09e6f7ef0ab14945ba5974 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 13:11:20 +0100 Subject: [PATCH 27/66] Make `wasStartButtonClicked` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Controller/DockerController.php | 6 +++--- php/src/Data/ConfigurationManager.php | 13 +++++-------- php/src/Docker/DockerActionManager.php | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index b57f65a5..59708627 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -105,7 +105,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'backup_exit_code' => $dockerActionManager->GetBackupcontainerExitCode(), 'is_instance_restore_attempt' => $configurationManager->isInstanceRestoreAttempt(), 'borg_backup_mode' => $configurationManager->GetBackupMode(), - 'was_start_button_clicked' => $configurationManager->wasStartButtonClicked(), + 'was_start_button_clicked' => $configurationManager->wasStartButtonClicked, 'has_update_available' => $dockerActionManager->isAnyUpdateAvailable(), 'last_backup_time' => $configurationManager->GetLastBackupTime(), 'backup_times' => $configurationManager->GetBackupTimes(), diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 0e8f7e08..e346803b 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -190,11 +190,11 @@ readonly class DockerController { $config = $this->configurationManager->GetConfig(); // set AIO_URL $config['AIO_URL'] = $host . ':' . (string)$port . $path; - // set wasStartButtonClicked - $config['wasStartButtonClicked'] = 1; // set install_latest_major $config['install_latest_major'] = $installLatestMajor; $this->configurationManager->WriteConfig($config); + // set wasStartButtonClicked + $this->configurationManager->wasStartButtonClicked = true; // Do not pull container images in case 'bypass_container_update' is set via url params // Needed for local testing @@ -274,7 +274,7 @@ readonly class DockerController { public function StartDomaincheckContainer() : void { # Don't start if domain is already set - if ($this->configurationManager->GetDomain() !== '' || $this->configurationManager->wasStartButtonClicked()) { + if ($this->configurationManager->GetDomain() !== '' || $this->configurationManager->wasStartButtonClicked) { return; } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 1c40508f..18cdc46c 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -23,6 +23,11 @@ class ConfigurationManager set { $this->set('password', $value); } } + public bool $wasStartButtonClicked { + get => $this->get('wasStartButtonClicked', false); + set { $this->set('wasStartButtonClicked', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -150,14 +155,6 @@ class ConfigurationManager return $backupTimes; } - public function wasStartButtonClicked() : bool { - if (isset($this->GetConfig()['wasStartButtonClicked'])) { - return true; - } else { - return false; - } - } - private function isx64Platform() : bool { if (php_uname('m') === 'x86_64') { return true; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 73d69476..0f215aa5 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -606,7 +606,7 @@ readonly class DockerActionManager { public function isAnyUpdateAvailable(): bool { // return early if instance is not installed - if (!$this->configurationManager->wasStartButtonClicked()) { + if (!$this->configurationManager->wasStartButtonClicked) { return false; } $id = 'nextcloud-aio-apache'; From 35bd920cb112ca6be3a9a5d382738d89948e6054 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 13:09:52 +0100 Subject: [PATCH 28/66] Make `AIO_URL` an attribute Signed-off-by: Pablo Zmdl --- php/src/Controller/DockerController.php | 4 ++-- php/src/Data/ConfigurationManager.php | 14 +++++--------- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index e346803b..4b8d01e1 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -188,11 +188,11 @@ readonly class DockerController { } $config = $this->configurationManager->GetConfig(); - // set AIO_URL - $config['AIO_URL'] = $host . ':' . (string)$port . $path; // set install_latest_major $config['install_latest_major'] = $installLatestMajor; $this->configurationManager->WriteConfig($config); + // set AIO_URL + $this->configurationManager->AIO_URL = $host . ':' . (string)$port . $path; // set wasStartButtonClicked $this->configurationManager->wasStartButtonClicked = true; diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 18cdc46c..c4032fea 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -23,6 +23,11 @@ class ConfigurationManager set { $this->set('password', $value); } } + public string $AIO_URL { + get => $this->get('AIO_URL', ''); + set { $this->set('AIO_URL', $value); } + } + public bool $wasStartButtonClicked { get => $this->get('wasStartButtonClicked', false); set { $this->set('wasStartButtonClicked', $value); } @@ -475,15 +480,6 @@ class ConfigurationManager return $config['restore-exclude-previews']; } - public function GetAIOURL() : string { - $config = $this->GetConfig(); - if(!isset($config['AIO_URL'])) { - $config['AIO_URL'] = ''; - } - - return $config['AIO_URL']; - } - /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 0f215aa5..d2ef54de 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -547,7 +547,7 @@ readonly class DockerActionManager { 'AIO_TOKEN' => $this->configurationManager->AIO_TOKEN, 'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(), 'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(), - 'AIO_URL' => $this->configurationManager->GetAIOURL(), + 'AIO_URL' => $this->configurationManager->AIO_URL, 'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(), 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(), 'APACHE_PORT' => $this->configurationManager->GetApachePort(), From 922e060ecc340da7dd7f6de254b10c65c32a1dd2 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 13:06:59 +0100 Subject: [PATCH 29/66] Make `install_latest_major` an attribute Signed-off-by: Pablo Zmdl --- php/src/Controller/DockerController.php | 11 +---------- php/src/Data/ConfigurationManager.php | 13 +++++-------- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 4b8d01e1..61c857a7 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -181,16 +181,7 @@ readonly class DockerController { $port = 443; } - if (isset($request->getParsedBody()['install_latest_major'])) { - $installLatestMajor = 32; - } else { - $installLatestMajor = ""; - } - - $config = $this->configurationManager->GetConfig(); - // set install_latest_major - $config['install_latest_major'] = $installLatestMajor; - $this->configurationManager->WriteConfig($config); + $this->configurationManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']); // set AIO_URL $this->configurationManager->AIO_URL = $host . ':' . (string)$port . $path; // set wasStartButtonClicked diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index c4032fea..1fb03e68 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -33,6 +33,11 @@ class ConfigurationManager set { $this->set('wasStartButtonClicked', $value); } } + public bool $install_latest_major { + get => $this->get('install_latest_major', false); + set { $this->set('install_latest_major', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -889,14 +894,6 @@ class ConfigurationManager } } - public function shouldLatestMajorGetInstalled() : bool { - $config = $this->GetConfig(); - if(!isset($config['install_latest_major'])) { - $config['install_latest_major'] = ''; - } - return $config['install_latest_major'] !== ''; - } - public function GetAdditionalBackupDirectoriesString() : string { if (!file_exists(DataConst::GetAdditionalBackupDirectoriesFile())) { return ''; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index d2ef54de..cbe43c1a 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -580,7 +580,7 @@ readonly class DockerActionManager { 'NEXTCLOUD_STARTUP_APPS' => $this->configurationManager->GetNextcloudStartupApps(), 'NEXTCLOUD_ADDITIONAL_APKS' => $this->configurationManager->GetNextcloudAdditionalApks(), 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->configurationManager->GetNextcloudAdditionalPhpExtensions(), - 'INSTALL_LATEST_MAJOR' => $this->configurationManager->shouldLatestMajorGetInstalled() ? 'yes' : '', + 'INSTALL_LATEST_MAJOR' => $this->configurationManager->install_latest_major ? 'yes' : '', 'REMOVE_DISABLED_APPS' => $this->configurationManager->shouldDisabledAppsGetRemoved() ? 'yes' : '', // Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then) 'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'), From 3656d181a50a0e310f83246ce4f786a7ce30708b Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 13:05:10 +0100 Subject: [PATCH 30/66] Make `selectedRestoreTime` an attribute Signed-off-by: Pablo Zmdl --- php/src/Controller/DockerController.php | 4 +--- php/src/Data/ConfigurationManager.php | 14 +++++--------- php/src/Docker/DockerActionManager.php | 1 + 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 61c857a7..bdc2e347 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -124,14 +124,12 @@ readonly class DockerController { public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { $this->configurationManager->SetBackupMode('restore'); - $config = $this->configurationManager->GetConfig(); - $config['selected-restore-time'] = $request->getParsedBody()['selected_restore_time'] ?? ''; if (isset($request->getParsedBody()['restore-exclude-previews'])) { $config['restore-exclude-previews'] = 1; } else { $config['restore-exclude-previews'] = ''; } - $this->configurationManager->WriteConfig($config); + $this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; $id = self::TOP_CONTAINER; $forceStopNextcloud = true; diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 1fb03e68..3e003e61 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -23,6 +23,11 @@ class ConfigurationManager set { $this->set('password', $value); } } + public string $selectedRestoreTime { + get => $this->get('selected-restore-time', ''); + set { $this->set('selected-restore-time', $value); } + } + public string $AIO_URL { get => $this->get('AIO_URL', ''); set { $this->set('AIO_URL', $value); } @@ -467,15 +472,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function GetSelectedRestoreTime() : string { - $config = $this->GetConfig(); - if(!isset($config['selected-restore-time'])) { - $config['selected-restore-time'] = ''; - } - - return $config['selected-restore-time']; - } - public function GetRestoreExcludePreviews() : string { $config = $this->GetConfig(); if(!isset($config['restore-exclude-previews'])) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index cbe43c1a..0a6c2cf5 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -550,6 +550,7 @@ readonly class DockerActionManager { 'AIO_URL' => $this->configurationManager->AIO_URL, 'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(), 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(), + 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, 'APACHE_PORT' => $this->configurationManager->GetApachePort(), 'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(), 'TALK_PORT' => $this->configurationManager->GetTalkPort(), From 79d6458a720ef76f3f73322af49b7bb63b86bfcd Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 13:02:19 +0100 Subject: [PATCH 31/66] Make `restoreExcludePreviews` an attribute Signed-off-by: Pablo Zmdl --- php/src/Controller/DockerController.php | 6 +----- php/src/Data/ConfigurationManager.php | 14 +++++--------- php/src/Docker/DockerActionManager.php | 3 +-- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index bdc2e347..a9d167ea 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -124,12 +124,8 @@ readonly class DockerController { public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { $this->configurationManager->SetBackupMode('restore'); - if (isset($request->getParsedBody()['restore-exclude-previews'])) { - $config['restore-exclude-previews'] = 1; - } else { - $config['restore-exclude-previews'] = ''; - } $this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; + $this->configurationManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']); $id = self::TOP_CONTAINER; $forceStopNextcloud = true; diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 3e003e61..d216fedd 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -23,6 +23,11 @@ class ConfigurationManager set { $this->set('password', $value); } } + public bool $restoreExcludePreviews { + get => $this->get('restore-exclude-previews', false); + set { $this->set('restore-exclude-previews', $value); } + } + public string $selectedRestoreTime { get => $this->get('selected-restore-time', ''); set { $this->set('selected-restore-time', $value); } @@ -472,15 +477,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function GetRestoreExcludePreviews() : string { - $config = $this->GetConfig(); - if(!isset($config['restore-exclude-previews'])) { - $config['restore-exclude-previews'] = ''; - } - - return $config['restore-exclude-previews']; - } - /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 0a6c2cf5..ed128418 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -548,8 +548,7 @@ readonly class DockerActionManager { 'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(), 'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(), 'AIO_URL' => $this->configurationManager->AIO_URL, - 'SELECTED_RESTORE_TIME' => $this->configurationManager->GetSelectedRestoreTime(), - 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->GetRestoreExcludePreviews(), + 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '', 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, 'APACHE_PORT' => $this->configurationManager->GetApachePort(), 'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(), From 54b5857e42c51f36930b1be0ce9b4c9f83ba6e39 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 13:00:22 +0100 Subject: [PATCH 32/66] Make `isWhiteboardEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 59708627..a0b45675 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -136,7 +136,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(), 'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(), 'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(), - 'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled(), + 'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled, 'community_containers' => $configurationManager->listAvailableCommunityContainers(), 'community_containers_enabled' => $configurationManager->GetEnabledCommunityContainers(), 'bypass_container_update' => $bypass_container_update, diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 7b092e45..73fa681c 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -91,7 +91,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-whiteboard') { - if (!$this->configurationManager->isWhiteboardEnabled()) { + if (!$this->configurationManager->isWhiteboardEnabled) { continue; } } @@ -200,7 +200,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-whiteboard') { - if (!$this->configurationManager->isWhiteboardEnabled()) { + if (!$this->configurationManager->isWhiteboardEnabled) { continue; } } diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 45586f9c..c63c7a05 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -119,11 +119,7 @@ readonly class ConfigurationController { } else { $this->configurationManager->SetDockerSocketProxyEnabledState(0); } - if (isset($request->getParsedBody()['whiteboard'])) { - $this->configurationManager->SetWhiteboardEnabledState(1); - } else { - $this->configurationManager->SetWhiteboardEnabledState(0); - } + $this->configurationManager->isWhiteboardEnabled = isset($request->getParsedBody()['whiteboard']); } if (isset($request->getParsedBody()['community-form'])) { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index d216fedd..a6dd196a 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -23,6 +23,11 @@ class ConfigurationManager set { $this->set('password', $value); } } + public bool $isWhiteboardEnabled { + get => $this->get('isWhiteboardEnabled', true); + set { $this->set('isWhiteboardEnabled', $value); } + } + public bool $restoreExcludePreviews { get => $this->get('restore-exclude-previews', false); set { $this->set('restore-exclude-previews', $value); } @@ -207,21 +212,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function isWhiteboardEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isWhiteboardEnabled']) && $config['isWhiteboardEnabled'] === 0) { - return false; - } else { - return true; - } - } - - public function SetWhiteboardEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isWhiteboardEnabled'] = $value; - $this->WriteConfig($config); - } - public function SetClamavEnabledState(int $value) : void { $config = $this->GetConfig(); $config['isClamavEnabled'] = $value; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index ed128418..9b39e63b 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -586,7 +586,7 @@ readonly class DockerActionManager { 'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'), // Allow to get local ip-address of caddy container and add it to trusted proxies automatically 'CADDY_IP_ADDRESS' => in_array('caddy', $this->configurationManager->GetEnabledCommunityContainers(), true) ? gethostbyname('nextcloud-aio-caddy') : '', - 'WHITEBOARD_ENABLED' => $this->configurationManager->isWhiteboardEnabled() ? 'yes' : '', + 'WHITEBOARD_ENABLED' => $this->configurationManager->isWhiteboardEnabled ? 'yes' : '', default => $this->configurationManager->GetRegisteredSecret($placeholder), }; } From f63a11c05ea6ecca35dd1ddf705468532ccb953d Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:58:50 +0100 Subject: [PATCH 33/66] Make `backupMode` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Controller/DockerController.php | 14 +++++++------- php/src/Data/ConfigurationManager.php | 20 +++++--------------- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index a0b45675..6abe1989 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -104,7 +104,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_backup_container_running' => $dockerActionManager->isBackupContainerRunning(), 'backup_exit_code' => $dockerActionManager->GetBackupcontainerExitCode(), 'is_instance_restore_attempt' => $configurationManager->isInstanceRestoreAttempt(), - 'borg_backup_mode' => $configurationManager->GetBackupMode(), + 'borg_backup_mode' => $configurationManager->backupMode, 'was_start_button_clicked' => $configurationManager->wasStartButtonClicked, 'has_update_available' => $dockerActionManager->isAnyUpdateAvailable(), 'last_backup_time' => $configurationManager->GetLastBackupTime(), diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index a9d167ea..d7909adb 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -89,7 +89,7 @@ readonly class DockerController { } public function startBackup(bool $forceStopNextcloud = false) : void { - $this->configurationManager->SetBackupMode('backup'); + $this->configurationManager->backupMode = 'backup'; $id = self::TOP_CONTAINER; $this->PerformRecursiveContainerStop($id, $forceStopNextcloud); @@ -109,21 +109,21 @@ readonly class DockerController { } public function checkBackup() : void { - $this->configurationManager->SetBackupMode('check'); + $this->configurationManager->backupMode = 'check'; $id = 'nextcloud-aio-borgbackup'; $this->PerformRecursiveContainerStart($id); } private function listBackup() : void { - $this->configurationManager->SetBackupMode('list'); + $this->configurationManager->backupMode = 'list'; $id = 'nextcloud-aio-borgbackup'; $this->PerformRecursiveContainerStart($id); } public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { - $this->configurationManager->SetBackupMode('restore'); + $this->configurationManager->backupMode = 'restore'; $this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; $this->configurationManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']); @@ -138,22 +138,22 @@ readonly class DockerController { } public function StartBackupContainerCheckRepair(Request $request, Response $response, array $args) : Response { - $this->configurationManager->SetBackupMode('check-repair'); + $this->configurationManager->backupMode = 'check-repair'; $id = 'nextcloud-aio-borgbackup'; $this->PerformRecursiveContainerStart($id); // Restore to backup check which is needed to make the UI logic work correctly - $this->configurationManager->SetBackupMode('check'); + $this->configurationManager->backupMode = 'check'; return $response->withStatus(201)->withHeader('Location', '.'); } public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response { - $this->configurationManager->SetBackupMode('test'); $config = $this->configurationManager->GetConfig(); $config['instance_restore_attempt'] = 0; $this->configurationManager->WriteConfig($config); + $this->configurationManager->backupMode = 'test'; $id = self::TOP_CONTAINER; $this->PerformRecursiveContainerStop($id); diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index a6dd196a..e21984b6 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -38,6 +38,11 @@ class ConfigurationManager set { $this->set('selected-restore-time', $value); } } + public string $backupMode { + get => $this->get('backup-mode', ''); + set { $this->set('backup-mode', $value); } + } + public string $AIO_URL { get => $this->get('AIO_URL', ''); set { $this->set('AIO_URL', $value); } @@ -452,21 +457,6 @@ class ConfigurationManager return 'dc=' . implode(',dc=', explode('.', $domain)); } - public function GetBackupMode() : string { - $config = $this->GetConfig(); - if(!isset($config['backup-mode'])) { - $config['backup-mode'] = ''; - } - - return $config['backup-mode']; - } - - public function SetBackupMode(string $mode) : void { - $config = $this->GetConfig(); - $config['backup-mode'] = $mode; - $this->WriteConfig($config); - } - /** * @throws InvalidSettingConfigurationException */ From ef8dce1a47856d3988ae671b2f4a3b6d1c32b4f0 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:56:10 +0100 Subject: [PATCH 34/66] Make `isDockerSocketProxyEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 6abe1989..caff178c 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -135,7 +135,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(), 'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(), 'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(), - 'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled(), + 'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled, 'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled, 'community_containers' => $configurationManager->listAvailableCommunityContainers(), 'community_containers_enabled' => $configurationManager->GetEnabledCommunityContainers(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 73fa681c..788f8edc 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -87,7 +87,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-docker-socket-proxy') { - if (!$this->configurationManager->isDockerSocketProxyEnabled()) { + if (!$this->configurationManager->isDockerSocketProxyEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-whiteboard') { @@ -196,7 +196,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-docker-socket-proxy') { - if (!$this->configurationManager->isDockerSocketProxyEnabled()) { + if (!$this->configurationManager->isDockerSocketProxyEnabled) { continue; } } elseif ($value === 'nextcloud-aio-whiteboard') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index c63c7a05..ecd7bc8a 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -114,11 +114,7 @@ readonly class ConfigurationController { } else { $this->configurationManager->SetFulltextsearchEnabledState(0); } - if (isset($request->getParsedBody()['docker-socket-proxy'])) { - $this->configurationManager->SetDockerSocketProxyEnabledState(1); - } else { - $this->configurationManager->SetDockerSocketProxyEnabledState(0); - } + $this->configurationManager->isDockerSocketProxyEnabled = isset($request->getParsedBody()['docker-socket-proxy']); $this->configurationManager->isWhiteboardEnabled = isset($request->getParsedBody()['whiteboard']); } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index e21984b6..a44751c4 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -23,6 +23,11 @@ class ConfigurationManager set { $this->set('password', $value); } } + public bool $isDockerSocketProxyEnabled { + get => $this->get('isDockerSocketProxyEnabled', false); + set { $this->set('isDockerSocketProxyEnabled', $value); } + } + public bool $isWhiteboardEnabled { get => $this->get('isWhiteboardEnabled', true); set { $this->set('isWhiteboardEnabled', $value); } @@ -202,21 +207,6 @@ class ConfigurationManager } } - public function isDockerSocketProxyEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isDockerSocketProxyEnabled']) && $config['isDockerSocketProxyEnabled'] === 1) { - return true; - } else { - return false; - } - } - - public function SetDockerSocketProxyEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isDockerSocketProxyEnabled'] = $value; - $this->WriteConfig($config); - } - public function SetClamavEnabledState(int $value) : void { $config = $this->GetConfig(); $config['isClamavEnabled'] = $value; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 9b39e63b..0ee60280 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -566,7 +566,7 @@ readonly class DockerActionManager { 'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(), 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled() ? 'yes' : '', 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled() ? 'yes' : '', - 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled() ? 'yes' : '', + 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->GetNextcloudUploadLimit(), 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->GetNextcloudMemoryLimit(), 'NEXTCLOUD_MAX_TIME' => $this->configurationManager->GetNextcloudMaxTime(), From 2f19225f8127d1ad67922045ba1df266739527dd Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:52:03 +0100 Subject: [PATCH 35/66] Make `instance_restore_attempt` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Controller/DockerController.php | 4 +--- php/src/Data/ConfigurationManager.php | 22 +++++++++------------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index caff178c..235a3ffc 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -103,7 +103,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'has_backup_run_once' => $configurationManager->hasBackupRunOnce(), 'is_backup_container_running' => $dockerActionManager->isBackupContainerRunning(), 'backup_exit_code' => $dockerActionManager->GetBackupcontainerExitCode(), - 'is_instance_restore_attempt' => $configurationManager->isInstanceRestoreAttempt(), + 'is_instance_restore_attempt' => $configurationManager->instance_restore_attempt, 'borg_backup_mode' => $configurationManager->backupMode, 'was_start_button_clicked' => $configurationManager->wasStartButtonClicked, 'has_update_available' => $dockerActionManager->isAnyUpdateAvailable(), diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index d7909adb..c604da70 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -150,10 +150,8 @@ readonly class DockerController { } public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response { - $config = $this->configurationManager->GetConfig(); - $config['instance_restore_attempt'] = 0; - $this->configurationManager->WriteConfig($config); $this->configurationManager->backupMode = 'test'; + $this->configurationManager->instance_restore_attempt = false; $id = self::TOP_CONTAINER; $this->PerformRecursiveContainerStop($id); diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index a44751c4..12d4aef2 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -48,6 +48,11 @@ class ConfigurationManager set { $this->set('backup-mode', $value); } } + public bool $instance_restore_attempt { + get => $this->get('instance_restore_attempt', false); + set { $this->set('instance_restore_attempt', $value); } + } + public string $AIO_URL { get => $this->get('AIO_URL', ''); set { $this->set('AIO_URL', $value); } @@ -529,8 +534,11 @@ class ConfigurationManager $config['borg_backup_host_location'] = $location; $config['borg_remote_repo'] = $repo; $config['borg_restore_password'] = $password; - $config['instance_restore_attempt'] = 1; $this->WriteConfig($config); + + $this->setMultiple(function ($confManager) { + $confManager->instance_restore_attempt = true; + }); } /** @@ -663,18 +671,6 @@ class ConfigurationManager return $config['borg_restore_password']; } - public function isInstanceRestoreAttempt() : bool { - $config = $this->GetConfig(); - if(!isset($config['instance_restore_attempt'])) { - $config['instance_restore_attempt'] = ''; - } - - if ($config['instance_restore_attempt'] === 1) { - return true; - } - return false; - } - public function GetNextcloudMount() : string { $envVariableName = 'NEXTCLOUD_MOUNT'; $configName = 'nextcloud_mount'; From 4b14e91aa5556e2b9fef7ae50236108695dfee23 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:01:53 +0100 Subject: [PATCH 36/66] Make `isClamavEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 235a3ffc..c213251d 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -110,7 +110,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'last_backup_time' => $configurationManager->GetLastBackupTime(), 'backup_times' => $configurationManager->GetBackupTimes(), 'current_channel' => $dockerActionManager->GetCurrentChannel(), - 'is_clamav_enabled' => $configurationManager->isClamavEnabled(), + 'is_clamav_enabled' => $configurationManager->isClamavEnabled, 'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled(), 'is_collabora_enabled' => $configurationManager->isCollaboraEnabled(), 'is_talk_enabled' => $configurationManager->isTalkEnabled(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 788f8edc..e5d9a9a7 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -56,7 +56,7 @@ readonly class ContainerDefinitionFetcher { $containers = []; foreach ($data['aio_services_v1'] as $entry) { if ($entry['container_name'] === 'nextcloud-aio-clamav') { - if (!$this->configurationManager->isClamavEnabled()) { + if (!$this->configurationManager->isClamavEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-onlyoffice') { @@ -168,7 +168,7 @@ readonly class ContainerDefinitionFetcher { } foreach ($valueDependsOn as $value) { if ($value === 'nextcloud-aio-clamav') { - if (!$this->configurationManager->isClamavEnabled()) { + if (!$this->configurationManager->isClamavEnabled) { continue; } } elseif ($value === 'nextcloud-aio-onlyoffice') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index ecd7bc8a..1ca02283 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -79,11 +79,7 @@ readonly class ConfigurationController { if (isset($request->getParsedBody()['collabora']) && isset($request->getParsedBody()['onlyoffice'])) { throw new InvalidSettingConfigurationException("Collabora and Onlyoffice are not allowed to be enabled at the same time!"); } - if (isset($request->getParsedBody()['clamav'])) { - $this->configurationManager->SetClamavEnabledState(1); - } else { - $this->configurationManager->SetClamavEnabledState(0); - } + $this->configurationManager->isClamavEnabled = isset($request->getParsedBody()['clamav']); if (isset($request->getParsedBody()['onlyoffice'])) { $this->configurationManager->SetOnlyofficeEnabledState(1); } else { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 12d4aef2..485ca6ce 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -68,6 +68,11 @@ class ConfigurationManager set { $this->set('install_latest_major', $value); } } + public bool $isClamavEnabled { + get => $this->get('isClamavEnabled', false); + set { $this->set('isClamavEnabled', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -203,21 +208,6 @@ class ConfigurationManager } } - public function isClamavEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isClamavEnabled']) && $config['isClamavEnabled'] === 1) { - return true; - } else { - return false; - } - } - - public function SetClamavEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isClamavEnabled'] = $value; - $this->WriteConfig($config); - } - public function isImaginaryEnabled() : bool { $config = $this->GetConfig(); if (isset($config['isImaginaryEnabled']) && $config['isImaginaryEnabled'] === 0) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 0ee60280..6a5b292c 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -556,7 +556,7 @@ readonly class DockerActionManager { 'TURN_DOMAIN' => $this->configurationManager->GetTurnDomain(), 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->GetBorgRestorePassword(), - 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled() ? 'yes' : '', + 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled() ? 'yes' : '', 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled() ? 'yes' : '', 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled() ? 'yes' : '', From 0c4cb9165e497621c848f7b2dbbffe6505064714 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:02:41 +0100 Subject: [PATCH 37/66] Make `isOnlyofficeEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index c213251d..75607e63 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -111,7 +111,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'backup_times' => $configurationManager->GetBackupTimes(), 'current_channel' => $dockerActionManager->GetCurrentChannel(), 'is_clamav_enabled' => $configurationManager->isClamavEnabled, - 'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled(), + 'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled, 'is_collabora_enabled' => $configurationManager->isCollaboraEnabled(), 'is_talk_enabled' => $configurationManager->isTalkEnabled(), 'borg_restore_password' => $configurationManager->GetBorgRestorePassword(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index e5d9a9a7..17f18f9a 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -60,7 +60,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-onlyoffice') { - if (!$this->configurationManager->isOnlyofficeEnabled()) { + if (!$this->configurationManager->isOnlyofficeEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-collabora') { @@ -172,7 +172,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-onlyoffice') { - if (!$this->configurationManager->isOnlyofficeEnabled()) { + if (!$this->configurationManager->isOnlyofficeEnabled) { continue; } } elseif ($value === 'nextcloud-aio-collabora') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 1ca02283..7254dbf0 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -80,11 +80,7 @@ readonly class ConfigurationController { throw new InvalidSettingConfigurationException("Collabora and Onlyoffice are not allowed to be enabled at the same time!"); } $this->configurationManager->isClamavEnabled = isset($request->getParsedBody()['clamav']); - if (isset($request->getParsedBody()['onlyoffice'])) { - $this->configurationManager->SetOnlyofficeEnabledState(1); - } else { - $this->configurationManager->SetOnlyofficeEnabledState(0); - } + $this->configurationManager->isOnlyofficeEnabled = isset($request->getParsedBody()['onlyoffice']); if (isset($request->getParsedBody()['collabora'])) { $this->configurationManager->SetCollaboraEnabledState(1); } else { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 485ca6ce..36cea5e0 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -73,6 +73,11 @@ class ConfigurationManager set { $this->set('isClamavEnabled', $value); } } + public bool $isOnlyofficeEnabled { + get => $this->get('isOnlyofficeEnabled', false); + set { $this->set('isOnlyofficeEnabled', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -243,21 +248,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function isOnlyofficeEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) { - return true; - } else { - return false; - } - } - - public function SetOnlyofficeEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isOnlyofficeEnabled'] = $value; - $this->WriteConfig($config); - } - public function isCollaboraEnabled() : bool { $config = $this->GetConfig(); if (isset($config['isCollaboraEnabled']) && $config['isCollaboraEnabled'] === 0) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 6a5b292c..615d7c20 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -558,7 +558,7 @@ readonly class DockerActionManager { 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->GetBorgRestorePassword(), 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled() ? 'yes' : '', - 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled() ? 'yes' : '', + 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled ? 'yes' : '', 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled() ? 'yes' : '', 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled() ? 'yes' : '', 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', From 1a8aa308b8dae56977f1efb26b3caea03bcdc27c Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:03:12 +0100 Subject: [PATCH 38/66] Make `isCollaboraEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Controller/DockerController.php | 2 +- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 6 files changed, 11 insertions(+), 25 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 75607e63..adfd72d5 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -112,7 +112,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'current_channel' => $dockerActionManager->GetCurrentChannel(), 'is_clamav_enabled' => $configurationManager->isClamavEnabled, 'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled, - 'is_collabora_enabled' => $configurationManager->isCollaboraEnabled(), + 'is_collabora_enabled' => $configurationManager->isCollaboraEnabled, 'is_talk_enabled' => $configurationManager->isTalkEnabled(), 'borg_restore_password' => $configurationManager->GetBorgRestorePassword(), 'daily_backup_time' => $configurationManager->GetDailyBackupTime(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 17f18f9a..3831d81a 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -64,7 +64,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-collabora') { - if (!$this->configurationManager->isCollaboraEnabled()) { + if (!$this->configurationManager->isCollaboraEnabled) { continue; } if ($this->configurationManager->isCollaboraSubscriptionEnabled()) { @@ -176,7 +176,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-collabora') { - if (!$this->configurationManager->isCollaboraEnabled()) { + if (!$this->configurationManager->isCollaboraEnabled) { continue; } } elseif ($value === 'nextcloud-aio-talk') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 7254dbf0..d69d4bc9 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -81,11 +81,7 @@ readonly class ConfigurationController { } $this->configurationManager->isClamavEnabled = isset($request->getParsedBody()['clamav']); $this->configurationManager->isOnlyofficeEnabled = isset($request->getParsedBody()['onlyoffice']); - if (isset($request->getParsedBody()['collabora'])) { - $this->configurationManager->SetCollaboraEnabledState(1); - } else { - $this->configurationManager->SetCollaboraEnabledState(0); - } + $this->configurationManager->isCollaboraEnabled = isset($request->getParsedBody()['collabora']); if (isset($request->getParsedBody()['talk'])) { $this->configurationManager->SetTalkEnabledState(1); } else { diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index c604da70..640c190d 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -224,7 +224,7 @@ readonly class DockerController { // This is a hack but no better solution was found for the meantime // Stop Collabora first to make sure it force-saves // See https://github.com/nextcloud/richdocuments/issues/3799 - if ($id === self::TOP_CONTAINER && $this->configurationManager->isCollaboraEnabled()) { + if ($id === self::TOP_CONTAINER && $this->configurationManager->isCollaboraEnabled) { $this->PerformRecursiveContainerStop('nextcloud-aio-collabora'); } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 36cea5e0..165f9c44 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -78,6 +78,11 @@ class ConfigurationManager set { $this->set('isOnlyofficeEnabled', $value); } } + public bool $isCollaboraEnabled { + get => $this->get('isCollaboraEnabled', true); + set { $this->set('isCollaboraEnabled', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -248,21 +253,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function isCollaboraEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isCollaboraEnabled']) && $config['isCollaboraEnabled'] === 0) { - return false; - } else { - return true; - } - } - - public function SetCollaboraEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isCollaboraEnabled'] = $value; - $this->WriteConfig($config); - } - public function isTalkEnabled() : bool { $config = $this->GetConfig(); if (isset($config['isTalkEnabled']) && $config['isTalkEnabled'] === 0) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 615d7c20..09a257d6 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -559,7 +559,7 @@ readonly class DockerActionManager { 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled() ? 'yes' : '', 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled ? 'yes' : '', - 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled() ? 'yes' : '', + 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled ? 'yes' : '', 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled() ? 'yes' : '', 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', 'TIMEZONE' => $this->configurationManager->GetTimezone() === '' ? 'Etc/UTC' : $this->configurationManager->GetTimezone(), From d29829eebc9b7ac6004972fea70834cd4d34f935 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:03:38 +0100 Subject: [PATCH 39/66] Make `isTalkEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index adfd72d5..0481aceb 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -113,7 +113,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_clamav_enabled' => $configurationManager->isClamavEnabled, 'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled, 'is_collabora_enabled' => $configurationManager->isCollaboraEnabled, - 'is_talk_enabled' => $configurationManager->isTalkEnabled(), + 'is_talk_enabled' => $configurationManager->isTalkEnabled, 'borg_restore_password' => $configurationManager->GetBorgRestorePassword(), 'daily_backup_time' => $configurationManager->GetDailyBackupTime(), 'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 3831d81a..f74abb13 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -71,7 +71,7 @@ readonly class ContainerDefinitionFetcher { $entry['image'] = 'ghcr.io/nextcloud-releases/aio-collabora-online'; } } elseif ($entry['container_name'] === 'nextcloud-aio-talk') { - if (!$this->configurationManager->isTalkEnabled()) { + if (!$this->configurationManager->isTalkEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-talk-recording') { @@ -180,7 +180,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-talk') { - if (!$this->configurationManager->isTalkEnabled()) { + if (!$this->configurationManager->isTalkEnabled) { continue; } } elseif ($value === 'nextcloud-aio-talk-recording') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index d69d4bc9..b3e9296b 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -82,11 +82,7 @@ readonly class ConfigurationController { $this->configurationManager->isClamavEnabled = isset($request->getParsedBody()['clamav']); $this->configurationManager->isOnlyofficeEnabled = isset($request->getParsedBody()['onlyoffice']); $this->configurationManager->isCollaboraEnabled = isset($request->getParsedBody()['collabora']); - if (isset($request->getParsedBody()['talk'])) { - $this->configurationManager->SetTalkEnabledState(1); - } else { - $this->configurationManager->SetTalkEnabledState(0); - } + $this->configurationManager->isTalkEnabled = isset($request->getParsedBody()['talk']); if (isset($request->getParsedBody()['talk-recording'])) { $this->configurationManager->SetTalkRecordingEnabledState(1); } else { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 165f9c44..648d04c3 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -83,6 +83,11 @@ class ConfigurationManager set { $this->set('isCollaboraEnabled', $value); } } + public bool $isTalkEnabled { + get => $this->get('isTalkEnabled', true); + set { $this->set('isTalkEnabled', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -253,21 +258,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function isTalkEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isTalkEnabled']) && $config['isTalkEnabled'] === 0) { - return false; - } else { - return true; - } - } - - public function SetTalkEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isTalkEnabled'] = $value; - $this->WriteConfig($config); - } - public function isTalkRecordingEnabled() : bool { if (!$this->isTalkEnabled()) { return false; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 09a257d6..0a136240 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -560,7 +560,7 @@ readonly class DockerActionManager { 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled() ? 'yes' : '', 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled ? 'yes' : '', 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled ? 'yes' : '', - 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled() ? 'yes' : '', + 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled ? 'yes' : '', 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', 'TIMEZONE' => $this->configurationManager->GetTimezone() === '' ? 'Etc/UTC' : $this->configurationManager->GetTimezone(), 'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(), From 7ba721cb6137f702680f40f532ddd5e9dc69f345 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:04:04 +0100 Subject: [PATCH 40/66] Make `isTalkRecordingEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 +-- .../Controller/ConfigurationController.php | 6 +---- php/src/Data/ConfigurationManager.php | 27 ++++--------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 31 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 0481aceb..34d7efe1 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -134,7 +134,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(), 'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(), 'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(), - 'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(), + 'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled, 'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled, 'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled, 'community_containers' => $configurationManager->listAvailableCommunityContainers(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index f74abb13..92bc3d76 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -75,7 +75,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-talk-recording') { - if (!$this->configurationManager->isTalkRecordingEnabled()) { + if (!$this->configurationManager->isTalkRecordingEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-imaginary') { @@ -184,7 +184,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-talk-recording') { - if (!$this->configurationManager->isTalkRecordingEnabled()) { + if (!$this->configurationManager->isTalkRecordingEnabled) { continue; } } elseif ($value === 'nextcloud-aio-imaginary') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index b3e9296b..7a3cf81d 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -83,11 +83,7 @@ readonly class ConfigurationController { $this->configurationManager->isOnlyofficeEnabled = isset($request->getParsedBody()['onlyoffice']); $this->configurationManager->isCollaboraEnabled = isset($request->getParsedBody()['collabora']); $this->configurationManager->isTalkEnabled = isset($request->getParsedBody()['talk']); - if (isset($request->getParsedBody()['talk-recording'])) { - $this->configurationManager->SetTalkRecordingEnabledState(1); - } else { - $this->configurationManager->SetTalkRecordingEnabledState(0); - } + $this->configurationManager->isTalkRecordingEnabled = isset($request->getParsedBody()['talk-recording']); if (isset($request->getParsedBody()['imaginary'])) { $this->configurationManager->SetImaginaryEnabledState(1); } else { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 648d04c3..bd920a04 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -88,6 +88,11 @@ class ConfigurationManager set { $this->set('isTalkEnabled', $value); } } + public bool $isTalkRecordingEnabled { + get => $this->isTalkEnabled && $this->get('isTalkRecordingEnabled', false); + set { $this->set('isTalkRecordingEnabled', $this->isTalkEnabled && $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -258,28 +263,6 @@ class ConfigurationManager $this->WriteConfig($config); } - public function isTalkRecordingEnabled() : bool { - if (!$this->isTalkEnabled()) { - return false; - } - $config = $this->GetConfig(); - if (isset($config['isTalkRecordingEnabled']) && $config['isTalkRecordingEnabled'] === 1) { - return true; - } else { - return false; - } - } - - public function SetTalkRecordingEnabledState(int $value) : void { - if (!$this->isTalkEnabled()) { - $value = 0; - } - - $config = $this->GetConfig(); - $config['isTalkRecordingEnabled'] = $value; - $this->WriteConfig($config); - } - /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 0a136240..e2cd50f6 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -557,7 +557,7 @@ readonly class DockerActionManager { 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->GetBorgRestorePassword(), 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', - 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled() ? 'yes' : '', + 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled ? 'yes' : '', 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled ? 'yes' : '', 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled ? 'yes' : '', 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled ? 'yes' : '', From 9096f8e8fc22b8176d6db00ef7235c5c200792a6 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:04:24 +0100 Subject: [PATCH 41/66] Make `isImaginaryEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- .../Controller/ConfigurationController.php | 6 +----- php/src/Data/ConfigurationManager.php | 20 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 34d7efe1..27b2edad 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -124,7 +124,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'collabora_additional_options' => $configurationManager->GetAdditionalCollaboraOptions(), 'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(), 'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(), - 'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled(), + 'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled, 'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled(), 'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(), 'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 92bc3d76..6fad6a13 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -79,7 +79,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-imaginary') { - if (!$this->configurationManager->isImaginaryEnabled()) { + if (!$this->configurationManager->isImaginaryEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-fulltextsearch') { @@ -188,7 +188,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-imaginary') { - if (!$this->configurationManager->isImaginaryEnabled()) { + if (!$this->configurationManager->isImaginaryEnabled) { continue; } } elseif ($value === 'nextcloud-aio-fulltextsearch') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 7a3cf81d..5ae705c3 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -84,11 +84,7 @@ readonly class ConfigurationController { $this->configurationManager->isCollaboraEnabled = isset($request->getParsedBody()['collabora']); $this->configurationManager->isTalkEnabled = isset($request->getParsedBody()['talk']); $this->configurationManager->isTalkRecordingEnabled = isset($request->getParsedBody()['talk-recording']); - if (isset($request->getParsedBody()['imaginary'])) { - $this->configurationManager->SetImaginaryEnabledState(1); - } else { - $this->configurationManager->SetImaginaryEnabledState(0); - } + $this->configurationManager->isImaginaryEnabled = isset($request->getParsedBody()['imaginary']); if (isset($request->getParsedBody()['fulltextsearch'])) { $this->configurationManager->SetFulltextsearchEnabledState(1); } else { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index bd920a04..65e83524 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -93,6 +93,11 @@ class ConfigurationManager set { $this->set('isTalkRecordingEnabled', $this->isTalkEnabled && $value); } } + public bool $isImaginaryEnabled { + get => $this->get('isImaginaryEnabled', true); + set { $this->set('isImaginaryEnabled', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -228,21 +233,6 @@ class ConfigurationManager } } - public function isImaginaryEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isImaginaryEnabled']) && $config['isImaginaryEnabled'] === 0) { - return false; - } else { - return true; - } - } - - public function SetImaginaryEnabledState(int $value) : void { - $config = $this->GetConfig(); - $config['isImaginaryEnabled'] = $value; - $this->WriteConfig($config); - } - public function isFulltextsearchEnabled() : bool { $config = $this->GetConfig(); if (isset($config['isFulltextsearchEnabled']) && $config['isFulltextsearchEnabled'] === 1) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index e2cd50f6..bb397729 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -564,7 +564,7 @@ readonly class DockerActionManager { 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', 'TIMEZONE' => $this->configurationManager->GetTimezone() === '' ? 'Etc/UTC' : $this->configurationManager->GetTimezone(), 'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(), - 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled() ? 'yes' : '', + 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled ? 'yes' : '', 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled() ? 'yes' : '', 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->GetNextcloudUploadLimit(), From 77165713f8cb499f464d379869e96007ec2cf668 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:04:48 +0100 Subject: [PATCH 42/66] Make `isFulltextsearchEnabled` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 +-- .../Controller/ConfigurationController.php | 6 +---- php/src/Data/ConfigurationManager.php | 26 +++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 11 insertions(+), 29 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 27b2edad..2b1d6af1 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -125,7 +125,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(), 'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(), 'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled, - 'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled(), + 'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled, 'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(), 'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(), 'nextcloud_mount' => $configurationManager->GetNextcloudMount(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 6fad6a13..c0a799d5 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -83,7 +83,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-fulltextsearch') { - if (!$this->configurationManager->isFulltextsearchEnabled()) { + if (!$this->configurationManager->isFulltextsearchEnabled) { continue; } } elseif ($entry['container_name'] === 'nextcloud-aio-docker-socket-proxy') { @@ -192,7 +192,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value === 'nextcloud-aio-fulltextsearch') { - if (!$this->configurationManager->isFulltextsearchEnabled()) { + if (!$this->configurationManager->isFulltextsearchEnabled) { continue; } } elseif ($value === 'nextcloud-aio-docker-socket-proxy') { diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 5ae705c3..f707b750 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -85,11 +85,7 @@ readonly class ConfigurationController { $this->configurationManager->isTalkEnabled = isset($request->getParsedBody()['talk']); $this->configurationManager->isTalkRecordingEnabled = isset($request->getParsedBody()['talk-recording']); $this->configurationManager->isImaginaryEnabled = isset($request->getParsedBody()['imaginary']); - if (isset($request->getParsedBody()['fulltextsearch'])) { - $this->configurationManager->SetFulltextsearchEnabledState(1); - } else { - $this->configurationManager->SetFulltextsearchEnabledState(0); - } + $this->configurationManager->isFulltextsearchEnabled = isset($request->getParsedBody()['fulltextsearch']); $this->configurationManager->isDockerSocketProxyEnabled = isset($request->getParsedBody()['docker-socket-proxy']); $this->configurationManager->isWhiteboardEnabled = isset($request->getParsedBody()['whiteboard']); } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 65e83524..43680ca9 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -98,6 +98,12 @@ class ConfigurationManager set { $this->set('isImaginaryEnabled', $value); } } + public bool $isFulltextsearchEnabled { + get => $this->get('isFulltextsearchEnabled', false); + // Elasticsearch does not work on kernels without seccomp anymore. See https://github.com/nextcloud/all-in-one/discussions/5768 + set { $this->set('isFulltextsearchEnabled', ($this->isSeccompDisabled() && $value)); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -233,26 +239,6 @@ class ConfigurationManager } } - public function isFulltextsearchEnabled() : bool { - $config = $this->GetConfig(); - if (isset($config['isFulltextsearchEnabled']) && $config['isFulltextsearchEnabled'] === 1) { - return true; - } else { - return false; - } - } - - public function SetFulltextsearchEnabledState(int $value) : void { - // Elasticsearch does not work on kernels without seccomp anymore. See https://github.com/nextcloud/all-in-one/discussions/5768 - if ($this->isSeccompDisabled()) { - $value = 0; - } - - $config = $this->GetConfig(); - $config['isFulltextsearchEnabled'] = $value; - $this->WriteConfig($config); - } - /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index bb397729..80154151 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -565,7 +565,7 @@ readonly class DockerActionManager { 'TIMEZONE' => $this->configurationManager->GetTimezone() === '' ? 'Etc/UTC' : $this->configurationManager->GetTimezone(), 'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(), 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled ? 'yes' : '', - 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled() ? 'yes' : '', + 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled ? 'yes' : '', 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->GetNextcloudUploadLimit(), 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->GetNextcloudMemoryLimit(), From 844163f332da9b4c2ddd6bf143a1c12d38981dbf Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:06:20 +0100 Subject: [PATCH 43/66] Make `domain` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Controller/DockerController.php | 2 +- php/src/Data/ConfigurationManager.php | 25 +++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 2b1d6af1..f3e8f940 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -91,7 +91,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ $skip_domain_validation = isset($params['skip_domain_validation']); return $view->render($response, 'containers.twig', [ - 'domain' => $configurationManager->GetDomain(), + 'domain' => $configurationManager->domain, 'apache_port' => $configurationManager->GetApachePort(), 'borg_backup_host_location' => $configurationManager->GetBorgBackupHostLocation(), 'borg_remote_repo' => $configurationManager->GetBorgRemoteRepo(), diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 640c190d..9c8b2d5a 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -257,7 +257,7 @@ readonly class DockerController { public function StartDomaincheckContainer() : void { # Don't start if domain is already set - if ($this->configurationManager->GetDomain() !== '' || $this->configurationManager->wasStartButtonClicked) { + if ($this->configurationManager->domain !== '' || $this->configurationManager->wasStartButtonClicked) { return; } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 43680ca9..d276ebb7 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -104,6 +104,11 @@ class ConfigurationManager set { $this->set('isFulltextsearchEnabled', ($this->isSeccompDisabled() && $value)); } } + public string $domain { + get => $this->get('domain', ''); + set { $this->SetDomain($value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -241,6 +246,8 @@ class ConfigurationManager /** * @throws InvalidSettingConfigurationException + * + * We can't turn this into a private validation method because of the second argument. */ public function SetDomain(string $domain, bool $skipDomainValidation) : void { // Validate that at least one dot is contained @@ -346,25 +353,19 @@ class ConfigurationManager } } - // Write domain $config = $this->GetConfig(); - $config['domain'] = $domain; // Reset the borg restore password when setting the domain $config['borg_restore_password'] = ''; $this->WriteConfig($config); - } - - public function GetDomain() : string { - $config = $this->GetConfig(); - if(!isset($config['domain'])) { - $config['domain'] = ''; - } - - return $config['domain']; + $this->setMultiple(function ($confManager) use ($domain) { + // Write domain + // Don't set the domain via the attribute, or we create a loop. + $confManager->set('domain', $domain); + }); } public function GetBaseDN() : string { - $domain = $this->GetDomain(); + $domain = $this->domain; if ($domain === "") { return ""; } From 042037c0646bc1c3257195075e3a042f79fab4f8 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:07:45 +0100 Subject: [PATCH 44/66] Make `borg_backup_host_location` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 2 +- php/src/Data/ConfigurationManager.php | 26 +++++++++++++------------- php/src/Docker/DockerActionManager.php | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index f3e8f940..eb214eff 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -93,7 +93,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ return $view->render($response, 'containers.twig', [ 'domain' => $configurationManager->domain, 'apache_port' => $configurationManager->GetApachePort(), - 'borg_backup_host_location' => $configurationManager->GetBorgBackupHostLocation(), + 'borg_backup_host_location' => $configurationManager->borg_backup_host_location, 'borg_remote_repo' => $configurationManager->GetBorgRemoteRepo(), 'borg_public_key' => $configurationManager->GetBorgPublicKey(), 'nextcloud_password' => $configurationManager->GetAndGenerateSecret('NEXTCLOUD_PASSWORD'), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index c0a799d5..5c500711 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -113,7 +113,7 @@ readonly class ContainerDefinitionFetcher { if (isset($entry['volumes'])) { foreach ($entry['volumes'] as $value) { if($value['source'] === '%BORGBACKUP_HOST_LOCATION%') { - $value['source'] = $this->configurationManager->GetBorgBackupHostLocation(); + $value['source'] = $this->configurationManager->borg_backup_host_location; if($value['source'] === '') { continue; } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index d276ebb7..1c93f51b 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -109,6 +109,11 @@ class ConfigurationManager set { $this->SetDomain($value); } } + public string $borg_backup_host_location { + get => $this->get('borg_backup_host_location', ''); + set { $this->set('borg_backup_host_location', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -379,9 +384,11 @@ class ConfigurationManager $this->ValidateBorgLocationVars($location, $repo); $config = $this->GetConfig(); - $config['borg_backup_host_location'] = $location; $config['borg_remote_repo'] = $repo; $this->WriteConfig($config); + $this->setMultiple(function ($confManager) use ($location) { + $confManager->borg_backup_host_location = $location; + }); } private function ValidateBorgLocationVars(string $location, string $repo) : void { @@ -428,9 +435,11 @@ class ConfigurationManager public function DeleteBorgBackupLocationItems() : void { // Delete the variables $config = $this->GetConfig(); - $config['borg_backup_host_location'] = ''; $config['borg_remote_repo'] = ''; $this->WriteConfig($config); + $this->setMultiple(function ($confManager) { + $confManager->borg_backup_host_location = ''; + }); // Also delete the borg config file to be able to start over if (file_exists(DataConst::GetBackupKeyFile())) { @@ -451,12 +460,12 @@ class ConfigurationManager } $config = $this->GetConfig(); - $config['borg_backup_host_location'] = $location; $config['borg_remote_repo'] = $repo; $config['borg_restore_password'] = $password; $this->WriteConfig($config); - $this->setMultiple(function ($confManager) { + $this->setMultiple(function ($confManager) use ($location) { + $confManager->borg_backup_host_location = $location; $confManager->instance_restore_attempt = true; }); } @@ -556,15 +565,6 @@ class ConfigurationManager return $envVariableOutput; } - public function GetBorgBackupHostLocation() : string { - $config = $this->GetConfig(); - if(!isset($config['borg_backup_host_location'])) { - $config['borg_backup_host_location'] = ''; - } - - return $config['borg_backup_host_location']; - } - public function GetBorgRemoteRepo() : string { $config = $this->GetConfig(); if(!isset($config['borg_remote_repo'])) { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 80154151..aae07d3b 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -574,7 +574,7 @@ readonly class DockerActionManager { 'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->configurationManager->GetFulltextsearchJavaOptions(), 'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->configurationManager->GetTrustedCacertsDir(), 'ADDITIONAL_DIRECTORIES_BACKUP' => $this->configurationManager->GetAdditionalBackupDirectoriesString() !== '' ? 'yes' : '', - 'BORGBACKUP_HOST_LOCATION' => $this->configurationManager->GetBorgBackupHostLocation(), + 'BORGBACKUP_HOST_LOCATION' => $this->configurationManager->borg_backup_host_location, 'APACHE_MAX_SIZE' => (string)($this->configurationManager->GetApacheMaxSize()), 'COLLABORA_SECCOMP_POLICY' => $this->configurationManager->GetCollaboraSeccompPolicy(), 'NEXTCLOUD_STARTUP_APPS' => $this->configurationManager->GetNextcloudStartupApps(), From 35824d4aca5c9f6dea102fad222cbad7c51b5d97 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:14:39 +0100 Subject: [PATCH 45/66] Make `borg_remote_repo` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 24 ++++++++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index eb214eff..16d274f9 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -94,7 +94,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'domain' => $configurationManager->domain, 'apache_port' => $configurationManager->GetApachePort(), 'borg_backup_host_location' => $configurationManager->borg_backup_host_location, - 'borg_remote_repo' => $configurationManager->GetBorgRemoteRepo(), + 'borg_remote_repo' => $configurationManager->borg_remote_repo, 'borg_public_key' => $configurationManager->GetBorgPublicKey(), 'nextcloud_password' => $configurationManager->GetAndGenerateSecret('NEXTCLOUD_PASSWORD'), 'containers' => (new \AIO\ContainerDefinitionFetcher($container->get(\AIO\Data\ConfigurationManager::class), $container))->FetchDefinition(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 1c93f51b..5dea0c6d 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -114,6 +114,11 @@ class ConfigurationManager set { $this->set('borg_backup_host_location', $value); } } + public string $borg_remote_repo { + get => $this->get('borg_remote_repo', ''); + set { $this->set('borg_remote_repo', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -384,10 +389,10 @@ class ConfigurationManager $this->ValidateBorgLocationVars($location, $repo); $config = $this->GetConfig(); - $config['borg_remote_repo'] = $repo; $this->WriteConfig($config); - $this->setMultiple(function ($confManager) use ($location) { + $this->setMultiple(function ($confManager) use ($location, $repo) { $confManager->borg_backup_host_location = $location; + $confManager->borg_remote_repo = $repo; }); } @@ -435,10 +440,10 @@ class ConfigurationManager public function DeleteBorgBackupLocationItems() : void { // Delete the variables $config = $this->GetConfig(); - $config['borg_remote_repo'] = ''; $this->WriteConfig($config); $this->setMultiple(function ($confManager) { $confManager->borg_backup_host_location = ''; + $confManager->borg_remote_repo = ''; }); // Also delete the borg config file to be able to start over @@ -460,12 +465,12 @@ class ConfigurationManager } $config = $this->GetConfig(); - $config['borg_remote_repo'] = $repo; $config['borg_restore_password'] = $password; $this->WriteConfig($config); - $this->setMultiple(function ($confManager) use ($location) { + $this->setMultiple(function ($confManager) use ($location, $repo) { $confManager->borg_backup_host_location = $location; + $confManager->borg_remote_repo = $repo; $confManager->instance_restore_attempt = true; }); } @@ -565,15 +570,6 @@ class ConfigurationManager return $envVariableOutput; } - public function GetBorgRemoteRepo() : string { - $config = $this->GetConfig(); - if(!isset($config['borg_remote_repo'])) { - $config['borg_remote_repo'] = ''; - } - - return $config['borg_remote_repo']; - } - public function GetBorgPublicKey() : string { if (!file_exists(DataConst::GetBackupPublicKey())) { return ""; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index aae07d3b..3dcd179e 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -545,7 +545,7 @@ readonly class DockerActionManager { 'NC_DOMAIN' => $this->configurationManager->GetDomain(), 'NC_BASE_DN' => $this->configurationManager->GetBaseDN(), 'AIO_TOKEN' => $this->configurationManager->AIO_TOKEN, - 'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->GetBorgRemoteRepo(), + 'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->borg_remote_repo, 'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(), 'AIO_URL' => $this->configurationManager->AIO_URL, 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '', From a83248d69f28c36a65ef862ed70f4ac0a59e383b Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:16:30 +0100 Subject: [PATCH 46/66] Make `borg_restore_password` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 23 +++++++++-------------- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 16d274f9..05c39f76 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -114,7 +114,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled, 'is_collabora_enabled' => $configurationManager->isCollaboraEnabled, 'is_talk_enabled' => $configurationManager->isTalkEnabled, - 'borg_restore_password' => $configurationManager->GetBorgRestorePassword(), + 'borg_restore_password' => $configurationManager->borg_restore_password, 'daily_backup_time' => $configurationManager->GetDailyBackupTime(), 'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(), 'timezone' => $configurationManager->GetTimezone(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 5dea0c6d..2091ddb5 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -119,6 +119,11 @@ class ConfigurationManager set { $this->set('borg_remote_repo', $value); } } + public string $borg_restore_password { + get => $this->get('borg_restore_password', ''); + set { $this->set('borg_restore_password', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -364,13 +369,13 @@ class ConfigurationManager } $config = $this->GetConfig(); - // Reset the borg restore password when setting the domain - $config['borg_restore_password'] = ''; $this->WriteConfig($config); $this->setMultiple(function ($confManager) use ($domain) { // Write domain // Don't set the domain via the attribute, or we create a loop. $confManager->set('domain', $domain); + // Reset the borg restore password when setting the domain + $confManager->borg_restore_password = ''; }); } @@ -465,12 +470,11 @@ class ConfigurationManager } $config = $this->GetConfig(); - $config['borg_restore_password'] = $password; $this->WriteConfig($config); - - $this->setMultiple(function ($confManager) use ($location, $repo) { + $this->setMultiple(function ($confManager) use ($location, $repo, $password) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; + $confManager->borg_restore_password = $password; $confManager->instance_restore_attempt = true; }); } @@ -578,15 +582,6 @@ class ConfigurationManager return trim((string)file_get_contents(DataConst::GetBackupPublicKey())); } - public function GetBorgRestorePassword() : string { - $config = $this->GetConfig(); - if(!isset($config['borg_restore_password'])) { - $config['borg_restore_password'] = ''; - } - - return $config['borg_restore_password']; - } - public function GetNextcloudMount() : string { $envVariableName = 'NEXTCLOUD_MOUNT'; $configName = 'nextcloud_mount'; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 3dcd179e..c2b9276b 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -555,7 +555,7 @@ readonly class DockerActionManager { 'TALK_PORT' => $this->configurationManager->GetTalkPort(), 'TURN_DOMAIN' => $this->configurationManager->GetTurnDomain(), 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), - 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->GetBorgRestorePassword(), + 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password, 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled ? 'yes' : '', 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled ? 'yes' : '', From d2e7d02a6f172253e7be2be7d631e00635b42f69 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:17:25 +0100 Subject: [PATCH 47/66] Make `timezone` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- .../Controller/ConfigurationController.php | 4 +-- php/src/Data/ConfigurationManager.php | 36 +++++++++---------- php/src/Docker/DockerActionManager.php | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 05c39f76..130d34d5 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -117,7 +117,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'borg_restore_password' => $configurationManager->borg_restore_password, 'daily_backup_time' => $configurationManager->GetDailyBackupTime(), 'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(), - 'timezone' => $configurationManager->GetTimezone(), + 'timezone' => $configurationManager->timezone, 'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation), 'talk_port' => $configurationManager->GetTalkPort(), 'collabora_dictionaries' => $configurationManager->GetCollaboraDictionaries(), diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index f707b750..b3a22547 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -67,12 +67,12 @@ readonly class ConfigurationController { } if (isset($request->getParsedBody()['delete_timezone'])) { - $this->configurationManager->DeleteTimezone(); + $this->configurationManager->deleteTimezone(); } if (isset($request->getParsedBody()['timezone'])) { $timezone = $request->getParsedBody()['timezone'] ?? ''; - $this->configurationManager->SetTimezone($timezone); + $this->configurationManager->timezone = $timezone; } if (isset($request->getParsedBody()['options-form'])) { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 2091ddb5..119e81ce 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -124,6 +124,18 @@ class ConfigurationManager set { $this->set('borg_restore_password', $value); } } + /** + * @throws InvalidSettingConfigurationException + */ + public string $timezone { + get => $this->get('timezone', ''); + set { + // This throws an exception if the validation fails. + $this->validateTimezone($value); + $this->set('timezone', $value); + } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -784,19 +796,10 @@ class ConfigurationManager return false; } - public function GetTimezone() : string { - $config = $this->GetConfig(); - if(!isset($config['timezone'])) { - $config['timezone'] = ''; - } - - return $config['timezone']; - } - /** * @throws InvalidSettingConfigurationException */ - public function SetTimezone(string $timezone) : void { + private function validateTimezone(string $timezone) : void { if ($timezone === "") { throw new InvalidSettingConfigurationException("The timezone must not be empty!"); } @@ -804,16 +807,13 @@ class ConfigurationManager if (!preg_match("#^[a-zA-Z0-9_\-\/\+]+$#", $timezone)) { throw new InvalidSettingConfigurationException("The entered timezone does not seem to be a valid timezone!"); } - - $config = $this->GetConfig(); - $config['timezone'] = $timezone; - $this->WriteConfig($config); } - public function DeleteTimezone() : void { - $config = $this->GetConfig(); - $config['timezone'] = ''; - $this->WriteConfig($config); + /** + * Provide an extra method since our `timezone` attribute setter prevents setting an empty timezone. + */ + public function deleteTimezone() : void { + $this->set('timezone', ''); } public function shouldDomainValidationBeSkipped(bool $skipDomainValidation) : bool { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index c2b9276b..9d64e2f4 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -562,7 +562,7 @@ readonly class DockerActionManager { 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled ? 'yes' : '', 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled ? 'yes' : '', 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', - 'TIMEZONE' => $this->configurationManager->GetTimezone() === '' ? 'Etc/UTC' : $this->configurationManager->GetTimezone(), + 'TIMEZONE' => $this->configurationManager->timezone === '' ? 'Etc/UTC' : $this->configurationManager->timezone, 'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(), 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled ? 'yes' : '', 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled ? 'yes' : '', From ff095e6d9af647a1ae4949fee9c5aea2419433a3 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:18:45 +0100 Subject: [PATCH 48/66] Make `collabora_dictionaries` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- .../Controller/ConfigurationController.php | 2 +- php/src/Data/ConfigurationManager.php | 34 +++++++++---------- php/src/Docker/DockerActionManager.php | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 130d34d5..dc0151e2 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -120,7 +120,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'timezone' => $configurationManager->timezone, 'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation), 'talk_port' => $configurationManager->GetTalkPort(), - 'collabora_dictionaries' => $configurationManager->GetCollaboraDictionaries(), + 'collabora_dictionaries' => $configurationManager->collabora_dictionaries, 'collabora_additional_options' => $configurationManager->GetAdditionalCollaboraOptions(), 'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(), 'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(), diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index b3a22547..96908a29 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -110,7 +110,7 @@ readonly class ConfigurationController { if (isset($request->getParsedBody()['collabora_dictionaries'])) { $collaboraDictionaries = $request->getParsedBody()['collabora_dictionaries'] ?? ''; - $this->configurationManager->SetCollaboraDictionaries($collaboraDictionaries); + $this->configurationManager->collabora_dictionaries = $collaboraDictionaries; } if (isset($request->getParsedBody()['delete_collabora_additional_options'])) { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 119e81ce..9f037ec4 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -136,6 +136,18 @@ class ConfigurationManager } } + /** + * @throws InvalidSettingConfigurationException + */ + public string $collabora_dictionaries { + get => $this->get('collabora_dictionaries', ''); + set { + // This throws an exception if the validation fails. + $this->validateCollaboraDictionaries($value); + $this->set('collabora_dictionaries', $value); + } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -831,19 +843,10 @@ class ConfigurationManager return 'deck twofactor_totp tasks calendar contacts notes'; } - public function GetCollaboraDictionaries() : string { - $config = $this->GetConfig(); - if(!isset($config['collabora_dictionaries'])) { - $config['collabora_dictionaries'] = ''; - } - - return $config['collabora_dictionaries']; - } - /** * @throws InvalidSettingConfigurationException */ - public function SetCollaboraDictionaries(string $CollaboraDictionaries) : void { + private function validateCollaboraDictionaries(string $CollaboraDictionaries) : void { if ($CollaboraDictionaries === "") { throw new InvalidSettingConfigurationException("The dictionaries must not be empty!"); } @@ -851,16 +854,13 @@ class ConfigurationManager if (!preg_match("#^[a-zA-Z_ ]+$#", $CollaboraDictionaries)) { throw new InvalidSettingConfigurationException("The entered dictionaries do not seem to be a valid!"); } - - $config = $this->GetConfig(); - $config['collabora_dictionaries'] = $CollaboraDictionaries; - $this->WriteConfig($config); } + /** + * Provide an extra method since the corresponding attribute setter prevents setting an empty value. + */ public function DeleteCollaboraDictionaries() : void { - $config = $this->GetConfig(); - $config['collabora_dictionaries'] = ''; - $this->WriteConfig($config); + $this->set('collabora_dictionaries', ''); } /** diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 9d64e2f4..31a1ca4d 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -563,7 +563,7 @@ readonly class DockerActionManager { 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled ? 'yes' : '', 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', 'TIMEZONE' => $this->configurationManager->timezone === '' ? 'Etc/UTC' : $this->configurationManager->timezone, - 'COLLABORA_DICTIONARIES' => $this->configurationManager->GetCollaboraDictionaries() === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->GetCollaboraDictionaries(), + 'COLLABORA_DICTIONARIES' => $this->configurationManager->collabora_dictionaries === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->collabora_dictionaries, 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled ? 'yes' : '', 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled ? 'yes' : '', 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', From 4cedde29360411303dbb0b165ec5cee608c58c4a Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:21:23 +0100 Subject: [PATCH 49/66] Make `collabora_additional_options` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- .../Controller/ConfigurationController.php | 4 +- php/src/Data/ConfigurationManager.php | 38 +++++++++---------- php/src/Docker/DockerActionManager.php | 4 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index dc0151e2..83d1d878 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -121,7 +121,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation), 'talk_port' => $configurationManager->GetTalkPort(), 'collabora_dictionaries' => $configurationManager->collabora_dictionaries, - 'collabora_additional_options' => $configurationManager->GetAdditionalCollaboraOptions(), + 'collabora_additional_options' => $configurationManager->collabora_additional_options, 'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(), 'is_backup_section_enabled' => $configurationManager->isBackupSectionEnabled(), 'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled, diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 96908a29..3be60af1 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -114,12 +114,12 @@ readonly class ConfigurationController { } if (isset($request->getParsedBody()['delete_collabora_additional_options'])) { - $this->configurationManager->DeleteAdditionalCollaboraOptions(); + $this->configurationManager->deleteAdditionalCollaboraOptions(); } if (isset($request->getParsedBody()['collabora_additional_options'])) { $additionalCollaboraOptions = $request->getParsedBody()['collabora_additional_options'] ?? ''; - $this->configurationManager->SetAdditionalCollaboraOptions($additionalCollaboraOptions); + $this->configurationManager->collabora_additional_options = $additionalCollaboraOptions; } if (isset($request->getParsedBody()['delete_borg_backup_location_vars'])) { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 9f037ec4..3c176556 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -148,6 +148,18 @@ class ConfigurationManager } } + /** + * @throws InvalidSettingConfigurationException + */ + public string $collabora_additional_options { + get => $this->get('collabora_additional_options', ''); + set { + // This throws an exception if the validation fails. + $this->validateCollaboraAdditionalOptions($value); + $this->set('collabora_additional_options', $value); + } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -866,7 +878,7 @@ class ConfigurationManager /** * @throws InvalidSettingConfigurationException */ - public function SetAdditionalCollaboraOptions(string $additionalCollaboraOptions) : void { + private function validateCollaboraAdditionalOptions(string $additionalCollaboraOptions) : void { if ($additionalCollaboraOptions === "") { throw new InvalidSettingConfigurationException("The additional options must not be empty!"); } @@ -874,32 +886,20 @@ class ConfigurationManager if (!preg_match("#^--o:#", $additionalCollaboraOptions)) { throw new InvalidSettingConfigurationException("The entered options must start with '--o:'. So the config does not seem to be a valid!"); } - - $config = $this->GetConfig(); - $config['collabora_additional_options'] = $additionalCollaboraOptions; - $this->WriteConfig($config); - } - - public function GetAdditionalCollaboraOptions() : string { - $config = $this->GetConfig(); - if(!isset($config['collabora_additional_options'])) { - $config['collabora_additional_options'] = ''; - } - - return $config['collabora_additional_options']; } public function isCollaboraSubscriptionEnabled() : bool { - if (str_contains($this->GetAdditionalCollaboraOptions(), '--o:support_key=')) { + if (str_contains($this->collabora_additional_options, '--o:support_key=')) { return true; } return false; } - public function DeleteAdditionalCollaboraOptions() : void { - $config = $this->GetConfig(); - $config['collabora_additional_options'] = ''; - $this->WriteConfig($config); + /** + * Provide an extra method since the corresponding attribute setter prevents setting an empty value. + */ + public function deleteAdditionalCollaboraOptions() : void { + $this->set('collabora_additional_options', ''); } public function GetApacheAdditionalNetwork() : string { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 31a1ca4d..443356cf 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -422,8 +422,8 @@ readonly class DockerActionManager { } // Additional Collabora options - if ($this->configurationManager->GetAdditionalCollaboraOptions() !== '') { - $requestBody['Cmd'] = [$this->configurationManager->GetAdditionalCollaboraOptions()]; + if ($this->configurationManager->collabora_additional_options !== '') { + $requestBody['Cmd'] = [$this->configurationManager->collabora_additional_options]; } } From 011f2f5a34f1c95f3b9b13feebf282da7e54f95c Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 15:44:22 +0100 Subject: [PATCH 50/66] Make `aio_community_containers` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 2 +- .../Controller/ConfigurationController.php | 2 +- php/src/Data/ConfigurationManager.php | 26 ++++--------------- php/src/Docker/DockerActionManager.php | 2 +- 5 files changed, 9 insertions(+), 25 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 83d1d878..2d3e4f03 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -138,7 +138,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_docker_socket_proxy_enabled' => $configurationManager->isDockerSocketProxyEnabled, 'is_whiteboard_enabled' => $configurationManager->isWhiteboardEnabled, 'community_containers' => $configurationManager->listAvailableCommunityContainers(), - 'community_containers_enabled' => $configurationManager->GetEnabledCommunityContainers(), + 'community_containers_enabled' => $configurationManager->aio_community_containers, 'bypass_container_update' => $bypass_container_update, ]); })->setName('profile'); diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index 5c500711..b4c694ec 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -41,7 +41,7 @@ readonly class ContainerDefinitionFetcher { $data = json_decode((string)file_get_contents(DataConst::GetContainersDefinitionPath()), true, 512, JSON_THROW_ON_ERROR); $additionalContainerNames = []; - foreach ($this->configurationManager->GetEnabledCommunityContainers() as $communityContainer) { + foreach ($this->configurationManager->aio_community_containers as $communityContainer) { if ($communityContainer !== '') { $path = DataConst::GetCommunityContainersDirectory() . '/' . $communityContainer . '/' . $communityContainer . '.json'; $additionalData = json_decode((string)file_get_contents($path), true, 512, JSON_THROW_ON_ERROR); diff --git a/php/src/Controller/ConfigurationController.php b/php/src/Controller/ConfigurationController.php index 3be60af1..0330d082 100644 --- a/php/src/Controller/ConfigurationController.php +++ b/php/src/Controller/ConfigurationController.php @@ -101,7 +101,7 @@ readonly class ConfigurationController { $enabledCC[] = $item; } } - $this->configurationManager->SetEnabledCommunityContainers($enabledCC); + $this->configurationManager->aio_community_containers = $enabledCC; } if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) { diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 3c176556..72f69086 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -160,6 +160,11 @@ class ConfigurationManager } } + public array $aio_community_containers { + get => explode(' ', $this->get('aio_community_containers', '')); + set { $this->set('aio_community_containers', implode(' ', $value)); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -931,16 +936,6 @@ class ConfigurationManager } } - private function GetCommunityContainers() : string { - $config = $this->GetConfig(); - if(!isset($config['aio_community_containers'])) { - $config['aio_community_containers'] = ''; - } - - return $config['aio_community_containers']; - } - - public function listAvailableCommunityContainers() : array { $cc = []; $dir = scandir(DataConst::GetCommunityContainersDirectory()); @@ -976,17 +971,6 @@ class ConfigurationManager return $cc; } - /** @return list */ - public function GetEnabledCommunityContainers(): array { - return explode(' ', $this->GetCommunityContainers()); - } - - public function SetEnabledCommunityContainers(array $enabledCommunityContainers) : void { - $config = $this->GetConfig(); - $config['aio_community_containers'] = implode(' ', $enabledCommunityContainers); - $this->WriteConfig($config); - } - private function GetEnabledDriDevice() : string { $envVariableName = 'NEXTCLOUD_ENABLE_DRI_DEVICE'; $configName = 'nextcloud_enable_dri_device'; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 443356cf..41a1b56f 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -585,7 +585,7 @@ readonly class DockerActionManager { // Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then) 'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'), // Allow to get local ip-address of caddy container and add it to trusted proxies automatically - 'CADDY_IP_ADDRESS' => in_array('caddy', $this->configurationManager->GetEnabledCommunityContainers(), true) ? gethostbyname('nextcloud-aio-caddy') : '', + 'CADDY_IP_ADDRESS' => in_array('caddy', $this->configurationManager->aio_community_containers, true) ? gethostbyname('nextcloud-aio-caddy') : '', 'WHITEBOARD_ENABLED' => $this->configurationManager->isWhiteboardEnabled ? 'yes' : '', default => $this->configurationManager->GetRegisteredSecret($placeholder), }; From 066666c75f3c93c5d71cbf310d8801a43bb627a5 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 12:23:22 +0100 Subject: [PATCH 51/66] Make `turn_domain` an attribute Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 14 +++++--------- php/src/Docker/DockerActionManager.php | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 72f69086..9362815a 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -165,6 +165,11 @@ class ConfigurationManager set { $this->set('aio_community_containers', implode(' ', $value)); } } + public string $turn_domain { + get => $this->get('turn_domain', ''); + set { $this->set('turn_domain', $value); } + } + public function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) @@ -562,15 +567,6 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } - public function GetTurnDomain() : string { - $config = $this->GetConfig(); - if(!isset($config['turn_domain'])) { - $config['turn_domain'] = ''; - } - - return $config['turn_domain']; - } - /** * @throws InvalidSettingConfigurationException */ diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 41a1b56f..2e3be6a6 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -553,7 +553,7 @@ readonly class DockerActionManager { 'APACHE_PORT' => $this->configurationManager->GetApachePort(), 'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(), 'TALK_PORT' => $this->configurationManager->GetTalkPort(), - 'TURN_DOMAIN' => $this->configurationManager->GetTurnDomain(), + 'TURN_DOMAIN' => $this->configurationManager->turn_domain, 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password, 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', From 1d51c93b877c783d12ebbc3d234c522a3972dcce Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:45:00 +0100 Subject: [PATCH 52/66] Make `apache_ip_binding` an attribute Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 12 +++++------- php/src/Docker/DockerActionManager.php | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 9362815a..7182602e 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -124,6 +124,11 @@ class ConfigurationManager set { $this->set('borg_restore_password', $value); } } + public string $apache_ip_binding { + get => $this->GetEnvironmentalVariableOrConfig('APACHE_IP_BINDING', 'apache_ip_binding', ''); + set { $this->set('apache_ip_binding', $value); } + } + /** * @throws InvalidSettingConfigurationException */ @@ -910,13 +915,6 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } - public function GetApacheIPBinding() : string { - $envVariableName = 'APACHE_IP_BINDING'; - $configName = 'apache_ip_binding'; - $defaultValue = ''; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); - } - private function GetDisableBackupSection() : string { $envVariableName = 'AIO_DISABLE_BACKUP_SECTION'; $configName = 'disable_backup_section'; diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 2e3be6a6..2cf7e66c 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -297,7 +297,7 @@ readonly class DockerActionManager { } $ipBinding = $value->ipBinding; if ($ipBinding === '%APACHE_IP_BINDING%') { - $ipBinding = $this->configurationManager->GetApacheIPBinding(); + $ipBinding = $this->configurationManager->apache_ip_binding; // Do not expose if AIO is in internal network mode if ($ipBinding === '@INTERNAL') { continue; @@ -551,7 +551,7 @@ readonly class DockerActionManager { 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '', 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, 'APACHE_PORT' => $this->configurationManager->GetApachePort(), - 'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(), + 'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding, 'TALK_PORT' => $this->configurationManager->GetTalkPort(), 'TURN_DOMAIN' => $this->configurationManager->turn_domain, 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), From 69e58db64261d59da943658c58c5b7e69f10688b Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:47:45 +0100 Subject: [PATCH 53/66] Make `apache_port` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 10 ++++------ php/src/Docker/DockerActionManager.php | 8 ++++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 2d3e4f03..27364a98 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -92,7 +92,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ return $view->render($response, 'containers.twig', [ 'domain' => $configurationManager->domain, - 'apache_port' => $configurationManager->GetApachePort(), + 'apache_port' => $configurationManager->apache_port, 'borg_backup_host_location' => $configurationManager->borg_backup_host_location, 'borg_remote_repo' => $configurationManager->borg_remote_repo, 'borg_public_key' => $configurationManager->GetBorgPublicKey(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 7182602e..aaef8e08 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -363,7 +363,7 @@ class ConfigurationManager } // Get the apache port - $port = $this->GetApachePort(); + $port = $this->apache_port; if (!filter_var($dnsRecordIP, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) { if ($port === '443') { @@ -558,11 +558,9 @@ class ConfigurationManager $this->set('password', $newPassword); } - public function GetApachePort() : string { - $envVariableName = 'APACHE_PORT'; - $configName = 'apache_port'; - $defaultValue = '443'; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + public string $apache_port { + get => $this->GetEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443'); + set { $this->set('apache_port', $value); } } public function GetTalkPort() : string { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 2cf7e66c..c87232da 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -115,7 +115,7 @@ readonly class DockerActionManager { $containerName = $container->GetIdentifier(); $internalPort = $container->GetInternalPort(); if ($internalPort === '%APACHE_PORT%') { - $internalPort = $this->configurationManager->GetApachePort(); + $internalPort = $this->configurationManager->apache_port; } elseif ($internalPort === '%TALK_PORT%') { $internalPort = $this->configurationManager->GetTalkPort(); } @@ -261,7 +261,7 @@ readonly class DockerActionManager { $port = $value->port; $protocol = $value->protocol; if ($port === '%APACHE_PORT%') { - $port = $this->configurationManager->GetApachePort(); + $port = $this->configurationManager->apache_port; // Do not expose udp if AIO is in reverse proxy mode if ($port !== '443' && $protocol === 'udp') { continue; @@ -283,7 +283,7 @@ readonly class DockerActionManager { $port = $value->port; $protocol = $value->protocol; if ($port === '%APACHE_PORT%') { - $port = $this->configurationManager->GetApachePort(); + $port = $this->configurationManager->apache_port; // Do not expose udp if AIO is in reverse proxy mode if ($port !== '443' && $protocol === 'udp') { continue; @@ -550,7 +550,7 @@ readonly class DockerActionManager { 'AIO_URL' => $this->configurationManager->AIO_URL, 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '', 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, - 'APACHE_PORT' => $this->configurationManager->GetApachePort(), + 'APACHE_PORT' => $this->configurationManager->apache_port, 'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding, 'TALK_PORT' => $this->configurationManager->GetTalkPort(), 'TURN_DOMAIN' => $this->configurationManager->turn_domain, From a987749cc7957abd4a65d20aa67e16f2ec35b2e5 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:52:24 +0100 Subject: [PATCH 54/66] Make `talk_port` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 10 ++++------ php/src/Docker/DockerActionManager.php | 8 ++++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 27364a98..718ad0ca 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -119,7 +119,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(), 'timezone' => $configurationManager->timezone, 'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation), - 'talk_port' => $configurationManager->GetTalkPort(), + 'talk_port' => $configurationManager->talk_port, 'collabora_dictionaries' => $configurationManager->collabora_dictionaries, 'collabora_additional_options' => $configurationManager->collabora_additional_options, 'automatic_updates' => $configurationManager->areAutomaticUpdatesEnabled(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index aaef8e08..fca733e9 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -562,12 +562,10 @@ class ConfigurationManager get => $this->GetEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443'); set { $this->set('apache_port', $value); } } - - public function GetTalkPort() : string { - $envVariableName = 'TALK_PORT'; - $configName = 'talk_port'; - $defaultValue = '3478'; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + + public string $talk_port { + get => $this->GetEnvironmentalVariableOrConfig('TALK_PORT', 'talk_port', '3478'); + set { $this->set('talk_port', $value); } } /** diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index c87232da..3d56fb0c 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -117,7 +117,7 @@ readonly class DockerActionManager { if ($internalPort === '%APACHE_PORT%') { $internalPort = $this->configurationManager->apache_port; } elseif ($internalPort === '%TALK_PORT%') { - $internalPort = $this->configurationManager->GetTalkPort(); + $internalPort = $this->configurationManager->talk_port; } if ($internalPort !== "" && $internalPort !== 'host') { @@ -267,7 +267,7 @@ readonly class DockerActionManager { continue; } } else if ($port === '%TALK_PORT%') { - $port = $this->configurationManager->GetTalkPort(); + $port = $this->configurationManager->talk_port; } $portWithProtocol = $port . '/' . $protocol; $exposedPorts[$portWithProtocol] = null; @@ -289,7 +289,7 @@ readonly class DockerActionManager { continue; } } else if ($port === '%TALK_PORT%') { - $port = $this->configurationManager->GetTalkPort(); + $port = $this->configurationManager->talk_port; // Skip publishing talk tcp port if it is set to 443 if ($port === '443' && $protocol === 'tcp') { continue; @@ -552,7 +552,7 @@ readonly class DockerActionManager { 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, 'APACHE_PORT' => $this->configurationManager->apache_port, 'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding, - 'TALK_PORT' => $this->configurationManager->GetTalkPort(), + 'TALK_PORT' => $this->configurationManager->talk_port, 'TURN_DOMAIN' => $this->configurationManager->turn_domain, 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password, From 41bd40712a7db4df79aee56f9a7d8fdeeb6e3807 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:54:14 +0100 Subject: [PATCH 55/66] Make `nextcloud_upload_limit` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 11 ++++------- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 718ad0ca..b14bb449 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -129,7 +129,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(), 'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(), 'nextcloud_mount' => $configurationManager->GetNextcloudMount(), - 'nextcloud_upload_limit' => $configurationManager->GetNextcloudUploadLimit(), + 'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit, 'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(), 'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(), 'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index fca733e9..f9525c09 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -634,13 +634,10 @@ class ConfigurationManager return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); } - public function GetNextcloudUploadLimit() : string { - $envVariableName = 'NEXTCLOUD_UPLOAD_LIMIT'; - $configName = 'nextcloud_upload_limit'; - $defaultValue = '16G'; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + public string $nextcloud_upload_limit { + get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_UPLOAD_LIMIT', 'nextcloud_upload_limit', '16G'); + set { $this->set('nextcloud_upload_limit', $value); } } - public function GetNextcloudMemoryLimit() : string { $envVariableName = 'NEXTCLOUD_MEMORY_LIMIT'; $configName = 'nextcloud_memory_limit'; @@ -649,7 +646,7 @@ class ConfigurationManager } public function GetApacheMaxSize() : int { - $uploadLimit = (int)rtrim($this->GetNextcloudUploadLimit(), 'G'); + $uploadLimit = (int)rtrim($this->nextcloud_upload_limit, 'G'); return $uploadLimit * 1024 * 1024 * 1024; } diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 3d56fb0c..895186b8 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -567,7 +567,7 @@ readonly class DockerActionManager { 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled ? 'yes' : '', 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled ? 'yes' : '', 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', - 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->GetNextcloudUploadLimit(), + 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->nextcloud_upload_limit, 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->GetNextcloudMemoryLimit(), 'NEXTCLOUD_MAX_TIME' => $this->configurationManager->GetNextcloudMaxTime(), 'BORG_RETENTION_POLICY' => $this->configurationManager->GetBorgRetentionPolicy(), From 95fed23ce32a30b16eecb0ea1a5bbe3a501af39f Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:53:22 +0100 Subject: [PATCH 56/66] Make `nextcloud_mount` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 4 ++-- php/src/Data/ConfigurationManager.php | 8 +++----- php/src/Docker/DockerActionManager.php | 6 +++--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index b14bb449..a87449fc 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -128,7 +128,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled, 'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(), 'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(), - 'nextcloud_mount' => $configurationManager->GetNextcloudMount(), + 'nextcloud_mount' => $configurationManager->nextcloud_mount, 'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit, 'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(), 'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index b4c694ec..d6671a1d 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -119,7 +119,7 @@ readonly class ContainerDefinitionFetcher { } } if($value['source'] === '%NEXTCLOUD_MOUNT%') { - $value['source'] = $this->configurationManager->GetNextcloudMount(); + $value['source'] = $this->configurationManager->nextcloud_mount; if($value['source'] === '') { continue; } @@ -140,7 +140,7 @@ readonly class ContainerDefinitionFetcher { } } if ($value['destination'] === '%NEXTCLOUD_MOUNT%') { - $value['destination'] = $this->configurationManager->GetNextcloudMount(); + $value['destination'] = $this->configurationManager->nextcloud_mount; if($value['destination'] === '') { continue; } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index f9525c09..da823439 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -620,11 +620,9 @@ class ConfigurationManager return trim((string)file_get_contents(DataConst::GetBackupPublicKey())); } - public function GetNextcloudMount() : string { - $envVariableName = 'NEXTCLOUD_MOUNT'; - $configName = 'nextcloud_mount'; - $defaultValue = ''; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + public string $nextcloud_mount { + get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MOUNT', 'nextcloud_mount', ''); + set { $this->set('nextcloud_mount', $value); } } public function GetNextcloudDatadirMount() : string { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 895186b8..d49101a1 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -205,7 +205,7 @@ readonly class DockerActionManager { foreach ($container->GetVolumes()->GetVolumes() as $volume) { // // NEXTCLOUD_MOUNT gets added via bind-mount later on // if ($container->GetIdentifier() === 'nextcloud-aio-nextcloud') { - // if ($volume->name === $this->configurationManager->GetNextcloudMount()) { + // if ($volume->name === $this->configurationManager->nextcloud_mount) { // continue; // } // } @@ -403,7 +403,7 @@ readonly class DockerActionManager { // // Special things for the nextcloud container which should not be exposed in the containers.json // } elseif ($container->GetIdentifier() === 'nextcloud-aio-nextcloud') { // foreach ($container->GetVolumes()->GetVolumes() as $volume) { - // if ($volume->name !== $this->configurationManager->GetNextcloudMount()) { + // if ($volume->name !== $this->configurationManager->nextcloud_mount) { // continue; // } // $mounts[] = ["Type" => "bind", "Source" => $volume->name, "Target" => $volume->mountPoint, "ReadOnly" => !$volume->isWritable, "BindOptions" => [ "Propagation" => "rshared"]]; @@ -554,7 +554,7 @@ readonly class DockerActionManager { 'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding, 'TALK_PORT' => $this->configurationManager->talk_port, 'TURN_DOMAIN' => $this->configurationManager->turn_domain, - 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), + 'NEXTCLOUD_MOUNT' => $this->configurationManager->nextcloud_mount, 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password, 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled ? 'yes' : '', From ab07bc7ca32759ad1c3c748ef00a6a5266b4ca9b Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:51:30 +0100 Subject: [PATCH 57/66] Make `nextcloud_datadir_mount` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/ContainerDefinitionFetcher.php | 2 +- php/src/Data/ConfigurationManager.php | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index a87449fc..e312a7df 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -127,7 +127,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled, 'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled, 'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(), - 'nextcloud_datadir' => $configurationManager->GetNextcloudDatadirMount(), + 'nextcloud_datadir' => $configurationManager->nextcloud_datadir_mount, 'nextcloud_mount' => $configurationManager->nextcloud_mount, 'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit, 'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(), diff --git a/php/src/ContainerDefinitionFetcher.php b/php/src/ContainerDefinitionFetcher.php index d6671a1d..fda8a7f9 100644 --- a/php/src/ContainerDefinitionFetcher.php +++ b/php/src/ContainerDefinitionFetcher.php @@ -124,7 +124,7 @@ readonly class ContainerDefinitionFetcher { continue; } } elseif ($value['source'] === '%NEXTCLOUD_DATADIR%') { - $value['source'] = $this->configurationManager->GetNextcloudDatadirMount(); + $value['source'] = $this->configurationManager->nextcloud_datadir_mount; if ($value['source'] === '') { continue; } diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index da823439..b2dd40fb 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -473,8 +473,8 @@ class ConfigurationManager // Prevent backup to be contained in Nextcloud Datadir as this will delete the backup archive upon restore // See https://github.com/nextcloud/all-in-one/issues/6607 - if (str_starts_with($location . '/', rtrim($this->GetNextcloudDatadirMount(), '/') . '/')) { - throw new InvalidSettingConfigurationException("The path must not be a children of or equal to NEXTCLOUD_DATADIR, which is currently set to " . $this->GetNextcloudDatadirMount()); + if (str_starts_with($location . '/', rtrim($this->nextcloud_datadir_mount, '/') . '/')) { + throw new InvalidSettingConfigurationException("The path must not be a children of or equal to NEXTCLOUD_DATADIR, which is currently set to " . $this->nextcloud_datadir_mount); } } else { @@ -625,11 +625,10 @@ class ConfigurationManager set { $this->set('nextcloud_mount', $value); } } - public function GetNextcloudDatadirMount() : string { - $envVariableName = 'NEXTCLOUD_DATADIR'; - $configName = 'nextcloud_datadir'; - $defaultValue = 'nextcloud_aio_nextcloud_data'; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + + public string $nextcloud_datadir_mount { + get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_DATADIR', 'nextcloud_datadir', 'nextcloud_aio_nextcloud_data'); + set { $this->set('nextcloud_datadir_mount', $value); } } public string $nextcloud_upload_limit { From 6d14bebf20fe34b6f3a903409031e6c707d8db1e Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:54:54 +0100 Subject: [PATCH 58/66] Make `nextcloud_memory_limit` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 9 ++++----- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index e312a7df..7bace4ac 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -131,7 +131,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'nextcloud_mount' => $configurationManager->nextcloud_mount, 'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit, 'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(), - 'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(), + 'nextcloud_memory_limit' => $configurationManager->nextcloud_memory_limit, 'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(), 'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(), 'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled, diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index b2dd40fb..c466bb3c 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -635,11 +635,10 @@ class ConfigurationManager get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_UPLOAD_LIMIT', 'nextcloud_upload_limit', '16G'); set { $this->set('nextcloud_upload_limit', $value); } } - public function GetNextcloudMemoryLimit() : string { - $envVariableName = 'NEXTCLOUD_MEMORY_LIMIT'; - $configName = 'nextcloud_memory_limit'; - $defaultValue = '512M'; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + + public string $nextcloud_memory_limit { + get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MEMORY_LIMIT', 'nextcloud_memory_limit', '512M'); + set { $this->set('nextcloud_memory_limit', $value); } } public function GetApacheMaxSize() : int { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index d49101a1..3a5a562e 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -568,7 +568,7 @@ readonly class DockerActionManager { 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled ? 'yes' : '', 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->nextcloud_upload_limit, - 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->GetNextcloudMemoryLimit(), + 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->nextcloud_memory_limit, 'NEXTCLOUD_MAX_TIME' => $this->configurationManager->GetNextcloudMaxTime(), 'BORG_RETENTION_POLICY' => $this->configurationManager->GetBorgRetentionPolicy(), 'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->configurationManager->GetFulltextsearchJavaOptions(), From 5e6d3d75855b0dbd5dfe2ce2cf02c9f581c828cc Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 12:55:58 +0100 Subject: [PATCH 59/66] Make `nextcloud_max_time` an attribute Signed-off-by: Pablo Zmdl --- php/public/index.php | 2 +- php/src/Data/ConfigurationManager.php | 8 +++----- php/src/Docker/DockerActionManager.php | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/php/public/index.php b/php/public/index.php index 7bace4ac..d4f4799f 100644 --- a/php/public/index.php +++ b/php/public/index.php @@ -130,7 +130,7 @@ $app->get('/containers', function (Request $request, Response $response, array $ 'nextcloud_datadir' => $configurationManager->nextcloud_datadir_mount, 'nextcloud_mount' => $configurationManager->nextcloud_mount, 'nextcloud_upload_limit' => $configurationManager->nextcloud_upload_limit, - 'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(), + 'nextcloud_max_time' => $configurationManager->nextcloud_max_time, 'nextcloud_memory_limit' => $configurationManager->nextcloud_memory_limit, 'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(), 'is_nvidia_gpu_enabled' => $configurationManager->isNvidiaGpuEnabled(), diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index c466bb3c..44c8cc62 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -646,11 +646,9 @@ class ConfigurationManager return $uploadLimit * 1024 * 1024 * 1024; } - public function GetNextcloudMaxTime() : string { - $envVariableName = 'NEXTCLOUD_MAX_TIME'; - $configName = 'nextcloud_max_time'; - $defaultValue = '3600'; - return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); + public string $nextcloud_max_time { + get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MAX_TIME', 'nextcloud_max_time', '3600'); + set { $this->set('nextcloud_max_time', $value); } } public function GetBorgRetentionPolicy() : string { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 3a5a562e..1bcb928a 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -569,7 +569,7 @@ readonly class DockerActionManager { 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->nextcloud_upload_limit, 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->nextcloud_memory_limit, - 'NEXTCLOUD_MAX_TIME' => $this->configurationManager->GetNextcloudMaxTime(), + 'NEXTCLOUD_MAX_TIME' => $this->configurationManager->nextcloud_max_time, 'BORG_RETENTION_POLICY' => $this->configurationManager->GetBorgRetentionPolicy(), 'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->configurationManager->GetFulltextsearchJavaOptions(), 'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->configurationManager->GetTrustedCacertsDir(), From 1c38926b6fa73a97721da4feab9667dab5b75159 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 14:28:15 +0100 Subject: [PATCH 60/66] Privatize GetConfig() and WriteConfig() Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 44c8cc62..e172d19b 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -175,7 +175,7 @@ class ConfigurationManager set { $this->set('turn_domain', $value); } } - public function GetConfig() : array + private function GetConfig() : array { if ($this->config === [] && file_exists(DataConst::GetConfigFile())) { @@ -571,10 +571,7 @@ class ConfigurationManager /** * @throws InvalidSettingConfigurationException */ - public function WriteConfig(?array $config) : void { - if ($config) { - $this->config = $config; - } + private function WriteConfig() : void { if(!is_dir(DataConst::GetDataDirectory())) { throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not exist! Something was set up falsely!"); } From 5c649c8b9d52d2179564e28beb424046ca651d7b Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 18:28:58 +0100 Subject: [PATCH 61/66] Remove residue code Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index e172d19b..b30e6fc3 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -419,8 +419,6 @@ class ConfigurationManager } } - $config = $this->GetConfig(); - $this->WriteConfig($config); $this->setMultiple(function ($confManager) use ($domain) { // Write domain // Don't set the domain via the attribute, or we create a loop. @@ -443,9 +441,6 @@ class ConfigurationManager */ public function SetBorgLocationVars(string $location, string $repo) : void { $this->ValidateBorgLocationVars($location, $repo); - - $config = $this->GetConfig(); - $this->WriteConfig($config); $this->setMultiple(function ($confManager) use ($location, $repo) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; @@ -495,8 +490,6 @@ class ConfigurationManager public function DeleteBorgBackupLocationItems() : void { // Delete the variables - $config = $this->GetConfig(); - $this->WriteConfig($config); $this->setMultiple(function ($confManager) { $confManager->borg_backup_host_location = ''; $confManager->borg_remote_repo = ''; @@ -520,8 +513,6 @@ class ConfigurationManager throw new InvalidSettingConfigurationException("Please enter the password!"); } - $config = $this->GetConfig(); - $this->WriteConfig($config); $this->setMultiple(function ($confManager) use ($location, $repo, $password) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; From adc70bceb7387bf0aef58796448255e7f6a9e4a3 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 16:31:29 +0100 Subject: [PATCH 62/66] Set multiple attributes at once Signed-off-by: Pablo Zmdl --- php/src/Controller/DockerController.php | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 9c8b2d5a..510c373b 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -123,9 +123,11 @@ readonly class DockerController { } public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { - $this->configurationManager->backupMode = 'restore'; - $this->configurationManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; - $this->configurationManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']); + $this->configurationManager->setMultiple(function ($confManager) use ($request) { + $confManager->backupMode = 'restore'; + $confManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; + $confManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']); + }); $id = self::TOP_CONTAINER; $forceStopNextcloud = true; @@ -150,8 +152,10 @@ readonly class DockerController { } public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response { - $this->configurationManager->backupMode = 'test'; - $this->configurationManager->instance_restore_attempt = false; + $this->configurationManager->setMultiple(function ($confManager) { + $confManager->backupMode = 'test'; + $confManager->instance_restore_attempt = false; + }); $id = self::TOP_CONTAINER; $this->PerformRecursiveContainerStop($id); @@ -173,12 +177,13 @@ readonly class DockerController { $port = 443; } - $this->configurationManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']); - // set AIO_URL - $this->configurationManager->AIO_URL = $host . ':' . (string)$port . $path; - // set wasStartButtonClicked - $this->configurationManager->wasStartButtonClicked = true; - + $this->configurationManager->setMultiple(function ($confManager) use ($request, $host, $port, $path) { + $confManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']); + // set AIO_URL + $confManager->AIO_URL = $host . ':' . (string)$port . $path; + // set wasStartButtonClicked + $confManager->wasStartButtonClicked = true; + }); // Do not pull container images in case 'bypass_container_update' is set via url params // Needed for local testing $pullImage = !isset($request->getParsedBody()['bypass_container_update']); From 7bcca1359d931d20af67b4ee2b0563fb143d0c40 Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 09:27:43 +0100 Subject: [PATCH 63/66] Move handling ENV-var replacement into ConfigurationManger It's the more appropriate place to have this code, and we had to touch it anyways to make it assign the values to the attributes. Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 93 ++++++++++++++++++++++++++ php/src/Docker/DockerActionManager.php | 88 +----------------------- 2 files changed, 95 insertions(+), 86 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index b30e6fc3..2cbae5cc 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -980,4 +980,97 @@ class ConfigurationManager return true; } } + + public function setAioVariables(array $input) : void { + if ($input === []) { + return; + } + $this->setMultiple(function($confManager) use ($input) { + foreach ($input as $variable) { + $keyWithValue = $confManager->replaceEnvPlaceholders($variable); + [$key, $value] = explode('=', $keyWithValue, 2); + // Set if there's an attribute corresponding to the key. + if (isset($key, $confManager->$key)) { + $confManager->$key = $value; + } + } + }); + } + + // + // Replaces placeholders in $envValue with their values. + // E.g. "%NC_DOMAIN%:%APACHE_PORT" becomes "my.nextcloud.com:11000" + public function replaceEnvPlaceholders(string $envValue): string { + // $pattern breaks down as: + // % - matches a literal percent sign + // ([^%]+) - capture group that matches one or more characters that are NOT percent signs + // % - matches the closing percent sign + // + // Assumes literal percent signs are always matched and there is no + // escaping. + $pattern = '/%([^%]+)%/'; + $matchCount = preg_match_all($pattern, $envValue, $matches); + + if ($matchCount === 0) { + return $envValue; + } + + $placeholders = $matches[0]; // ["%PLACEHOLDER1%", "%PLACEHOLDER2%", ...] + $placeholderNames = $matches[1]; // ["PLACEHOLDER1", "PLACEHOLDER2", ...] + $placeholderPatterns = array_map(static fn(string $p) => '/' . preg_quote($p) . '/', $placeholders); // ["/%PLACEHOLDER1%/", ...] + $placeholderValues = array_map($this->getPlaceholderValue(...), $placeholderNames); // ["val1", "val2"] + // Guaranteed to be non-null because we found the placeholders in the preg_match_all. + return (string) preg_replace($placeholderPatterns, $placeholderValues, $envValue); + } + + private function getPlaceholderValue(string $placeholder) : string { + return match ($placeholder) { + 'NC_DOMAIN' => $this->domain, + 'NC_BASE_DN' => $this->GetBaseDN(), + 'AIO_TOKEN' => $this->AIO_TOKEN, + 'BORGBACKUP_REMOTE_REPO' => $this->borg_remote_repo, + 'BORGBACKUP_MODE' => $this->backupMode, + 'AIO_URL' => $this->AIO_URL, + 'SELECTED_RESTORE_TIME' => $this->selectedRestoreTime, + 'RESTORE_EXCLUDE_PREVIEWS' => $this->restoreExcludePreviews ? '1' : '', + 'APACHE_PORT' => $this->apache_port, + 'APACHE_IP_BINDING' => $this->apache_ip_binding, + 'TALK_PORT' => $this->talk_port, + 'TURN_DOMAIN' => $this->turn_domain, + 'NEXTCLOUD_MOUNT' => $this->nextcloud_mount, + 'BACKUP_RESTORE_PASSWORD' => $this->borg_restore_password, + 'CLAMAV_ENABLED' => $this->isClamavEnabled ? 'yes' : '', + 'TALK_RECORDING_ENABLED' => $this->isTalkRecordingEnabled ? 'yes' : '', + 'ONLYOFFICE_ENABLED' => $this->isOnlyofficeEnabled ? 'yes' : '', + 'COLLABORA_ENABLED' => $this->isCollaboraEnabled ? 'yes' : '', + 'TALK_ENABLED' => $this->isTalkEnabled ? 'yes' : '', + 'UPDATE_NEXTCLOUD_APPS' => ($this->isDailyBackupRunning() && $this->areAutomaticUpdatesEnabled()) ? 'yes' : '', + 'TIMEZONE' => $this->timezone === '' ? 'Etc/UTC' : $this->timezone, + 'COLLABORA_DICTIONARIES' => $this->collabora_dictionaries === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->collabora_dictionaries, + 'IMAGINARY_ENABLED' => $this->isImaginaryEnabled ? 'yes' : '', + 'FULLTEXTSEARCH_ENABLED' => $this->isFulltextsearchEnabled ? 'yes' : '', + 'DOCKER_SOCKET_PROXY_ENABLED' => $this->isDockerSocketProxyEnabled ? 'yes' : '', + 'NEXTCLOUD_UPLOAD_LIMIT' => $this->nextcloud_upload_limit, + 'NEXTCLOUD_MEMORY_LIMIT' => $this->nextcloud_memory_limit, + 'NEXTCLOUD_MAX_TIME' => $this->nextcloud_max_time, + 'BORG_RETENTION_POLICY' => $this->GetBorgRetentionPolicy(), + 'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->GetFulltextsearchJavaOptions(), + 'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->GetTrustedCacertsDir(), + 'ADDITIONAL_DIRECTORIES_BACKUP' => $this->GetAdditionalBackupDirectoriesString() !== '' ? 'yes' : '', + 'BORGBACKUP_HOST_LOCATION' => $this->borg_backup_host_location, + 'APACHE_MAX_SIZE' => (string)($this->GetApacheMaxSize()), + 'COLLABORA_SECCOMP_POLICY' => $this->GetCollaboraSeccompPolicy(), + 'NEXTCLOUD_STARTUP_APPS' => $this->GetNextcloudStartupApps(), + 'NEXTCLOUD_ADDITIONAL_APKS' => $this->GetNextcloudAdditionalApks(), + 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->GetNextcloudAdditionalPhpExtensions(), + 'INSTALL_LATEST_MAJOR' => $this->install_latest_major ? 'yes' : '', + 'REMOVE_DISABLED_APPS' => $this->shouldDisabledAppsGetRemoved() ? 'yes' : '', + // Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then) + 'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'), + // Allow to get local ip-address of caddy container and add it to trusted proxies automatically + 'CADDY_IP_ADDRESS' => in_array('caddy', $this->aio_community_containers, true) ? gethostbyname('nextcloud-aio-caddy') : '', + 'WHITEBOARD_ENABLED' => $this->isWhiteboardEnabled ? 'yes' : '', + default => $this->GetRegisteredSecret($placeholder), + }; + } } diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 1bcb928a..7d0d54bd 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -228,15 +228,7 @@ readonly class DockerActionManager { $requestBody['HostConfig']['Binds'] = $volumes; } - $aioVariables = $container->GetAioVariables()->GetVariables(); - foreach ($aioVariables as $variable) { - $config = $this->configurationManager->GetConfig(); - $variable = $this->replaceEnvPlaceholders($variable); - $variableArray = explode('=', $variable); - $config[$variableArray[0]] = $variableArray[1]; - $this->configurationManager->WriteConfig($config); - sleep(1); - } + $this->configurationManager->setAioVariables($container->GetAioVariables()->GetVariables()); $envs = $container->GetEnvironmentVariables()->GetVariables(); // Special thing for the nextcloud container @@ -244,7 +236,7 @@ readonly class DockerActionManager { $envs[] = $this->GetAllNextcloudExecCommands(); } foreach ($envs as $key => $env) { - $envs[$key] = $this->replaceEnvPlaceholders($env); + $envs[$key] = $this->configurationManager->replaceEnvPlaceholders($env); } if (count($envs) > 0) { @@ -515,82 +507,6 @@ readonly class DockerActionManager { } } - // Replaces placeholders in $envValue with their values. - // E.g. "%NC_DOMAIN%:%APACHE_PORT" becomes "my.nextcloud.com:11000" - private function replaceEnvPlaceholders(string $envValue): string { - // $pattern breaks down as: - // % - matches a literal percent sign - // ([^%]+) - capture group that matches one or more characters that are NOT percent signs - // % - matches the closing percent sign - // - // Assumes literal percent signs are always matched and there is no - // escaping. - $pattern = '/%([^%]+)%/'; - $matchCount = preg_match_all($pattern, $envValue, $matches); - - if ($matchCount === 0) { - return $envValue; - } - - $placeholders = $matches[0]; // ["%PLACEHOLDER1%", "%PLACEHOLDER2%", ...] - $placeholderNames = $matches[1]; // ["PLACEHOLDER1", "PLACEHOLDER2", ...] - $placeholderPatterns = array_map(static fn(string $p) => '/' . preg_quote($p) . '/', $placeholders); // ["/%PLACEHOLDER1%/", ...] - $placeholderValues = array_map($this->getPlaceholderValue(...), $placeholderNames); // ["val1", "val2"] - // Guaranteed to be non-null because we found the placeholders in the preg_match_all. - return (string) preg_replace($placeholderPatterns, $placeholderValues, $envValue); - } - - private function getPlaceholderValue(string $placeholder) : string { - return match ($placeholder) { - 'NC_DOMAIN' => $this->configurationManager->GetDomain(), - 'NC_BASE_DN' => $this->configurationManager->GetBaseDN(), - 'AIO_TOKEN' => $this->configurationManager->AIO_TOKEN, - 'BORGBACKUP_REMOTE_REPO' => $this->configurationManager->borg_remote_repo, - 'BORGBACKUP_MODE' => $this->configurationManager->GetBackupMode(), - 'AIO_URL' => $this->configurationManager->AIO_URL, - 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '', - 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, - 'APACHE_PORT' => $this->configurationManager->apache_port, - 'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding, - 'TALK_PORT' => $this->configurationManager->talk_port, - 'TURN_DOMAIN' => $this->configurationManager->turn_domain, - 'NEXTCLOUD_MOUNT' => $this->configurationManager->nextcloud_mount, - 'BACKUP_RESTORE_PASSWORD' => $this->configurationManager->borg_restore_password, - 'CLAMAV_ENABLED' => $this->configurationManager->isClamavEnabled ? 'yes' : '', - 'TALK_RECORDING_ENABLED' => $this->configurationManager->isTalkRecordingEnabled ? 'yes' : '', - 'ONLYOFFICE_ENABLED' => $this->configurationManager->isOnlyofficeEnabled ? 'yes' : '', - 'COLLABORA_ENABLED' => $this->configurationManager->isCollaboraEnabled ? 'yes' : '', - 'TALK_ENABLED' => $this->configurationManager->isTalkEnabled ? 'yes' : '', - 'UPDATE_NEXTCLOUD_APPS' => ($this->configurationManager->isDailyBackupRunning() && $this->configurationManager->areAutomaticUpdatesEnabled()) ? 'yes' : '', - 'TIMEZONE' => $this->configurationManager->timezone === '' ? 'Etc/UTC' : $this->configurationManager->timezone, - 'COLLABORA_DICTIONARIES' => $this->configurationManager->collabora_dictionaries === '' ? 'de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru' : $this->configurationManager->collabora_dictionaries, - 'IMAGINARY_ENABLED' => $this->configurationManager->isImaginaryEnabled ? 'yes' : '', - 'FULLTEXTSEARCH_ENABLED' => $this->configurationManager->isFulltextsearchEnabled ? 'yes' : '', - 'DOCKER_SOCKET_PROXY_ENABLED' => $this->configurationManager->isDockerSocketProxyEnabled ? 'yes' : '', - 'NEXTCLOUD_UPLOAD_LIMIT' => $this->configurationManager->nextcloud_upload_limit, - 'NEXTCLOUD_MEMORY_LIMIT' => $this->configurationManager->nextcloud_memory_limit, - 'NEXTCLOUD_MAX_TIME' => $this->configurationManager->nextcloud_max_time, - 'BORG_RETENTION_POLICY' => $this->configurationManager->GetBorgRetentionPolicy(), - 'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->configurationManager->GetFulltextsearchJavaOptions(), - 'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->configurationManager->GetTrustedCacertsDir(), - 'ADDITIONAL_DIRECTORIES_BACKUP' => $this->configurationManager->GetAdditionalBackupDirectoriesString() !== '' ? 'yes' : '', - 'BORGBACKUP_HOST_LOCATION' => $this->configurationManager->borg_backup_host_location, - 'APACHE_MAX_SIZE' => (string)($this->configurationManager->GetApacheMaxSize()), - 'COLLABORA_SECCOMP_POLICY' => $this->configurationManager->GetCollaboraSeccompPolicy(), - 'NEXTCLOUD_STARTUP_APPS' => $this->configurationManager->GetNextcloudStartupApps(), - 'NEXTCLOUD_ADDITIONAL_APKS' => $this->configurationManager->GetNextcloudAdditionalApks(), - 'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->configurationManager->GetNextcloudAdditionalPhpExtensions(), - 'INSTALL_LATEST_MAJOR' => $this->configurationManager->install_latest_major ? 'yes' : '', - 'REMOVE_DISABLED_APPS' => $this->configurationManager->shouldDisabledAppsGetRemoved() ? 'yes' : '', - // Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then) - 'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'), - // Allow to get local ip-address of caddy container and add it to trusted proxies automatically - 'CADDY_IP_ADDRESS' => in_array('caddy', $this->configurationManager->aio_community_containers, true) ? gethostbyname('nextcloud-aio-caddy') : '', - 'WHITEBOARD_ENABLED' => $this->configurationManager->isWhiteboardEnabled ? 'yes' : '', - default => $this->configurationManager->GetRegisteredSecret($placeholder), - }; - } - private function isContainerUpdateAvailable(string $id): string { $container = $this->containerDefinitionFetcher->GetContainerById($id); From e4508a6ec148ae150ff142f361d2156360948d8f Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Mon, 19 Jan 2026 15:18:13 +0100 Subject: [PATCH 64/66] Simplify some code a little bit Signed-off-by: Pablo Zmdl --- php/src/Data/ConfigurationManager.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 2cbae5cc..19ff0b74 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -697,10 +697,7 @@ class ConfigurationManager } public function isSeccompDisabled() : bool { - if ($this->GetCollaboraSeccompDisabledState() === 'true') { - return true; - } - return false; + return $this->GetCollaboraSeccompDisabledState() === 'true'; } /** @@ -795,10 +792,7 @@ class ConfigurationManager } public function isDailyBackupRunning() : bool { - if (file_exists(DataConst::GetDailyBackupBlockFile())) { - return true; - } - return false; + return file_exists(DataConst::GetDailyBackupBlockFile()); } /** @@ -870,10 +864,7 @@ class ConfigurationManager } public function isCollaboraSubscriptionEnabled() : bool { - if (str_contains($this->collabora_additional_options, '--o:support_key=')) { - return true; - } - return false; + return str_contains($this->collabora_additional_options, '--o:support_key='); } /** From d82e85fa259d7073e325ae98793e01419c579f4b Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 19:36:39 +0100 Subject: [PATCH 65/66] Make psalm accept the property-hooks for virtual attributes Signed-off-by: Pablo Zmdl --- php/psalm.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/php/psalm.xml b/php/psalm.xml index d7ce38c9..576d82d2 100644 --- a/php/psalm.xml +++ b/php/psalm.xml @@ -20,5 +20,10 @@ + + + + + From 250e5a0c1ea9f0a6fa7eec4ab4eeb69fe84c546c Mon Sep 17 00:00:00 2001 From: Pablo Zmdl Date: Tue, 20 Jan 2026 19:34:52 +0100 Subject: [PATCH 66/66] Type for Closure argument Signed-off-by: Pablo Zmdl --- php/src/Controller/DockerController.php | 6 +++--- php/src/Data/ConfigurationManager.php | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/php/src/Controller/DockerController.php b/php/src/Controller/DockerController.php index 510c373b..26dc22a3 100644 --- a/php/src/Controller/DockerController.php +++ b/php/src/Controller/DockerController.php @@ -123,7 +123,7 @@ readonly class DockerController { } public function StartBackupContainerRestore(Request $request, Response $response, array $args) : Response { - $this->configurationManager->setMultiple(function ($confManager) use ($request) { + $this->configurationManager->setMultiple(function (ConfigurationManager $confManager) use ($request) { $confManager->backupMode = 'restore'; $confManager->selectedRestoreTime = $request->getParsedBody()['selected_restore_time'] ?? ''; $confManager->restoreExcludePreviews = isset($request->getParsedBody()['restore-exclude-previews']); @@ -152,7 +152,7 @@ readonly class DockerController { } public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response { - $this->configurationManager->setMultiple(function ($confManager) { + $this->configurationManager->setMultiple(function (ConfigurationManager $confManager) { $confManager->backupMode = 'test'; $confManager->instance_restore_attempt = false; }); @@ -177,7 +177,7 @@ readonly class DockerController { $port = 443; } - $this->configurationManager->setMultiple(function ($confManager) use ($request, $host, $port, $path) { + $this->configurationManager->setMultiple(function (ConfigurationManager $confManager) use ($request, $host, $port, $path) { $confManager->install_latest_major = isset($request->getParsedBody()['install_latest_major']); // set AIO_URL $confManager->AIO_URL = $host . ':' . (string)$port . $path; diff --git a/php/src/Data/ConfigurationManager.php b/php/src/Data/ConfigurationManager.php index 19ff0b74..2fb0a413 100644 --- a/php/src/Data/ConfigurationManager.php +++ b/php/src/Data/ConfigurationManager.php @@ -419,7 +419,7 @@ class ConfigurationManager } } - $this->setMultiple(function ($confManager) use ($domain) { + $this->setMultiple(function (ConfigurationManager $confManager) use ($domain) { // Write domain // Don't set the domain via the attribute, or we create a loop. $confManager->set('domain', $domain); @@ -441,7 +441,7 @@ class ConfigurationManager */ public function SetBorgLocationVars(string $location, string $repo) : void { $this->ValidateBorgLocationVars($location, $repo); - $this->setMultiple(function ($confManager) use ($location, $repo) { + $this->setMultiple(function (ConfigurationManager $confManager) use ($location, $repo) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; }); @@ -490,7 +490,7 @@ class ConfigurationManager public function DeleteBorgBackupLocationItems() : void { // Delete the variables - $this->setMultiple(function ($confManager) { + $this->setMultiple(function (ConfigurationManager $confManager) { $confManager->borg_backup_host_location = ''; $confManager->borg_remote_repo = ''; }); @@ -513,7 +513,7 @@ class ConfigurationManager throw new InvalidSettingConfigurationException("Please enter the password!"); } - $this->setMultiple(function ($confManager) use ($location, $repo, $password) { + $this->setMultiple(function (ConfigurationManager $confManager) use ($location, $repo, $password) { $confManager->borg_backup_host_location = $location; $confManager->borg_remote_repo = $repo; $confManager->borg_restore_password = $password; @@ -976,7 +976,7 @@ class ConfigurationManager if ($input === []) { return; } - $this->setMultiple(function($confManager) use ($input) { + $this->setMultiple(function(ConfigurationManager $confManager) use ($input) { foreach ($input as $variable) { $keyWithValue = $confManager->replaceEnvPlaceholders($variable); [$key, $value] = explode('=', $keyWithValue, 2);