diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
index aca2e718..f0338b79 100644
--- a/.github/ISSUE_TEMPLATE/Bug_report.md
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -1,15 +1,12 @@
---
-name: 🐛 Bug report - no questions and no support!
-about: Help us improving by reporting a bug - this category is not for questions and also not for support! Please use one of the options below for questions and support
-labels: 0. Needs triage
+name: 🐛 Bug report
+about: Help us improving by reporting a bug
+labels: bug, 0. Needs triage
---
@@ -23,17 +20,11 @@ labels: 0. Needs triage
### Actual behavior
-### Other information
-#### Host OS
+### Host OS
-#### Output of `sudo docker info`
-#### Docker run command or docker-compose file that you used
+#### Nextcloud AIO version
-#### Output of `sudo docker logs nextcloud-aio-mastercontainer`
+#### Current channel
-#### Output of `sudo docker inspect nextcloud-aio-mastercontainer`
-
-#### Output of `sudo docker ps -a`
-
-#### Other valuable info
+#### Other valuable info
diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md
index 2cc54fb4..e60db836 100644
--- a/.github/ISSUE_TEMPLATE/Feature_request.md
+++ b/.github/ISSUE_TEMPLATE/Feature_request.md
@@ -1,7 +1,7 @@
---
name: 📖 Existing feature/documentation enhancement
about: Suggest an enhancement of an existing feature/documentation - for other types, please use the feature request option below
-labels: 0. Needs triage
+labels: enhancement, 0. Needs triage
---
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 72ae238a..bb669bb6 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,14 +1,14 @@
blank_issues_enabled: false
contact_links:
- - name: 📘 Documentation on Nextcloud AIO
- url: https://github.com/nextcloud/all-in-one#faq
- about: Please read the docs first before submitting any report or request!
- - name: ⛑️ Questions and support
- url: https://help.nextcloud.com/tag/aio
- about: For questions, support and help
- name: 💡 Suggest a new feature or discuss one
url: https://github.com/nextcloud/all-in-one/discussions/categories/ideas
about: For new feature requests and discussion of existing ones
+ - name: ❓ Questions on AIO
+ url: https://github.com/nextcloud/all-in-one/discussions/categories/questions
+ about: For questions regarding AIO
+ - name: ⛑️ Community Support and Help
+ url: https://help.nextcloud.com/tag/aio
+ about: For other types of questions
- name: 💼 Nextcloud Enterprise
url: https://portal.nextcloud.com/
- about: If you are a Nextcloud Enterprise customer, or need Professional support, so it can be resolved directly by our dedicated engineers more quickly
+ about: If you are a Nextcloud Enterprise customer, or need Professional support, so it can be resolved directly by our dedicated engineers more quickly
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 7fe1067e..c16ef12d 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,62 +1,185 @@
version: 2
updates:
- package-ecosystem: "github-actions"
- directory: ".github/workflows"
+ directory: "/"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
- rebase-strategy: "disabled"
- labels:
- - 3. to review
- - dependencies
- cooldown:
- default-days: 7
- package-ecosystem: composer
directory: "/php/"
schedule:
interval: "daily"
time: "12:00"
open-pull-requests-limit: 10
- rebase-strategy: "auto"
labels:
- 3. to review
- dependencies
- package-ecosystem: "docker"
- directories:
- - "/Containers/alpine"
- - "/Containers/apache"
- - "/Containers/borgbackup"
- - "/Containers/clamav"
- - "/Containers/collabora"
- - "/Containers/docker-socket-proxy"
- - "/Containers/domaincheck"
- - "/Containers/fulltextsearch"
- - "/Containers/imaginary"
- - "/Containers/mastercontainer"
- - "/Containers/nextcloud"
- - "/Containers/notify-push"
- - "/Containers/onlyoffice"
- - "/Containers/postgresql"
- - "/Containers/redis"
- - "/Containers/talk"
- - "/Containers/talk-recording"
- - "/Containers/watchtower"
- - "/Containers/whiteboard"
+ directory: "/Containers/apache"
schedule:
interval: "daily"
- time: "04:00"
+ time: "12:00"
open-pull-requests-limit: 10
- rebase-strategy: "disabled"
labels:
- 3. to review
- dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/borgbackup"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/collabora"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/domaincheck"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/mastercontainer"
+ schedule:
+ interval: "daily"
+ time: "12:00"
ignore:
- dependency-name: "php"
update-types: ["version-update:semver-major", "version-update:semver-minor"]
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/nextcloud"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ ignore:
+ - dependency-name: "php"
+ update-types: ["version-update:semver-major", "version-update:semver-minor"]
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/postgresql"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ ignore:
- dependency-name: "postgres"
update-types: ["version-update:semver-major"]
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/redis"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ ignore:
- dependency-name: "redis"
update-types: ["version-update:semver-major"]
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/talk"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/talk-recording"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/watchtower"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/clamav"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/onlyoffice"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/imaginary"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/fulltextsearch"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ ignore:
- dependency-name: "elasticsearch"
update-types: ["version-update:semver-major"]
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/notify-push"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
+- package-ecosystem: "docker"
+ directory: "/Containers/docker-socket-proxy"
+ schedule:
+ interval: "daily"
+ time: "12:00"
+ open-pull-requests-limit: 10
+ labels:
+ - 3. to review
+ - dependencies
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
deleted file mode 100644
index 5d1441b4..00000000
--- a/.github/pull_request_template.md
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 475940a9..eeaeb427 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: Check spelling
- uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2
+ uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
check_hidden: true
diff --git a/.github/workflows/collabora.yml b/.github/workflows/collabora.yml
deleted file mode 100644
index a61067f3..00000000
--- a/.github/workflows/collabora.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: collabora-update
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '00 12 * * *'
-
-jobs:
- collabora-update:
- name: update collabora
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - name: Run collabora-profile-update
- run: |
- rm -f php/cool-seccomp-profile.json
- wget https://raw.githubusercontent.com/CollaboraOnline/online/refs/heads/main/docker/cool-seccomp-profile.json
- mv cool-seccomp-profile.json php/
-
- - name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
- with:
- commit-message: collabora-seccomp-update automated change
- signoff: true
- title: collabora seccomp update
- body: Automated collabora seccomp profile update
- labels: dependencies, 3. to review
- milestone: next
- branch: collabora-seccomp-update
diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml
new file mode 100644
index 00000000..2a4125d8
--- /dev/null
+++ b/.github/workflows/command-rebase.yml
@@ -0,0 +1,51 @@
+# This workflow is provided via the organization template repository
+#
+# https://github.com/nextcloud/.github
+# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
+
+name: Rebase command
+
+on:
+ issue_comment:
+ types: created
+
+permissions:
+ contents: read
+
+jobs:
+ rebase:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: none
+
+ # On pull requests and if the comment starts with `/rebase`
+ if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
+
+ steps:
+ - name: Add reaction on start
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
+ with:
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+ repository: ${{ github.event.repository.full_name }}
+ comment-id: ${{ github.event.comment.id }}
+ reaction-type: "+1"
+
+ - name: Checkout the latest code
+ uses: actions/checkout@v4 # v3.5.2
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+
+ - name: Automatic Rebase
+ uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
+ env:
+ GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
+
+ - name: Add reaction on failure
+ uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
+ if: failure()
+ with:
+ token: ${{ secrets.COMMAND_BOT_PAT }}
+ repository: ${{ github.event.repository.full_name }}
+ comment-id: ${{ github.event.comment.id }}
+ reaction-type: "-1"
diff --git a/.github/workflows/community-containers.yml b/.github/workflows/community-containers.yml
index 5271bfa8..2df5173d 100644
--- a/.github/workflows/community-containers.yml
+++ b/.github/workflows/community-containers.yml
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: Validate structure
run: |
CONTAINERS="$(find ./community-containers -mindepth 1 -maxdepth 1 -type d)"
diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml
index 3805a0d0..b5f907e9 100644
--- a/.github/workflows/dependency-updates.yml
+++ b/.github/workflows/dependency-updates.yml
@@ -8,12 +8,12 @@ on:
jobs:
dependency_updates:
name: Run dependency update script
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
+ - uses: actions/checkout@v4
+ - uses: shivammathur/setup-php@v2
with:
- php-version: 8.4
+ php-version: 8.3
extensions: apcu
- name: Run dependency update script
run: |
@@ -44,7 +44,7 @@ jobs:
)"
sed -i "s|pecl install APCu.*\;|pecl install APCu-$apcu_version\;|" ./Containers/mastercontainer/Dockerfile
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: php dependency updates
signoff: true
diff --git a/.github/workflows/docker-lint.yml b/.github/workflows/docker-lint.yml
index 3f09bb98..b1a2cd87 100644
--- a/.github/workflows/docker-lint.yml
+++ b/.github/workflows/docker-lint.yml
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: Install hadolint
run: |
diff --git a/.github/workflows/fail-on-prerelease.yml b/.github/workflows/fail-on-prerelease.yml
deleted file mode 100644
index a5b876c3..00000000
--- a/.github/workflows/fail-on-prerelease.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: Block if prerelease is present
-
-on:
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- check-latest-release:
- runs-on: ubuntu-latest
- steps:
- - name: "Check latest published release isn't a prerelease"
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v6
- with:
- script: |
- const tags = await github.rest.repos.listTags({
- owner: context.repo.owner,
- repo: context.repo.repo,
- per_page: 1
- });
-
- if (!tags.data || tags.data.length === 0) {
- core.info('No tags found for this repository; skipping prerelease check.');
- return;
- }
-
- const latestTag = tags.data[0].name;
- core.info(`Latest tag found: ${latestTag}`);
-
- try {
- const { data } = await github.rest.repos.getReleaseByTag({
- owner: context.repo.owner,
- repo: context.repo.repo,
- tag: latestTag
- });
-
- if (data.prerelease) {
- core.setFailed(`Release for tag ${latestTag} (${data.tag_name}) is a prerelease. Blocking merges to main as we need to wait for the prerelease to become stable.`);
- } else {
- core.info(`Release for tag ${latestTag} (${data.tag_name}) is not a prerelease.`);
- }
-
- } catch (err) {
- if (err.status === 404) {
- core.info(`No release found for tag ${latestTag}; skipping prerelease check.`);
- } else {
- throw err;
- }
- }
diff --git a/.github/workflows/helm-release.yml b/.github/workflows/helm-release.yml
index ba3b865d..1548cb2d 100644
--- a/.github/workflows/helm-release.yml
+++ b/.github/workflows/helm-release.yml
@@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: Turnstyle
- uses: softprops/turnstyle@e565d2d86403c5d23533937e95980570545e5586 # v2
+ uses: softprops/turnstyle@v2
with:
continue-after-seconds: 180
env:
@@ -32,7 +32,7 @@ jobs:
# See https://github.com/helm/chart-releaser-action/issues/6
- name: Set up Helm
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
+ uses: azure/setup-helm@v4
with:
version: v3.6.3
@@ -41,7 +41,7 @@ jobs:
helm lint ./nextcloud-aio-helm-chart
- name: Run chart-releaser
- uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
+ uses: helm/chart-releaser-action@v1.6.0
with:
mark_as_latest: false
charts_dir: .
diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml
index 05050a20..b8d26dbe 100644
--- a/.github/workflows/imaginary-update.yml
+++ b/.github/workflows/imaginary-update.yml
@@ -10,7 +10,7 @@ jobs:
name: update to latest imaginary commit on master branch
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@v4
- name: Run imaginary-update
run: |
# Imaginary
@@ -22,7 +22,7 @@ jobs:
sed -i "s|^ENV IMAGINARY_HASH.*$|ENV IMAGINARY_HASH=$imaginary_version|" ./Containers/imaginary/Dockerfile
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: imaginary-update automated change
signoff: true
diff --git a/.github/workflows/json-validator.yml b/.github/workflows/json-validator.yml
index 8c0a7f45..86e269e9 100644
--- a/.github/workflows/json-validator.yml
+++ b/.github/workflows/json-validator.yml
@@ -1,37 +1,35 @@
-name: Json Validator
-
-on:
- pull_request:
- paths:
- - '**.json'
- push:
- branches:
- - main
- paths:
- - '**.json'
-
-jobs:
- json-validator:
- name: Json Validator
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - name: Validate Json
- run: |
- sudo apt-get update
- sudo apt-get install python3-venv -y --no-install-recommends
- python3 -m venv venv
- . venv/bin/activate
- pip3 install json-spec
- if ! json validate --schema-file=php/containers-schema.json --document-file=php/containers.json; then
- exit 1
- fi
- JSON_FILES="$(find ./community-containers -name '*.json')"
- mapfile -t JSON_FILES <<< "$JSON_FILES"
- for file in "${JSON_FILES[@]}"; do
- json validate --schema-file=php/containers-schema.json --document-file="$file" 2>&1 | tee -a ./json-validator.log
- done
- if grep -q "document does not validate with schema.\|invalid JSONFile" ./json-validator.log; then
- exit 1
- fi
+name: Json Validator
+
+on:
+ pull_request:
+ paths:
+ - '**.json'
+ push:
+ branches:
+ - main
+ paths:
+ - '**.json'
+
+jobs:
+ json-validator:
+ name: Json Validator
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Validate Json
+ run: |
+ sudo apt-get update
+ sudo apt-get install python3-pip -y --no-install-recommends
+ sudo pip3 install json-spec
+ if ! json validate --schema-file=php/containers-schema.json --document-file=php/containers.json; then
+ exit 1
+ fi
+ JSON_FILES="$(find ./community-containers -name '*.json')"
+ mapfile -t JSON_FILES <<< "$JSON_FILES"
+ for file in "${JSON_FILES[@]}"; do
+ json validate --schema-file=php/containers-schema.json --document-file="$file" 2>&1 | tee -a ./json-validator.log
+ done
+ if grep -q "document does not validate with schema.\|invalid JSONFile" ./json-validator.log; then
+ exit 1
+ fi
diff --git a/.github/workflows/lint-helm.yml b/.github/workflows/lint-helm.yml
index 61e51450..41779d5c 100644
--- a/.github/workflows/lint-helm.yml
+++ b/.github/workflows/lint-helm.yml
@@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
+ uses: azure/setup-helm@v4
with:
version: v3.11.1
diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml
index c0d2d577..69db96dd 100644
--- a/.github/workflows/lint-php.yml
+++ b/.github/workflows/lint-php.yml
@@ -2,9 +2,6 @@
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
-#
-# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
-# SPDX-License-Identifier: MIT
name: Lint php
@@ -30,18 +27,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- php-versions: [ "8.4" ]
+ php-versions: [ "8.3" ]
name: php-lint
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2.36.0
+ uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
diff --git a/.github/workflows/lint-yaml.yml b/.github/workflows/lint-yaml.yml
deleted file mode 100644
index e36b8f4c..00000000
--- a/.github/workflows/lint-yaml.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-# This workflow is provided via the organization template repository
-#
-# https://github.com/nextcloud/.github
-# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
-#
-# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
-# SPDX-License-Identifier: MIT
-
-name: Lint YAML
-
-on:
- pull_request:
- paths:
- - '**.yml'
-
-permissions:
- contents: read
-
-jobs:
- yaml-lint:
- runs-on: ubuntu-latest
-
- name: yaml
-
- steps:
- - name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.1
- with:
- persist-credentials: false
-
- - name: GitHub action templates lint
- uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1
- with:
- file_or_dir: .github/workflows
- config_data: |
- line-length: warning
-
- - name: Install the latest version of uv
- uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.0
-
- - name: Check GitHub actions
- run: uvx zizmor --min-severity medium .github/workflows/*.yml
diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml
index bda40ee2..e4e2cc32 100644
--- a/.github/workflows/lock-threads.yml
+++ b/.github/workflows/lock-threads.yml
@@ -14,7 +14,7 @@ jobs:
action:
runs-on: ubuntu-latest
steps:
- - uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v5
+ - uses: dessant/lock-threads@v5
with:
issue-inactive-days: '14'
process-only: 'issues'
diff --git a/.github/workflows/nextcloud-update.yml b/.github/workflows/nextcloud-update.yml
index b2475290..6535d016 100644
--- a/.github/workflows/nextcloud-update.yml
+++ b/.github/workflows/nextcloud-update.yml
@@ -11,7 +11,7 @@ jobs:
name: Run nextcloud-update script
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@v4
- name: Run nextcloud-update script
run: |
# Inspired by https://github.com/nextcloud/docker/blob/master/update.sh
@@ -25,7 +25,7 @@ jobs:
| sort -V \
| tail -1
)"
- sed -i "s|\(pecl install[^;]*APCu-\)[0-9.]*|\1$apcu_version|" ./Containers/nextcloud/Dockerfile
+ sed -i "s|pecl install APCu.*\;|pecl install APCu-$apcu_version\;|" ./Containers/nextcloud/Dockerfile
# Memcached
memcached_version="$(
@@ -36,7 +36,7 @@ jobs:
| sort -V \
| tail -1
)"
- sed -i "s|\(pecl install[^;]*memcached-\)[0-9.]*|\1$memcached_version|" ./Containers/nextcloud/Dockerfile
+ sed -i "s|pecl install memcached.* |pecl install memcached-$memcached_version |" ./Containers/nextcloud/Dockerfile
# Redis
redis_version="$(
@@ -47,18 +47,18 @@ jobs:
| sort -V \
| tail -1
)"
- sed -i "s|\(pecl install[^;]*redis-\)[0-9.]*|\1$redis_version|" ./Containers/nextcloud/Dockerfile
+ sed -i "s|pecl install redis.* |pecl install redis-$redis_version |" ./Containers/nextcloud/Dockerfile
# Imagick
imagick_version="$(
- git ls-remote --tags https://github.com/imagick/imagick.git \
+ git ls-remote --tags https://github.com/mkoppanen/imagick.git \
| cut -d/ -f3 \
| grep -viE '[a-z]' \
| tr -d '^{}' \
| sort -V \
| tail -1
)"
- sed -i "s|\(pecl install[^;]*imagick-\)[0-9.]*|\1$imagick_version|" ./Containers/nextcloud/Dockerfile
+ sed -i "s|pecl install imagick.*\;|pecl install imagick-$imagick_version\;|" ./Containers/nextcloud/Dockerfile
# Igbinary
igbinary_version="$(
@@ -69,7 +69,7 @@ jobs:
| sort -V \
| tail -1
)"
- sed -i "s|\(pecl install[^;]*igbinary-\)[0-9.]*|\1$igbinary_version|" ./Containers/nextcloud/Dockerfile
+ sed -i "s|pecl install igbinary.*\;|pecl install igbinary-$igbinary_version\;|" ./Containers/nextcloud/Dockerfile
# Nextcloud
NC_MAJOR="$(grep "ENV NEXTCLOUD_VERSION" ./Containers/nextcloud/Dockerfile | grep -oP '[23][0-9]')"
@@ -79,7 +79,7 @@ jobs:
fi
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: nextcloud-update automated change
signoff: true
diff --git a/.github/workflows/php-deprecation-detector.yml b/.github/workflows/php-deprecation-detector.yml
index 38b0fa8d..aed16094 100644
--- a/.github/workflows/php-deprecation-detector.yml
+++ b/.github/workflows/php-deprecation-detector.yml
@@ -16,11 +16,11 @@ jobs:
name: PHP Deprecation Detector
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@v4
- name: Set up php
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
+ uses: shivammathur/setup-php@v2
with:
- php-version: 8.4
+ php-version: 8.3
extensions: apcu
coverage: none
diff --git a/.github/workflows/playwright-on-push.yml b/.github/workflows/playwright-on-push.yml
deleted file mode 100644
index 40277e57..00000000
--- a/.github/workflows/playwright-on-push.yml
+++ /dev/null
@@ -1,123 +0,0 @@
-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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-
- - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
- if: ${{ !cancelled() }}
- with:
- name: playwright-report
- path: php/tests/playwright-report/
- retention-days: 14
- overwrite: true
diff --git a/.github/workflows/playwright-on-workflow-dispatch.yml b/.github/workflows/playwright-on-workflow-dispatch.yml
deleted file mode 100644
index 6d2f6d32..00000000
--- a/.github/workflows/playwright-on-workflow-dispatch.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-name: Playwright Tests
-
-on:
- workflow_dispatch:
-
-env:
- BASE_URL: https://localhost:8080
-
-jobs:
- test:
- timeout-minutes: 60
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
-
- - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # 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: 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 /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 /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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
- if: ${{ !cancelled() }}
- with:
- name: playwright-report
- path: php/tests/playwright-report/
- retention-days: 14
- overwrite: true
diff --git a/.github/workflows/psalm-update-baseline.yml b/.github/workflows/psalm-update-baseline.yml
index bcbb12c3..fbe362c1 100644
--- a/.github/workflows/psalm-update-baseline.yml
+++ b/.github/workflows/psalm-update-baseline.yml
@@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@v4
- name: Set up php
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
+ uses: shivammathur/setup-php@v2
with:
- php-version: 8.4
+ php-version: 8.3
extensions: apcu
coverage: none
@@ -30,7 +30,7 @@ jobs:
continue-on-error: true
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: Update psalm baseline
diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml
index 2bab876e..e4775674 100644
--- a/.github/workflows/psalm.yml
+++ b/.github/workflows/psalm.yml
@@ -2,9 +2,6 @@
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
-#
-# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
-# SPDX-License-Identifier: MIT
name: Static analysis
@@ -22,9 +19,6 @@ concurrency:
group: psalm-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
-permissions:
- contents: read
-
jobs:
static-analysis:
runs-on: ubuntu-latest
@@ -32,19 +26,15 @@ jobs:
name: static-psalm-analysis
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- persist-credentials: false
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up php
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2.36.0
+ uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
with:
- php-version: 8.4
+ php-version: 8.3
extensions: apcu
coverage: none
ini-file: development
- # Temporary workaround for missing pcntl_* in PHP 8.3
- ini-values: disable_functions=
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml
index b051c355..697b1807 100644
--- a/.github/workflows/shellcheck.yml
+++ b/.github/workflows/shellcheck.yml
@@ -15,9 +15,9 @@ jobs:
name: Check Shell
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@v4
- name: Run Shellcheck
- uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
+ uses: ludeeus/action-shellcheck@2.0.0
with:
check_together: 'yes'
env:
diff --git a/.github/workflows/talk.yml b/.github/workflows/talk.yml
index b19e1cb5..15ea5fad 100644
--- a/.github/workflows/talk.yml
+++ b/.github/workflows/talk.yml
@@ -10,7 +10,7 @@ jobs:
name: update talk
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ - uses: actions/checkout@v4
- name: Run talk-container-update
run: |
# Recording
@@ -36,7 +36,7 @@ jobs:
# Janus
janus_version="$(
- git ls-remote https://github.com/meetecho/janus-gateway v1.*.* \
+ git ls-remote https://github.com/meetecho/janus-gateway v0.*.* \
| cut -d/ -f3 \
| sort -V \
| grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$" \
@@ -45,7 +45,7 @@ jobs:
sed -i "s|^ARG JANUS_VERSION=.*$|ARG JANUS_VERSION=$janus_version|" ./Containers/talk/Dockerfile
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: talk-update automated change
signoff: true
diff --git a/.github/workflows/twig-lint.yml b/.github/workflows/twig-lint.yml
index 27b8776d..4544f993 100644
--- a/.github/workflows/twig-lint.yml
+++ b/.github/workflows/twig-lint.yml
@@ -24,12 +24,12 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
+ uses: shivammathur/setup-php@v2
with:
- php-version: 8.4
+ php-version: 8.3
extensions: apcu
coverage: none
diff --git a/.github/workflows/update-copyright.yml b/.github/workflows/update-copyright.yml
deleted file mode 100644
index 103851c9..00000000
--- a/.github/workflows/update-copyright.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-name: Update Copyright
-
-on:
- workflow_dispatch:
-
-jobs:
- update-copyright:
- name: update copyright
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/update-helm.yml b/.github/workflows/update-helm.yml
index 92cbb978..62ee2650 100644
--- a/.github/workflows/update-helm.yml
+++ b/.github/workflows/update-helm.yml
@@ -11,19 +11,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: update helm chart
run: |
- set -x
- GHCR_TOKEN="$(curl https://ghcr.io/token?scope=repository:nextcloud-releases/nce-php-fpm-mgmt:pull | jq '.token' | sed 's|"||g')"
- DOCKER_TAG="$(curl -H "Authorization: Bearer ${GHCR_TOKEN}" -L -s 'https://ghcr.io/v2/nextcloud-releases/all-in-one/tags/list?page_size=1024' | jq '.tags' | sed 's|"||g;s|[[:space:]]||g;s|,||g' | grep '^20[0-9_]\+' | grep -v latest | sort -r | head -1)"
+ DOCKER_TAG="$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/nextcloud/all-in-one/tags?page_size=1024' | jq '."results"[]["name"]' | sed 's|"||g' | grep '^20[0-9_]\+' | grep -v latest | sort -r | head -1)"
export DOCKER_TAG
- set +x
- if [ -n "$DOCKER_TAG" ] && ! grep -q "aio-nextcloud:$DOCKER_TAG" ./nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml; then
+ if [ -n "$DOCKER_TAG" ] && ! grep -q "$DOCKER_TAG" ./nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml; then
sudo bash nextcloud-aio-helm-chart/update-helm.sh "$DOCKER_TAG"
fi
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: Helm Chart updates
signoff: true
diff --git a/.github/workflows/update-yaml.yml b/.github/workflows/update-yaml.yml
index 6e150261..c241708d 100644
--- a/.github/workflows/update-yaml.yml
+++ b/.github/workflows/update-yaml.yml
@@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ uses: actions/checkout@v4
- name: update yaml files
run: |
sudo bash manual-install/update-yaml.sh
- name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
+ uses: peter-evans/create-pull-request@v6
with:
commit-message: Yaml updates
signoff: true
diff --git a/.github/workflows/watchtower-update.yml b/.github/workflows/watchtower-update.yml
deleted file mode 100644
index ecd82a69..00000000
--- a/.github/workflows/watchtower-update.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: watchtower-update
-
-on:
- workflow_dispatch:
- schedule:
- - cron: '00 12 * * *'
-
-jobs:
- watchtower-update:
- name: update watchtower
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - name: Run watchtower-container-update
- run: |
- # Watchtower
- watchtower_version="$(
- git ls-remote https://github.com/nicholas-fedor/watchtower v* \
- | cut -d/ -f3 \
- | sort -V \
- | grep -E "^v[0-9\.]+$" \
- | tail -1
- )"
- watchtower_commit_hash="$(git ls-remote https://github.com/nicholas-fedor/watchtower $watchtower_version | sed 's/refs.*//')"
- sed -i "s|^ENV WATCHTOWER_COMMIT_HASH.*$|ENV WATCHTOWER_COMMIT_HASH=$watchtower_commit_hash|" ./Containers/watchtower/Dockerfile
- sed -i "s|\$WATCHTOWER_COMMIT_HASH.*$|\$WATCHTOWER_COMMIT_HASH # $watchtower_version|" ./Containers/watchtower/Dockerfile
-
- - name: Create Pull Request
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v7
- with:
- commit-message: watchtower-update automated change
- signoff: true
- title: watchtower container update
- body: Automated watchtower container update
- labels: dependencies, 3. to review
- milestone: next
- branch: watchtower-container-update
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index fec85a59..00000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-In the Nextcloud community, participants from all over the world come together to create Free Software for a free internet. This is made possible by the support, hard work and enthusiasm of thousands of people, including those who create and use Nextcloud software.
-
-Our code of conduct offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other.
-
-The Code of Conduct is shared by all contributors and users who engage with the Nextcloud team and its community services. It presents a summary of the shared values and “common sense” thinking in our community.
-
-You can find our full code of conduct on our website: https://nextcloud.com/code-of-conduct/
-
-Please, keep our CoC in mind when you contribute! That way, everyone can be a part of our community in a productive, positive, creative and fun way.
diff --git a/Containers/alpine/Dockerfile b/Containers/alpine/Dockerfile
deleted file mode 100644
index 1098b4c4..00000000
--- a/Containers/alpine/Dockerfile
+++ /dev/null
@@ -1,7 +0,0 @@
-# syntax=docker/dockerfile:latest
-FROM alpine:3.23.3
-
-RUN set -ex; \
- apk upgrade --no-cache -a
-
-LABEL org.label-schema.vendor="Nextcloud"
diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile
index 4b92d807..8e7e4a21 100644
--- a/Containers/apache/Caddyfile
+++ b/Containers/apache/Caddyfile
@@ -15,7 +15,6 @@
}
https://{$ADDITIONAL_TRUSTED_DOMAIN}:443,
-http://{$APACHE_HOST}:23973, # For Collabora callback and WOPI requests, see containers.json
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
header -Server
header -X-Powered-By
@@ -41,7 +40,7 @@ http://{$APACHE_HOST}:23973, # For Collabora callback and WOPI requests, see con
route /onlyoffice/* {
uri strip_prefix /onlyoffice
reverse_proxy {$ONLYOFFICE_HOST}:80 {
- header_up X-Forwarded-Host {http.request.hostport}/onlyoffice
+ header_up X-Forwarded-Host {http.request.host}/onlyoffice
header_up X-Forwarded-Proto https
}
}
@@ -52,12 +51,6 @@ http://{$APACHE_HOST}:23973, # For Collabora callback and WOPI requests, see con
reverse_proxy {$TALK_HOST}:8081
}
- # Whiteboard
- route /whiteboard/* {
- uri strip_prefix /whiteboard
- reverse_proxy {$WHITEBOARD_HOST}:3002
- }
-
# Nextcloud
route {
header Strict-Transport-Security max-age=31536000;
diff --git a/Containers/apache/Dockerfile b/Containers/apache/Dockerfile
index 9ccadfb8..b118fd95 100644
--- a/Containers/apache/Dockerfile
+++ b/Containers/apache/Dockerfile
@@ -1,8 +1,8 @@
# syntax=docker/dockerfile:latest
-FROM caddy:2.10.2-alpine AS caddy
+FROM caddy:2.8.4-alpine AS caddy
# From https://github.com/docker-library/httpd/blob/master/2.4/alpine/Dockerfile
-FROM httpd:2.4.66-alpine3.23
+FROM httpd:2.4.62-alpine3.20
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
@@ -81,12 +81,10 @@ RUN set -ex; \
\
echo "root:$(openssl rand -base64 12)" | chpasswd
-USER 33
+USER www-data
ENTRYPOINT ["/start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/apache/healthcheck.sh b/Containers/apache/healthcheck.sh
index e9c1fad4..15235352 100644
--- a/Containers/apache/healthcheck.sh
+++ b/Containers/apache/healthcheck.sh
@@ -3,3 +3,7 @@
nc -z "$NEXTCLOUD_HOST" 9000 || exit 0
nc -z 127.0.0.1 8000 || exit 1
nc -z 127.0.0.1 "$APACHE_PORT" || exit 1
+if ! nc -z "$NC_DOMAIN" 443; then
+ echo "Could not reach $NC_DOMAIN on port 443."
+ exit 1
+fi
diff --git a/Containers/apache/start.sh b/Containers/apache/start.sh
index 02a2f2ad..9d69eb47 100644
--- a/Containers/apache/start.sh
+++ b/Containers/apache/start.sh
@@ -46,9 +46,7 @@ echo "$CADDYFILE" > /tmp/Caddyfile
# Change the trusted_proxies in case of reverse proxies
if [ "$APACHE_PORT" != '443' ]; then
- # Here the 100.64.0.0/10 range gets added which is the CGNAT range used by Tailscale nodes
- # See https://github.com/nextcloud/all-in-one/pull/6703 for reference
- CADDYFILE="$(sed 's|# trusted_proxies placeholder|trusted_proxies static private_ranges 100.64.0.0/10|' /tmp/Caddyfile)"
+ CADDYFILE="$(sed 's|# trusted_proxies placeholder|trusted_proxies static private_ranges|' /tmp/Caddyfile)"
else
CADDYFILE="$(sed "s|# trusted_proxies placeholder|trusted_proxies static $IPv4_ADDRESS|" /tmp/Caddyfile)"
fi
@@ -66,11 +64,6 @@ caddy fmt --overwrite /tmp/Caddyfile
# Add caddy path
mkdir -p /mnt/data/caddy/
-# Fix caddy startup
-if [ -d "/mnt/data/caddy/locks" ]; then
- rm -rf /mnt/data/caddy/locks/*
-fi
-
# Fix apache startup
rm -f /usr/local/apache2/logs/httpd.pid
diff --git a/Containers/apache/supervisord.conf b/Containers/apache/supervisord.conf
index 7ab935e4..d6a93803 100644
--- a/Containers/apache/supervisord.conf
+++ b/Containers/apache/supervisord.conf
@@ -9,8 +9,8 @@ logfile_backups=10
loglevel=error
[program:apache]
-# Stdout logging is disabled as otherwise the logs are spammed
-stdout_logfile=NONE
+# stdout_logfile=/dev/stdout
+# stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=apachectl -DFOREGROUND
diff --git a/Containers/borgbackup/Dockerfile b/Containers/borgbackup/Dockerfile
index 6e3180cb..d46eda1a 100644
--- a/Containers/borgbackup/Dockerfile
+++ b/Containers/borgbackup/Dockerfile
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:latest
-FROM alpine:3.23.3
+FROM alpine:3.20.2
RUN set -ex; \
\
@@ -11,19 +11,15 @@ RUN set -ex; \
rsync \
fuse \
py3-llfuse \
- jq \
- openssh-client
+ jq
VOLUME /root
COPY --chmod=770 *.sh /
-COPY borg_excludes /
ENTRYPOINT ["/start.sh"]
# hadolint ignore=DL3002
USER root
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
ENV BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"
diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh
index b7b96147..f2e9d04e 100644
--- a/Containers/borgbackup/backupscript.sh
+++ b/Containers/borgbackup/backupscript.sh
@@ -34,23 +34,19 @@ for volume in "${DEFAULT_VOLUMES[@]}"; do
done
# Check if target is mountpoint
-if [ -z "$BORG_REMOTE_REPO" ] && ! mountpoint -q "$MOUNT_DIR"; then
- echo "$MOUNT_DIR is not a mountpoint which is not allowed."
+if ! mountpoint -q /mnt/borgbackup; then
+ echo "/mnt/borgbackup is not a mountpoint which is not allowed."
exit 1
fi
-# Check if repo is uninitialized
-if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! borg info > /dev/null; then
- if [ -n "$BORG_REMOTE_REPO" ]; then
- echo "The repository is uninitialized or cannot connect to remote. Cannot perform check or restore."
- else
- echo "The repository is uninitialized. Cannot perform check or restore."
- fi
+# Check if target is empty
+if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != test ] && ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
+ echo "The repository is empty. Cannot perform check or restore."
exit 1
fi
# Do not continue if this file exists (needed for simple external blocking)
-if [ -z "$BORG_REMOTE_REPO" ] && [ -f "$BORG_BACKUP_DIRECTORY/aio-lockfile" ]; then
+if [ -f "$BORG_BACKUP_DIRECTORY/aio-lockfile" ]; then
echo "Not continuing because aio-lockfile exists – it seems like a script is externally running which is locking the backup archive."
echo "If this should not be the case, you can fix this by deleting the 'aio-lockfile' file from the backup archive directory."
exit 1
@@ -61,15 +57,6 @@ if [ "$BORG_MODE" = backup ] || [ "$BORG_MODE" = restore ]; then
touch "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
fi
-if [ -n "$BORG_REMOTE_REPO" ] && ! [ -f "$BORGBACKUP_KEY" ]; then
- echo "First run, creating borg ssh key"
- ssh-keygen -f "$BORGBACKUP_KEY" -N ""
- echo "You should configure the remote to accept this public key"
-fi
-if [ -n "$BORG_REMOTE_REPO" ] && [ -f "$BORGBACKUP_KEY.pub" ]; then
- echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")"
-fi
-
# Do the backup
if [ "$BORG_MODE" = backup ]; then
@@ -84,8 +71,8 @@ if [ "$BORG_MODE" = backup ]; then
echo "database-dump is missing. Cannot perform backup!"
echo "Please check the database container logs!"
exit 1
- elif ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.ocdata" ] && ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.ncdata" ]; then
- echo "The .ncdata or .ocdata file is missing in Nextcloud datadir which means it is invalid!"
+ elif ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.ocdata" ]; then
+ echo "The .ocdata file is missing in Nextcloud datadir which means it is invalid!"
echo "Is the drive where the datadir is located on still mounted?"
exit 1
fi
@@ -113,22 +100,15 @@ if [ "$BORG_MODE" = backup ]; then
exit 1
fi
- if [ -z "$BORG_REMOTE_REPO" ]; then
- # Create backup folder
- mkdir -p "$BORG_BACKUP_DIRECTORY"
- fi
+ # Create backup folder
+ mkdir -p "$BORG_BACKUP_DIRECTORY"
- # Initialize the repository if can't get info from target
- if ! borg info > /dev/null; then
+ # Initialize the repository if the target is empty
+ if ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
# Don't initialize if already initialized
if [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
- if [ -n "$BORG_REMOTE_REPO" ]; then
- echo "Borg could not get info from the remote repo."
- echo "This might be a failure to connect to the remote server. See the above borg info output for details."
- else
- echo "Borg could not get info from the targeted directory."
- echo "This might happen if the targeted directory is located on an external drive and the drive not connected anymore. You should check this."
- fi
+ echo "No borg config file was found in the targeted directory."
+ echo "This might happen if the targeted directory is located on an external drive and the drive not connected anymore. You should check this."
echo "If you instead want to initialize a new backup repository, you may delete the 'borg.config' file that is stored in the mastercontainer volume manually, which will allow you to initialize a new borg repository in the chosen directory:"
echo "sudo docker exec nextcloud-aio-mastercontainer rm /mnt/docker-aio-config/data/borg.config"
exit 1
@@ -136,39 +116,28 @@ if [ "$BORG_MODE" = backup ]; then
echo "Initializing repository..."
NEW_REPOSITORY=1
- if ! borg init --debug --encryption=repokey-blake2; then
+ if ! borg init --debug --encryption=repokey-blake2 "$BORG_BACKUP_DIRECTORY"; then
echo "Could not initialize borg repository."
+ rm -f "$BORG_BACKUP_DIRECTORY/config"
exit 1
fi
+ borg config "$BORG_BACKUP_DIRECTORY" additional_free_space 2G
- if [ -z "$BORG_REMOTE_REPO" ]; then
- # borg config only works for local repos; it's up to the remote to ensure the disk isn't full
- borg config :: additional_free_space 2G
+ # Fix too large Borg cache
+ # https://borgbackup.readthedocs.io/en/stable/faq.html#the-borg-cache-eats-way-too-much-disk-space-what-can-i-do
+ BORG_ID="$(borg config "$BORG_BACKUP_DIRECTORY" id)"
+ rm -r "/root/.cache/borg/$BORG_ID/chunks.archive.d"
+ touch "/root/.cache/borg/$BORG_ID/chunks.archive.d"
- # Fix too large Borg cache
- # https://borgbackup.readthedocs.io/en/stable/faq.html#the-borg-cache-eats-way-too-much-disk-space-what-can-i-do
- BORG_ID="$(borg config :: id)"
- rm -r "/root/.cache/borg/$BORG_ID/chunks.archive.d"
- touch "/root/.cache/borg/$BORG_ID/chunks.archive.d"
- fi
-
- if ! borg info > /dev/null; then
- echo "Borg can't get info from the repo it created. Something is wrong."
+ # Make a backup from the borg config file
+ if ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
+ echo "The borg config file wasn't created. Something is wrong."
exit 1
fi
-
rm -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config"
- if [ -n "$BORG_REMOTE_REPO" ]; then
- # `borg config` does not support remote repos so instead create a dummy file and rely on the remote to avoid
- # corruption of the config file (which contains the encryption key). We don't actually use the contents of
- # this file anywhere, so a touch is all we need so we remember we already initialized the repo.
- touch "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config"
- else
- # Make a backup from the borg config file
- if ! cp "$BORG_BACKUP_DIRECTORY/config" "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config"; then
- echo "Could not copy config file to second place. Cannot perform backup."
- exit 1
- fi
+ if ! cp "$BORG_BACKUP_DIRECTORY/config" "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config"; then
+ echo "Could not copy config file to second place. Cannot perform backup."
+ exit 1
fi
echo "Repository successfully initialized."
@@ -180,27 +149,13 @@ if [ "$BORG_MODE" = backup ]; then
# Borg options
# auto,zstd compression seems to has the best ratio based on:
# https://forum.level1techs.com/t/optimal-compression-for-borg-backups/145870/6
- BORG_OPTS=(-v --stats --compression "auto,zstd")
+ BORG_OPTS=(-v --stats --compression "auto,zstd" --exclude-caches)
if [ "$NEW_REPOSITORY" = 1 ]; then
BORG_OPTS+=(--progress)
fi
# Exclude the nextcloud log and audit log for GDPR reasons
- BORG_EXCLUDE=(--exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/nextcloud.log*" --exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/audit.log" --exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/lost+found")
- BORG_INCLUDE=()
-
- # Exclude datadir if .noaiobackup file was found
- # shellcheck disable=SC2144
- if [ -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.noaiobackup" ]; then
- BORG_EXCLUDE+=(--exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/")
- BORG_INCLUDE+=(--pattern="+/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.noaiobackup")
- echo "⚠️⚠️⚠️ '.noaiobackup' file was found in Nextcloud's data directory. Excluding the data directory from backup!"
- # Exclude preview folder if .noaiobackup file was found
- elif [ -f /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/appdata_*/preview/.noaiobackup ]; then
- BORG_EXCLUDE+=(--exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/appdata_*/preview/")
- BORG_INCLUDE+=(--pattern="+/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/appdata_*/preview/.noaiobackup")
- echo "⚠️⚠️⚠️ '.noaiobackup' file was found in the preview directory. Excluding the preview directory from backup!"
- fi
+ BORG_EXCLUDE=(--exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/nextcloud.log*" --exclude "/nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/audit.log")
# Make sure that there is always a borg.config file before creating a new backup
if ! [ -f "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/borg.config" ]; then
@@ -212,9 +167,9 @@ if [ "$BORG_MODE" = backup ]; then
# Create the backup
echo "Starting the backup..."
get_start_time
- if ! borg create "${BORG_OPTS[@]}" "${BORG_INCLUDE[@]}" "${BORG_EXCLUDE[@]}" "::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/" --exclude-from /borg_excludes; then
+ if ! borg create "${BORG_OPTS[@]}" "${BORG_EXCLUDE[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio" "/nextcloud_aio_volumes/"; then
echo "Deleting the failed backup archive..."
- borg delete --stats "::$CURRENT_DATE-nextcloud-aio"
+ borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-nextcloud-aio"
echo "Backup failed!"
echo "You might want to check the backup integrity via the AIO interface."
if [ "$NEW_REPOSITORY" = 1 ]; then
@@ -233,14 +188,14 @@ if [ "$BORG_MODE" = backup ]; then
# Prune archives
echo "Pruning the archives..."
- if ! borg prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}"; then
+ if ! borg prune --stats --glob-archives '*_*-nextcloud-aio' "${BORG_PRUNE_OPTS[@]}" "$BORG_BACKUP_DIRECTORY"; then
echo "Failed to prune archives!"
exit 1
fi
# Compact archives
echo "Compacting the archives..."
- if ! borg compact; then
+ if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
echo "Failed to compact archives!"
exit 1
fi
@@ -257,19 +212,19 @@ if [ "$BORG_MODE" = backup ]; then
fi
done
echo "Starting the backup for additional volumes..."
- if ! borg create "${BORG_OPTS[@]}" "::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
+ if ! borg create "${BORG_OPTS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes" "/docker_volumes/"; then
echo "Deleting the failed backup archive..."
- borg delete --stats "::$CURRENT_DATE-additional-docker-volumes"
+ borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-docker-volumes"
echo "Backup of additional docker-volumes failed!"
exit 1
fi
echo "Pruning additional volumes..."
- if ! borg prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}"; then
+ if ! borg prune --stats --glob-archives '*_*-additional-docker-volumes' "${BORG_PRUNE_OPTS[@]}" "$BORG_BACKUP_DIRECTORY"; then
echo "Failed to prune additional docker-volumes archives!"
exit 1
fi
echo "Compacting additional volumes..."
- if ! borg compact; then
+ if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
echo "Failed to compact additional docker-volume archives!"
exit 1
fi
@@ -287,19 +242,19 @@ if [ "$BORG_MODE" = backup ]; then
EXCLUDE_DIRS+=(--exclude "/host_mounts/$directory/")
done
echo "Starting the backup for additional host mounts..."
- if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
+ if ! borg create "${BORG_OPTS[@]}" "${EXCLUDE_DIRS[@]}" "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts" "/host_mounts/"; then
echo "Deleting the failed backup archive..."
- borg delete --stats "::$CURRENT_DATE-additional-host-mounts"
+ borg delete --stats "$BORG_BACKUP_DIRECTORY::$CURRENT_DATE-additional-host-mounts"
echo "Backup of additional host-mounts failed!"
exit 1
fi
echo "Pruning additional host mounts..."
- if ! borg prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}"; then
+ if ! borg prune --stats --glob-archives '*_*-additional-host-mounts' "${BORG_PRUNE_OPTS[@]}" "$BORG_BACKUP_DIRECTORY"; then
echo "Failed to prune additional host-mount archives!"
exit 1
fi
echo "Compacting additional host mounts..."
- if ! borg compact; then
+ if ! borg compact "$BORG_BACKUP_DIRECTORY"; then
echo "Failed to compact additional host-mount archives!"
exit 1
fi
@@ -321,38 +276,17 @@ fi
if [ "$BORG_MODE" = restore ]; then
get_start_time
- # Pick archive to restore
+ # Perform the restore
if [ -n "$SELECTED_RESTORE_TIME" ]; then
- SELECTED_ARCHIVE="$(borg list | grep "nextcloud-aio" | grep "$SELECTED_RESTORE_TIME" | awk -F " " '{print $1}' | head -1)"
+ SELECTED_ARCHIVE="$(borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | grep "$SELECTED_RESTORE_TIME" | awk -F " " '{print $1}' | head -1)"
else
- SELECTED_ARCHIVE="$(borg list | grep "nextcloud-aio" | awk -F " " '{print $1}' | sort -r | head -1)"
+ SELECTED_ARCHIVE="$(borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1}' | sort -r | head -1)"
fi
echo "Restoring '$SELECTED_ARCHIVE'..."
-
- ADDITIONAL_RSYNC_EXCLUDES=()
- ADDITIONAL_BORG_EXCLUDES=()
- ADDITIONAL_FIND_EXCLUDES=()
- # Exclude datadir if .noaiobackup file was found
- # shellcheck disable=SC2144
- if [ -f "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/.noaiobackup" ]; then
- # Keep these 3 in sync. Beware, the pattern syntax and the paths differ
- ADDITIONAL_RSYNC_EXCLUDES=(--exclude "nextcloud_aio_nextcloud_data/**")
- ADDITIONAL_BORG_EXCLUDES=(--exclude "sh:nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/**")
- ADDITIONAL_FIND_EXCLUDES=(-o -regex 'nextcloud_aio_volumes/nextcloud_aio_nextcloud_data\(/.*\)?')
- echo "⚠️⚠️⚠️ '.noaiobackup' file was found in Nextcloud's data directory. Excluding the data directory from restore!"
- echo "You might run into problems due to this afterwards as potentially this makes the directory go out of sync with the database."
- echo "You might be able to fix this by running 'occ files:scan --all' and 'occ maintenance:repair' and 'occ files:scan-app-data' after the restore."
- echo "See https://github.com/nextcloud/all-in-one#how-to-run-occ-commands"
- # Exclude previews from restore if selected to speed up process or exclude preview folder if .noaiobackup file was found
- elif [ -n "$RESTORE_EXCLUDE_PREVIEWS" ] || [ -f /nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/appdata_*/preview/.noaiobackup ]; then
- # Keep these 3 in sync. Beware, the pattern syntax and the paths differ
- ADDITIONAL_RSYNC_EXCLUDES=(--exclude "nextcloud_aio_nextcloud_data/appdata_*/preview/**")
- ADDITIONAL_BORG_EXCLUDES=(--exclude "sh:nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/appdata_*/preview/**")
- ADDITIONAL_FIND_EXCLUDES=(-o -regex 'nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/appdata_[^/]*/preview\(/.*\)?')
- echo "⚠️⚠️⚠️ Excluding previews from restore!"
- echo "You might run into problems due to this afterwards as potentially this makes the directory go out of sync with the database."
- echo "You might be able to fix this by running 'occ files:scan-app-data preview' after the restore."
- echo "See https://github.com/nextcloud/all-in-one#how-to-run-occ-commands"
+ mkdir -p /tmp/borg
+ if ! borg mount "$BORG_BACKUP_DIRECTORY::$SELECTED_ARCHIVE" /tmp/borg; then
+ echo "Could not mount the backup!"
+ exit 1
fi
# Save Additional Backup dirs
@@ -365,12 +299,27 @@ if [ "$BORG_MODE" = restore ]; then
DAILY_BACKUPTIME="$(cat /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time)"
fi
+ # Restore everything except the configuration file
+ if ! rsync --stats --archive --human-readable -vv --delete \
+ --exclude "nextcloud_aio_apache/caddy/**" \
+ --exclude "nextcloud_aio_mastercontainer/caddy/**" \
+ --exclude "nextcloud_aio_nextcloud/data/nextcloud.log*" \
+ --exclude "nextcloud_aio_nextcloud/data/audit.log" \
+ --exclude "nextcloud_aio_mastercontainer/certs/**" \
+ --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \
+ --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \
+ --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \
+ --exclude "nextcloud_aio_mastercontainer/session/**" \
+ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes/; then
+ RESTORE_FAILED=1
+ echo "Something failed while restoring from backup."
+ fi
+
# Save current aio password
AIO_PASSWORD="$(jq '.password' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
- # Save current backup location vars
+ # Save current path
BORG_LOCATION="$(jq '.borg_backup_host_location' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
- REMOTE_REPO="$(jq '.borg_remote_repo' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
# Save current nextcloud datadir
if grep -q '"nextcloud_datadir":' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
@@ -379,116 +328,21 @@ if [ "$BORG_MODE" = restore ]; then
NEXTCLOUD_DATADIR='""'
fi
- if [ -z "$BORG_REMOTE_REPO" ]; then
- mkdir -p /tmp/borg
- if ! borg mount "::$SELECTED_ARCHIVE" /tmp/borg; then
- echo "Could not mount the backup!"
- exit 1
- fi
-
- # Restore everything except the configuration file
- #
- # These exclude patterns need to be kept in sync with the borg_excludes file and the find excludes in this file,
- # which use a different syntax (patterns appear in 3 places in total)
- if ! rsync --stats --archive --human-readable -vv --delete \
- --exclude "nextcloud_aio_apache/caddy/**" \
- --exclude "nextcloud_aio_mastercontainer/caddy/**" \
- --exclude "nextcloud_aio_nextcloud/data/nextcloud.log*" \
- --exclude "nextcloud_aio_nextcloud/data/audit.log" \
- --exclude "nextcloud_aio_mastercontainer/certs/**" \
- --exclude "nextcloud_aio_mastercontainer/data/configuration.json" \
- --exclude "nextcloud_aio_mastercontainer/data/daily_backup_running" \
- --exclude "nextcloud_aio_mastercontainer/data/session_date_file" \
- --exclude "nextcloud_aio_mastercontainer/session/**" \
- --exclude "nextcloud_aio_nextcloud_data/lost+found" \
- "${ADDITIONAL_RSYNC_EXCLUDES[@]}" \
- /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes/; then
- RESTORE_FAILED=1
- echo "Something failed while restoring from backup."
- fi
-
- # Restore the configuration file
- if ! rsync --archive --human-readable -vv \
- /tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json \
- /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
- RESTORE_FAILED=1
- echo "Something failed while restoring the configuration.json."
- fi
-
- if ! umount /tmp/borg; then
- echo "Failed to unmount the borg archive but should still be able to restore successfully"
- fi
- else
- # Restore nearly everything
- #
- # borg mount is really slow for remote repos (did not check whether it's slow for local repos too),
- # using extract to /tmp would require temporarily storing a second copy of the data.
- # So instead extract directly on top of the destination with exclude patterns for the config, but
- # then we do still need to delete local files which are not present in the archive.
- #
- # Older backups may still contain files we've since excluded, so we have to exclude on extract as well.
- cd / # borg extract has no destination arg and extracts to CWD
- if ! borg extract "::$SELECTED_ARCHIVE" --progress --exclude-from /borg_excludes "${ADDITIONAL_BORG_EXCLUDES[@]}" --pattern '+nextcloud_aio_volumes/**'
- then
- RESTORE_FAILED=1
- echo "Failed to extract backup archive."
- else
- # Delete files/dirs present locally, but not in the backup archive, excluding conf files
- # https://unix.stackexchange.com/a/759341
- # This comm does not support -z, but I doubt any file names would have \n in them
- #
- # These find patterns need to be kept in sync with the borg_excludes file and the rsync excludes in this
- # file, which use a different syntax (patterns appear in 3 places in total)
- echo "Deleting local files which do not exist in the backup"
- if ! find nextcloud_aio_volumes \
- -not \( \
- -path nextcloud_aio_volumes/nextcloud_aio_apache/caddy \
- -o -path "nextcloud_aio_volumes/nextcloud_aio_apache/caddy/*" \
- -o -path nextcloud_aio_volumes/nextcloud_aio_mastercontainer/caddy \
- -o -path "nextcloud_aio_volumes/nextcloud_aio_mastercontainer/caddy/*" \
- -o -path nextcloud_aio_volumes/nextcloud_aio_mastercontainer/certs \
- -o -path "nextcloud_aio_volumes/nextcloud_aio_mastercontainer/certs/*" \
- -o -path nextcloud_aio_volumes/nextcloud_aio_mastercontainer/session \
- -o -path "nextcloud_aio_volumes/nextcloud_aio_mastercontainer/session/*" \
- -o -path "nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/nextcloud.log*" \
- -o -path nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/audit.log \
- -o -path nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_running \
- -o -path nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/session_date_file \
- -o -path "nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg*" \
- -o -path "nextcloud_aio_nextcloud_data/lost+found" \
- "${ADDITIONAL_FIND_EXCLUDES[@]}" \
- \) \
- | LC_ALL=C sort \
- | LC_ALL=C comm -23 - \
- <(borg list "::$SELECTED_ARCHIVE" --short --exclude-from /borg_excludes --pattern '+nextcloud_aio_volumes/**' | LC_ALL=C sort) \
- > /tmp/local_files_not_in_backup
- then
- RESTORE_FAILED=1
- echo "Failed to delete local files not in backup archive."
- else
- # More robust than e.g. xargs as I got a ~"args line too long" error while testing that, but it's slower
- # https://stackoverflow.com/a/21848934
- while IFS= read -r file
- do rm -vrf -- "$file" || DELETE_FAILED=1
- done < /tmp/local_files_not_in_backup
-
- if [ "$DELETE_FAILED" = 1 ]; then
- RESTORE_FAILED=1
- echo "Failed to delete (some) local files not in backup archive."
- fi
- fi
- fi
+ # Restore the configuration file
+ if ! rsync --archive --human-readable -vv \
+ /tmp/borg/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json \
+ /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json; then
+ RESTORE_FAILED=1
+ echo "Something failed while restoring the configuration.json."
fi
# Set backup-mode to restore since it was a restore
CONTENTS="$(jq '."backup-mode" = "restore"' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
- # Reset the backup location vars to the currently used one
+ # Reset the backup path to the currently used one
CONTENTS="$(jq ".borg_backup_host_location = $BORG_LOCATION" /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
- CONTENTS="$(jq ".borg_remote_repo = $REMOTE_REPO" /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
- echo -E "${CONTENTS}" > /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json
# Reset the AIO password to the currently used one
CONTENTS="$(jq ".password = $AIO_PASSWORD" /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json)"
@@ -512,6 +366,8 @@ if [ "$BORG_MODE" = restore ]; then
chmod 770 "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_time"
fi
+ umount /tmp/borg
+
if [ "$RESTORE_FAILED" = 1 ]; then
exit 1
fi
@@ -528,12 +384,6 @@ if [ "$BORG_MODE" = restore ]; then
touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update"
chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update"
- # Add file to Netcloud container to trigger a preview scan the next time it starts
- if [ -n "$RESTORE_EXCLUDE_PREVIEWS" ]; then
- touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/trigger-preview.scan"
- chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/trigger-preview.scan"
- fi
-
# Delete redis cache
rm -f "/mnt/redis/dump.rdb"
fi
@@ -544,9 +394,9 @@ if [ "$BORG_MODE" = check ]; then
echo "Checking the backup integrity..."
# Perform the check
- if ! borg check -v --verify-data; then
+ if ! borg check -v --verify-data "$BORG_BACKUP_DIRECTORY"; then
echo "Some errors were found while checking the backup integrity!"
- echo "Check the AIO interface for advice on how to proceed now!"
+ echo "Check the AIO interface for advices on how to proceed now!"
exit 1
fi
@@ -562,7 +412,7 @@ if [ "$BORG_MODE" = "check-repair" ]; then
echo "Checking the backup integrity and repairing it..."
# Perform the check-repair
- if ! echo YES | borg check -v --repair; then
+ if ! echo YES | borg check -v --repair "$BORG_BACKUP_DIRECTORY"; then
echo "Some errors were found while checking and repairing the backup integrity!"
exit 1
fi
@@ -575,49 +425,24 @@ fi
# Do the backup test
if [ "$BORG_MODE" = test ]; then
- if [ -n "$BORG_REMOTE_REPO" ]; then
- if ! borg info > /dev/null; then
- echo "Borg could not get info from the remote repo."
- echo "See the above borg info output for details."
- exit 1
- fi
- else
- if ! [ -d "$BORG_BACKUP_DIRECTORY" ]; then
- echo "No 'borg' directory in the given backup directory found!"
- echo "Only the files/folders below have been found in the given directory."
- ls -a "$MOUNT_DIR"
- echo "Please adjust the directory so that the borg archive is positioned in a folder named 'borg' inside the given directory!"
- exit 1
- elif ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
- echo "A 'borg' directory was found but could not find the borg archive."
- echo "Only the files/folders below have been found in the borg directory."
- ls -a "$BORG_BACKUP_DIRECTORY"
- echo "The archive and most importantly the config file must be positioned directly in the 'borg' subfolder."
- exit 1
- fi
- fi
-
- if ! borg list >/dev/null; then
+ if ! [ -d "$BORG_BACKUP_DIRECTORY" ]; then
+ echo "No 'borg' directory in the given backup directory found!"
+ echo "Only the files/folders below have been found in the given directory."
+ ls -a "$MOUNT_DIR"
+ echo "Please adjust the directory so that the borg archive is positioned in a folder named 'borg' inside the given directory!"
+ exit 1
+ elif ! [ -f "$BORG_BACKUP_DIRECTORY/config" ]; then
+ echo "A 'borg' directory was found but could not find the borg archive."
+ echo "Only the files/folders below have been found in the borg directory."
+ ls -a "$BORG_BACKUP_DIRECTORY"
+ echo "The archive and most importantly the config file must be positioned directly in the 'borg' subfolder."
+ exit 1
+ elif ! borg list "$BORG_BACKUP_DIRECTORY"; then
echo "The entered path seems to be valid but could not open the backup archive."
echo "Most likely the entered password was wrong so please adjust it accordingly!"
exit 1
else
- if ! borg list | grep "nextcloud-aio"; then
- echo "The backup archive does not contain a valid Nextcloud AIO backup."
- echo "Most likely was the archive not created via Nextcloud AIO."
- exit 1
- else
- echo "Everything looks fine so feel free to continue!"
- exit 0
- fi
+ echo "Everything looks fine so feel free to continue!"
+ exit 0
fi
fi
-
-if [ "$BORG_MODE" = list ]; then
- echo "Updating backup list..."
- if ! borg info > /dev/null; then
- echo "Could not update the backup list."
- exit 1
- fi
- # The update gets done automatically in the wrapper start.sh script.
-fi
diff --git a/Containers/borgbackup/borg_excludes b/Containers/borgbackup/borg_excludes
deleted file mode 100644
index bbe6adaa..00000000
--- a/Containers/borgbackup/borg_excludes
+++ /dev/null
@@ -1,11 +0,0 @@
-# These patterns need to be kept in sync with rsync and find excludes in backupscript.sh,
-# which use a different syntax (patterns appear in 3 places in total)
-nextcloud_aio_volumes/nextcloud_aio_apache/caddy/
-nextcloud_aio_volumes/nextcloud_aio_mastercontainer/caddy/
-nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/nextcloud.log*
-nextcloud_aio_volumes/nextcloud_aio_nextcloud/data/audit.log
-nextcloud_aio_volumes/nextcloud_aio_mastercontainer/certs/
-nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/daily_backup_running
-nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/session_date_file
-nextcloud_aio_volumes/nextcloud_aio_mastercontainer/session/
-nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg*
\ No newline at end of file
diff --git a/Containers/borgbackup/start.sh b/Containers/borgbackup/start.sh
index bb7a8a6a..e8d93f58 100644
--- a/Containers/borgbackup/start.sh
+++ b/Containers/borgbackup/start.sh
@@ -2,7 +2,7 @@
# Variables
export MOUNT_DIR="/mnt/borgbackup"
-export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg" # necessary even when remote to store the aio-lockfile
+export BORG_BACKUP_DIRECTORY="$MOUNT_DIR/borg"
# Validate BORG_PASSWORD
if [ -z "$BORG_PASSWORD" ] && [ -z "$BACKUP_RESTORE_PASSWORD" ]; then
@@ -18,22 +18,10 @@ else
fi
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
-if [ -n "$BORG_REMOTE_REPO" ]; then
- export BORG_REPO="$BORG_REMOTE_REPO"
-
- # Location to create the borg ssh pub/priv key
- export BORGBACKUP_KEY="/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg"
-
- # Accept any host key the first time connecting to the remote. Strictly speaking should be provided by user but you'd
- # have to be very unlucky to get MitM'ed on your first connection.
- export BORG_RSH="ssh -o StrictHostKeyChecking=accept-new -i $BORGBACKUP_KEY"
-else
- export BORG_REPO="$BORG_BACKUP_DIRECTORY"
-fi
# Validate BORG_MODE
-if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != restore ] && [ "$BORG_MODE" != check ] && [ "$BORG_MODE" != "check-repair" ] && [ "$BORG_MODE" != "test" ] && [ "$BORG_MODE" != "list" ]; then
- echo "No correct BORG_MODE mode applied. Valid are 'backup', 'check', 'restore', 'test' and 'list'."
+if [ "$BORG_MODE" != backup ] && [ "$BORG_MODE" != restore ] && [ "$BORG_MODE" != check ] && [ "$BORG_MODE" != "check-repair" ] && [ "$BORG_MODE" != test ]; then
+ echo "No correct BORG_MODE mode applied. Valid are 'backup', 'check', 'restore' and 'test'."
exit 1
fi
@@ -48,8 +36,8 @@ fi
rm -f "/nextcloud_aio_volumes/nextcloud_aio_database_dump/backup-is-running"
# Get a list of all available borg archives
-if borg list &>/dev/null; then
- borg list | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
+if borg list "$BORG_BACKUP_DIRECTORY" &>/dev/null; then
+ borg list "$BORG_BACKUP_DIRECTORY" | grep "nextcloud-aio" | awk -F " " '{print $1","$3,$4}' > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
else
echo "" > "/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/backup_archives.list"
fi
diff --git a/Containers/clamav/Dockerfile b/Containers/clamav/Dockerfile
index 6910ae1c..6120f818 100644
--- a/Containers/clamav/Dockerfile
+++ b/Containers/clamav/Dockerfile
@@ -1,38 +1,26 @@
# syntax=docker/dockerfile:latest
-FROM alpine:3.23.3
+# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.3/alpine/Dockerfile
+FROM clamav/clamav:1.3.1-61
+
+COPY clamav.conf /clamav.conf
+COPY --chmod=775 start.script /start.script
RUN set -ex; \
apk upgrade --no-cache -a; \
- apk add --no-cache tzdata clamav clamav-milter supervisor bash; \
- mkdir -p /tmp /var/lib/clamav /run/clamav /var/log/supervisord /var/run/supervisord; \
- chmod 777 -R /tmp /run/clamav /var/log/clamav /var/log/supervisord /var/run/supervisord; \
- chown -R 100:100 /var/lib/clamav; \
- sed -i "s|#\?MaxDirectoryRecursion.*|MaxDirectoryRecursion 30|g" /etc/clamav/clamd.conf; \
- sed -i "s|#\?MaxScanSize.*|MaxScanSize 2000M|g" /etc/clamav/clamd.conf; \
- sed -i "s|#\?MaxFileSize.*|MaxFileSize 2000M|g" /etc/clamav/clamd.conf; \
- sed -i "s|#\?PCREMaxFileSize.*|PCREMaxFileSize 2000M|g" /etc/clamav/clamd.conf; \
-# StreamMaxLength must be synced with av_stream_max_length inside the Nextcloud files_antivirus plugin
- sed -i "s|#\?StreamMaxLength.*|StreamMaxLength 2000M|g" /etc/clamav/clamd.conf; \
- sed -i "s|#\?TCPSocket|TCPSocket|g" /etc/clamav/clamd.conf; \
- sed -i "s|^LocalSocket .*|LocalSocket /tmp/clamd.sock|g" /etc/clamav/clamd.conf; \
- sed -i "s|Example| |g" /etc/clamav/clamav-milter.conf; \
- sed -i "s|#\?MilterSocket inet:7357|MilterSocket inet:7357|g" /etc/clamav/clamav-milter.conf; \
- sed -i "s|#\?ClamdSocket unix:/run/clamav/clamd.sock|ClamdSocket unix:/tmp/clamd.sock|g" /etc/clamav/clamav-milter.conf; \
- sed -i "s|#\?OnInfected Quarantine|OnInfected Reject|g" /etc/clamav/clamav-milter.conf; \
- sed -i "s|#\?AddHeader Replace|AddHeader Add|g" /etc/clamav/clamav-milter.conf; \
- sed -i "s|#\?Foreground yes|Foreground yes|g" /etc/clamav/clamav-milter.conf
+ apk add --no-cache tzdata bash; \
+ mkdir -p /var/run/clamav /run/lock; \
+ chown -R clamav:clamav /var/run/clamav /run/clamav /var/log/clamav /var/lock /run/lock; \
+ chmod 777 -R /var/run/clamav /run/clamav /var/log/clamav /var/lock /run/lock /tmp; \
+ sed -i "/^set -eu/r /start.script" /init-unprivileged; \
+ rm /start.script; \
+ grep -q 'clamd --foreground &' /init-unprivileged; \
+ sed -i "s|clamd --foreground \&|clamd --foreground --config-file /tmp/clamd.conf \&|" /init-unprivileged; \
+ cat /init-unprivileged
-COPY --chmod=775 start.sh /start.sh
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
-COPY --chmod=664 supervisord.conf /supervisord.conf
-
-USER 100
-RUN set -ex; \
- freshclam --foreground --stdout
VOLUME /var/lib/clamav
-ENTRYPOINT ["/start.sh"]
-CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
-HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
+
+USER clamav
+
+LABEL com.centurylinklabs.watchtower.enable="false"
+
+ENTRYPOINT ["/init-unprivileged"]
diff --git a/Containers/clamav/clamav.conf b/Containers/clamav/clamav.conf
new file mode 100644
index 00000000..0b781bd3
--- /dev/null
+++ b/Containers/clamav/clamav.conf
@@ -0,0 +1,5 @@
+# AIO settings
+MaxDirectoryRecursion 30
+MaxFileSize 10G
+PCREMaxFileSize 10G
+StreamMaxLength 10G
diff --git a/Containers/clamav/healthcheck.sh b/Containers/clamav/healthcheck.sh
deleted file mode 100644
index fe8b5daa..00000000
--- a/Containers/clamav/healthcheck.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-if [ "$(echo "PING" | nc 127.0.0.1 3310)" != "PONG" ]; then
- echo "ERROR: Unable to contact server"
- exit 1
-fi
-
-echo "Clamd is up"
-exit 0
diff --git a/Containers/clamav/start.script b/Containers/clamav/start.script
new file mode 100644
index 00000000..c9a530ab
--- /dev/null
+++ b/Containers/clamav/start.script
@@ -0,0 +1,4 @@
+# Adjust settings
+cat /etc/clamav/clamd.conf > /tmp/clamd.conf
+CLAMAV_FILE="$(sed "s|10G|$MAX_SIZE|" /clamav.conf)"
+echo "$CLAMAV_FILE" >> /tmp/clamd.conf
diff --git a/Containers/clamav/start.sh b/Containers/clamav/start.sh
deleted file mode 100644
index 609120c1..00000000
--- a/Containers/clamav/start.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-# Print out clamav version for compliance reasons
-clamscan --version
-
-echo "Clamav started"
-
-exec "$@"
diff --git a/Containers/clamav/supervisord.conf b/Containers/clamav/supervisord.conf
deleted file mode 100644
index 1895ceb6..00000000
--- a/Containers/clamav/supervisord.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-[supervisord]
-nodaemon=true
-nodaemon=true
-logfile=/var/log/supervisord/supervisord.log
-pidfile=/var/run/supervisord/supervisord.pid
-childlogdir=/var/log/supervisord/
-logfile_maxbytes=50MB
-logfile_backups=10
-loglevel=error
-
-[program:freshclam]
-stdout_logfile=/dev/stdout
-stdout_logfile_maxbytes=0
-stderr_logfile=/dev/stderr
-stderr_logfile_maxbytes=0
-command=freshclam --foreground --stdout --daemon --daemon-notify=/etc/clamav/clamd.conf
-
-[program:clamd]
-stdout_logfile=/dev/stdout
-stdout_logfile_maxbytes=0
-stderr_logfile=/dev/stderr
-stderr_logfile_maxbytes=0
-command=clamd --foreground --config-file=/etc/clamav/clamd.conf
-
-[program:milter]
-stdout_logfile=/dev/stdout
-stdout_logfile_maxbytes=0
-stderr_logfile=/dev/stderr
-stderr_logfile_maxbytes=0
-command=clamav-milter --config-file=/etc/clamav/clamav-milter.conf
\ No newline at end of file
diff --git a/Containers/collabora-online/Dockerfile b/Containers/collabora-online/Dockerfile
deleted file mode 100644
index ec8b63f0..00000000
--- a/Containers/collabora-online/Dockerfile
+++ /dev/null
@@ -1,16 +0,0 @@
-# syntax=docker/dockerfile:latest
-# From https://gitlab.collabora.com/collabora-online/docker
-# hadolint ignore=DL3007
-FROM registry.gitlab.collabora.com/collabora-online/docker:latest
-
-USER root
-ARG DEBIAN_FRONTEND=noninteractive
-
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
-
-USER 1001
-
-HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
diff --git a/Containers/collabora-online/healthcheck.sh b/Containers/collabora-online/healthcheck.sh
deleted file mode 100644
index 45e9278b..00000000
--- a/Containers/collabora-online/healthcheck.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-# Unfortunately, no curl and no nc is installed in the container
-# and packages can also not be added as the package list is broken.
-# So always exiting 0 for now.
-# nc http://127.0.0.1:9980 || exit 1
-exit 0
diff --git a/Containers/collabora/Dockerfile b/Containers/collabora/Dockerfile
index d1693da0..26b41db7 100644
--- a/Containers/collabora/Dockerfile
+++ b/Containers/collabora/Dockerfile
@@ -1,15 +1,21 @@
# syntax=docker/dockerfile:latest
-# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/blob/master/docker/from-packages/Dockerfile
-FROM collabora/code:25.04.8.2.1
+# From a file located probably somewhere here: https://github.com/CollaboraOnline/online/tree/master/docker
+FROM collabora/code:24.04.5.2.1
USER root
ARG DEBIAN_FRONTEND=noninteractive
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
+# hadolint ignore=DL3008
+RUN set -ex; \
+ \
+ apt-get update; \
+ apt-get install -y --no-install-recommends \
+ tzdata \
+ netcat-openbsd \
+ ; \
+ rm -rf /var/lib/apt/lists/*;
-USER 1001
+USER 100
-HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+HEALTHCHECK CMD nc -z 127.0.0.1 9980 || exit 1
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/collabora/healthcheck.sh b/Containers/collabora/healthcheck.sh
deleted file mode 100644
index 45e9278b..00000000
--- a/Containers/collabora/healthcheck.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-# Unfortunately, no curl and no nc is installed in the container
-# and packages can also not be added as the package list is broken.
-# So always exiting 0 for now.
-# nc http://127.0.0.1:9980 || exit 1
-exit 0
diff --git a/Containers/docker-socket-proxy/Dockerfile b/Containers/docker-socket-proxy/Dockerfile
index ffc867a8..2a0a6a80 100644
--- a/Containers/docker-socket-proxy/Dockerfile
+++ b/Containers/docker-socket-proxy/Dockerfile
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:latest
-FROM haproxy:3.3.2-alpine
+FROM haproxy:3.0.3-alpine
# hadolint ignore=DL3002
USER root
@@ -18,6 +18,4 @@ COPY --chmod=664 haproxy.cfg /haproxy.cfg
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/docker-socket-proxy/haproxy.cfg b/Containers/docker-socket-proxy/haproxy.cfg
index 632df434..66a0c594 100644
--- a/Containers/docker-socket-proxy/haproxy.cfg
+++ b/Containers/docker-socket-proxy/haproxy.cfg
@@ -4,18 +4,16 @@ global
maxconn 10
defaults
- timeout connect 30s
- timeout client 30s
- timeout server 1800s
+ timeout connect 10s
+ timeout client 10s
+ timeout server 10s
frontend http
mode http
bind :::2375 v4v6
http-request deny unless { src 127.0.0.1 } || { src ::1 } || { src NC_IPV4_PLACEHOLDER } || { src NC_IPV6_PLACEHOLDER }
# docker system _ping
- http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping$ } METH_GET
- # docker inspect image: GET images/%s/json
- http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/images/.*/json } METH_GET
+ http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/_ping } METH_GET
# container inspect: GET containers/%s/json
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/json } METH_GET
# container inspect: GET containers/%s/logs
@@ -24,12 +22,7 @@ frontend http
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/((start)|(stop)) } METH_POST
# container rm: DELETE containers/%s
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+ } METH_DELETE
- # container update/exec: POST containers/%s/update containers/%s/exec
- http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/((update)|(exec)) } METH_POST
- # container put: PUT containers/%s/archive
- http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/nc_app_[a-zA-Z0-9_.-]+/archive } METH_PUT
- # run exec instance: POST exec/%s
- http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/exec/[a-zA-Z0-9_.-]+/start } METH_POST
+
# container create: POST containers/create?name=%s
# ACL to restrict container name to nc_app_[a-zA-Z0-9_.-]+
@@ -40,19 +33,19 @@ frontend http
# ACL to deny if there are any binds
acl binds_present req.body -m reg -i "\"HostConfig\"\s*:.*\"Binds\"\s*:"
# ACL to restrict the type of Mounts to volume
- acl type_not_volume req.body -m reg -i "\"Mounts\"\s*:\s*\[[^\]]*(\"Type\"\s*:\s*\"(?!volume\b)\w+\"[^\]]*)+\]"
+ acl type_not_volume req.body -m reg -i "\"Mounts\":\s*\[[^\]]*(\"Type\":\s*\"(?!volume\b)\w+\"[^\]]*)+\]"
http-request deny if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/create } nc_app_container_name !one_mount_volume binds_present type_not_volume METH_POST
- # ACL to restrict container creation, that it has HostConfig.Privileged(by searching for "Privileged" word in all payload)
- acl no_privileged_flag req.body -m reg -i "\"Privileged\""
+ # ACL to restrict container creation, that it has HostConfig.Privileged not set
+ acl no_privileged_flag req.body -m reg -i "\"HostConfig\":\s?{[^}]*\"Privileged\""
# ACL to allow mount volume with strict pattern for name: nc_app_[a-zA-Z0-9_.-]+_data
- acl nc_app_volume_data_only req.body -m reg -i "\"Mounts\"\s*:\s*\[\s*{[^}]*\"Source\"\s*:\s*\"nc_app_[a-zA-Z0-9_.-]+_data\""
+ acl nc_app_volume_data_only req.body -m reg -i "\"Mounts\":\s?\[\s?{[^}]*\"Source\":\s?\"nc_app_[a-zA-Z0-9_.-]+_data\""
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/create } nc_app_container_name !no_privileged_flag nc_app_volume_data_only METH_POST
# end of container create
# volume create: POST volumes/create
# restrict name
- acl nc_app_volume_data req.body -m reg -i "\"Name\"\s*:\s*\"nc_app_[a-zA-Z0-9_.-]+_data\""
+ acl nc_app_volume_data req.body -m reg -i "\"Name\":\s?\"nc_app_[a-zA-Z0-9_.-]+_data\""
# do not allow to use "device" word e.g., "--opt device=:/path/to/dir"
acl volume_no_device req.body -m reg -i "\"device\""
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/volumes/create } nc_app_volume_data !volume_no_device METH_POST
diff --git a/Containers/domaincheck/Dockerfile b/Containers/domaincheck/Dockerfile
index 374aba4a..1dae9f9d 100644
--- a/Containers/domaincheck/Dockerfile
+++ b/Containers/domaincheck/Dockerfile
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:latest
-FROM alpine:3.23.3
+FROM alpine:3.20.2
RUN set -ex; \
apk upgrade --no-cache -a; \
apk add --no-cache bash lighttpd netcat-openbsd; \
@@ -17,6 +17,4 @@ USER www-data
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD nc -z 127.0.0.1 $APACHE_PORT || exit 1
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/fulltextsearch/Dockerfile b/Containers/fulltextsearch/Dockerfile
index ff1e923f..45a4aa9d 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.10
+FROM elasticsearch:8.14.3
USER root
@@ -14,14 +14,10 @@ RUN set -ex; \
apt-get install -y --no-install-recommends \
tzdata \
; \
- rm -rf /var/lib/apt/lists/*;
-
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
+ rm -rf /var/lib/apt/lists/*; \
+ elasticsearch-plugin install --batch ingest-attachment
USER 1000:0
-HEALTHCHECK --interval=10s --timeout=5s --start-period=1m --retries=5 CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
-ENV ES_JAVA_OPTS="-Xms512M -Xmx512M"
+HEALTHCHECK CMD nc -z 127.0.0.1 9200 || exit 1
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/fulltextsearch/healthcheck.sh b/Containers/fulltextsearch/healthcheck.sh
deleted file mode 100644
index 5e888ea6..00000000
--- a/Containers/fulltextsearch/healthcheck.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-nc -z 127.0.0.1 9200 || exit 1
diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile
index b108ac18..8c37d694 100644
--- a/Containers/imaginary/Dockerfile
+++ b/Containers/imaginary/Dockerfile
@@ -1,10 +1,9 @@
# syntax=docker/dockerfile:latest
-FROM golang:1.25.6-alpine3.23 AS go
+FROM golang:1.22.5-alpine3.20 AS go
-ENV IMAGINARY_HASH=6a274b488759a896aff02f52afee6e50b5e3a3ee
+ENV IMAGINARY_HASH=6cd9edd1d3fb151eb773c14552886e4fc8e50138
RUN set -ex; \
- apk upgrade --no-cache -a; \
apk add --no-cache \
vips-dev \
vips-magick \
@@ -14,7 +13,7 @@ RUN set -ex; \
build-base; \
go install github.com/h2non/imaginary@"$IMAGINARY_HASH";
-FROM alpine:3.23.3
+FROM alpine:3.20.2
RUN set -ex; \
apk upgrade --no-cache -a; \
apk add --no-cache \
@@ -31,17 +30,14 @@ RUN set -ex; \
COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
COPY --chmod=775 start.sh /start.sh
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
ENV PORT=9000
-USER 65534
+USER nobody
# https://github.com/h2non/imaginary#memory-issues
ENV MALLOC_ARENA_MAX=2
ENTRYPOINT ["/start.sh"]
-HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+HEALTHCHECK CMD nc -z 127.0.0.1 "$PORT" || exit 1
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/imaginary/healthcheck.sh b/Containers/imaginary/healthcheck.sh
deleted file mode 100644
index 46d700fc..00000000
--- a/Containers/imaginary/healthcheck.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-nc -z 127.0.0.1 "$PORT" || exit 1
diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile
index f3079ca7..7fe76414 100644
--- a/Containers/mastercontainer/Dockerfile
+++ b/Containers/mastercontainer/Dockerfile
@@ -1,30 +1,20 @@
# syntax=docker/dockerfile:latest
# Docker CLI is a requirement
-FROM docker:29.2.0-cli AS docker
+FROM docker:27.1.1-cli AS docker
# Caddy is a requirement
-FROM caddy:2.10.2-alpine AS caddy
+FROM caddy:2.8.4-alpine AS caddy
-# From https://github.com/docker-library/php/blob/master/8.4/alpine3.23/fpm/Dockerfile
-FROM php:8.4.17-fpm-alpine3.23
+# From https://github.com/docker-library/php/blob/master/8.3/alpine3.20/fpm/Dockerfile
+FROM php:8.3.9-fpm-alpine3.20
EXPOSE 80
EXPOSE 8080
EXPOSE 8443
-# Overwrite home variable for subservices
-ENV HOME=/var/www
-
COPY --from=caddy /usr/bin/caddy /usr/bin/caddy
COPY --from=docker /usr/local/bin/docker /usr/local/bin/docker
-COPY community-containers /var/www/docker-aio/community-containers
-COPY php /var/www/docker-aio/php
-COPY --chmod=775 Containers/mastercontainer/*.sh /
-COPY --chmod=664 Containers/mastercontainer/Caddyfile /Caddyfile
-COPY --chmod=664 Containers/mastercontainer/supervisord.conf /supervisord.conf
-COPY Containers/mastercontainer/mastercontainer.conf /etc/apache2/sites-available/mastercontainer.conf
-
WORKDIR /var/www/docker-aio
# hadolint ignore=SC2086,DL3047,DL3003,DL3004
@@ -52,7 +42,7 @@ RUN set -ex; \
apk add --no-cache --virtual .build-deps \
autoconf \
build-base; \
- pecl install APCu-5.1.28; \
+ pecl install APCu-5.1.23; \
docker-php-ext-enable apcu; \
rm -r /tmp/pear; \
runDeps="$( \
@@ -74,11 +64,12 @@ RUN set -ex; \
wget https://getcomposer.org/installer -O - | php -- --install-dir=/usr/local/bin --filename=composer; \
chmod +x /usr/local/bin/composer; \
cd /var/www/docker-aio; \
- rm -r ./php/tests; \
+ git clone https://github.com/nextcloud-releases/all-in-one.git --depth 1 .; \
+ find ./ -maxdepth 1 -mindepth 1 -not -path ./php -not -path ./community-containers -exec rm -r {} \; ; \
chown www-data:www-data -R /var/www/docker-aio; \
cd php; \
- sudo -E -u www-data composer install --no-dev; \
- sudo -E -u www-data composer clear-cache; \
+ sudo -u www-data composer install --no-dev; \
+ sudo -u www-data composer clear-cache; \
cd ..; \
rm -f /usr/local/bin/composer; \
chmod -R 770 /var/www/docker-aio; \
@@ -125,10 +116,10 @@ RUN set -ex; \
mkdir /var/log/supervisord; \
mkdir /var/run/supervisord;
-# hadolint ignore=DL3048
-LABEL org.label-schema.vendor="Nextcloud" \
- wud.watch="false" \
- com.docker.compose.project="nextcloud-aio"
+COPY --chmod=775 *.sh /
+COPY --chmod=664 Caddyfile /Caddyfile
+COPY --chmod=664 supervisord.conf /supervisord.conf
+COPY mastercontainer.conf /etc/apache2/sites-available/mastercontainer.conf
# hadolint ignore=DL3002
USER root
diff --git a/Containers/mastercontainer/README.md b/Containers/mastercontainer/README.md
deleted file mode 100644
index de6b535d..00000000
--- a/Containers/mastercontainer/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Nextcloud All-in-One `mastercontainer`
-
-This folder contains the OCI/Docker container definition, along with associated resources and
-configuration files, for building the `mastercontainer` as part of the Nextcloud All-in-One
-project. This container hosts [the Nextcloud AIO interface](
-https://github.com/nextcloud/all-in-one/tree/main/php)[^app], and a dedicated PHP environment
-for it (which is completely independent of the Nextcloud Server).
-
-## Overview
-
-The mastercontainer acts as the central orchestration service for the deployment and management
-of all other containers in the Nextcloud All-in-One stack. It hosts:
-
-- A dedicated PHP SAPI/backend (php-fpm) for AIO itself (not Nextcloud Server)
-- An Apache service for accessing the AIO interface via a self-signed HTTPS VirtualHost on 8080/tcp
-- A Caddy reverse proxy service enabling HTTPS access to the AIO frontend on port 8443/tcp.
- - Caddy will automatically issue a Let's Encrypt issued certificate if port 80 and 8443
- is open/forwarded and a domain pointer is in place; then, simply open the Nextcloud AIO interface using the
- domain (`https://your-domain-that-points-to-this-server.tld:8443`). The Let's Encrypt certificate request will
- use an [ACME HTTP-01](https://letsencrypt.org/docs/challenge-types/#http-01-challenge) challenge.
-- Miscellaneous support services specific to AIO (backup management, health checks, etc.)
-
-## Key Responsibilities
-
-- Orchestrates the deployment and lifecycle of all Nextcloud service containers
-- Handles initial setup and container configuration
-- Coordinates image updates
-- Monitors general system health
-
-It triggers the initial installation and ensures the smooth operation of the Nextcloud
-All-in-One stack.
-
-## Contents
-
-- **Dockerfile**: Instructions for building the mastercontainer image.
-- **Entrypoint script**: The `start.sh` script is used for container initialization and runtime
- configuration before starting supervisord.
-- [**Nextcloud All-in-One Controller App**](https://github.com/nextcloud/all-in-one/tree/main/php): The
- core AIO orchestrator that handles configuration and settings for the containers.
-- **Supervisor**: The `supervisord.conf` file defines the long-running services hosted within
- the container (php-fpm, cron, etc.)
-
-## Usage
-
-This container should be used as the trigger image when deploying the Nextcloud All-in-One
-stack in a Docker or other OCI-compliant container environment. For detailed deployment
-instructions, refer to the [project documentation](
-https://github.com/nextcloud/all-in-one).
-
-## Related Resources
-
-- [Main Repository](https://github.com/nextcloud/all-in-one)
-- [Documentation](https://github.com/nextcloud/all-in-one#readme)
-
-## Contributing
-
-Contributions are welcome! Please follow the Nextcloud project's guidelines and submit pull
-requests or issues via the main repository.
-
-## License
-
-This folder and its contents are licensed under the
-[GNU AGPLv3](https://www.gnu.org/licenses/agpl-3.0.html), in line with the rest of Nextcloud
-All-in-One.
-
-[^app]: The Nextcloud All-in-One interface allows users to install, configure, and
-manage their Nextcloud instance and related containers via a secure web interface and API.
-It automates and simplifies complex tasks such as container orchestration, backups, updates,
-and service management for users deploying Nextcloud in Docker environments.
diff --git a/Containers/mastercontainer/cron.sh b/Containers/mastercontainer/cron.sh
index 67af80e7..fc8c4081 100644
--- a/Containers/mastercontainer/cron.sh
+++ b/Containers/mastercontainer/cron.sh
@@ -45,29 +45,29 @@ while true; do
# Check for updates and send notification if yes on saturdays
if [ "$(date +%u)" = 6 ]; then
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/UpdateNotification.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateNotification.php
fi
# Check if AIO is outdated
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/OutdatedNotification.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/OutdatedNotification.php
# Remove sessions older than 24h
find "/mnt/docker-aio-config/session/" -mindepth 1 -mmin +1440 -delete
# Remove nextcloud-aio-domaincheck container
- if sudo -E -u www-data docker ps --format "{{.Names}}" --filter "status=exited" | grep -q "^nextcloud-aio-domaincheck$"; then
- sudo -E -u www-data docker container remove nextcloud-aio-domaincheck
+ if sudo -u www-data docker ps --format "{{.Names}}" --filter "status=exited" | grep -q "^nextcloud-aio-domaincheck$"; then
+ sudo -u www-data docker container remove nextcloud-aio-domaincheck
fi
# Remove dangling images
- sudo -E -u www-data docker image prune --filter "label=org.label-schema.vendor=Nextcloud" --force
+ sudo -u www-data docker image prune --force
# Check for available free space
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/CheckFreeDiskSpace.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/CheckFreeDiskSpace.php
# Remove mastercontainer from default bridge network
- if sudo -E -u www-data docker inspect nextcloud-aio-mastercontainer --format "{{.NetworkSettings.Networks}}" | grep -q "bridge"; then
- sudo -E -u www-data docker network disconnect bridge nextcloud-aio-mastercontainer
+ if sudo -u www-data docker inspect nextcloud-aio-mastercontainer --format "{{.NetworkSettings.Networks}}" | grep -q "bridge"; then
+ sudo -u www-data docker network disconnect bridge nextcloud-aio-mastercontainer
fi
# Wait 60s so that the whole loop will not be executed again
diff --git a/Containers/mastercontainer/daily-backup.sh b/Containers/mastercontainer/daily-backup.sh
index 89ef3cd5..56302c80 100644
--- a/Containers/mastercontainer/daily-backup.sh
+++ b/Containers/mastercontainer/daily-backup.sh
@@ -2,13 +2,6 @@
echo "Daily backup script has started"
-# Check if initial configuration has been done, otherwise this script should do nothing.
-CONFIG_FILE=/mnt/docker-aio-config/data/configuration.json
-if ! [ -f "$CONFIG_FILE" ] || (! grep -q "wasStartButtonClicked.*1" "$CONFIG_FILE" && ! grep -q "wasStartButtonClicked.*true" "$CONFIG_FILE"); then
- echo "Initial configuration via AIO interface not done yet. Exiting..."
- exit 0
-fi
-
# Daily backup and backup check cannot be run at the same time
if [ "$DAILY_BACKUP" = 1 ] && [ "$CHECK_BACKUP" = 1 ]; then
echo "Daily backup and backup check cannot be run at the same time. Exiting..."
@@ -20,19 +13,14 @@ fi
if [ "$LOCK_FILE_PRESENT" = 0 ] || ! [ -f "/mnt/docker-aio-config/data/daily_backup_running" ]; then
find "/mnt/docker-aio-config/session/" -mindepth 1 -delete
fi
-sudo -E -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
+sudo -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
# Check if apache is running/stopped, watchtower is stopped and backupcontainer is stopped
-LOCAL_APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.Config.Env}}" | grep -o 'APACHE_PORT=[0-9]\+' | grep -o '[0-9]\+' | head -1)"
-if [ -z "$LOCAL_APACHE_PORT" ]; then
+APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.Config.Env}}" | grep -o 'APACHE_PORT=[0-9]\+' | grep -o '[0-9]\+' | head -1)"
+if [ -z "$APACHE_PORT" ]; then
echo "APACHE_PORT is not set which is not expected..."
else
- # Connect mastercontainer to nextcloud-aio network to make sure that nextcloud-aio-apache is reachable
- # Prevent issues like https://github.com/nextcloud/all-in-one/discussions/5222
- docker network connect nextcloud-aio nextcloud-aio-mastercontainer &>/dev/null
-
- # Wait for apache to start
- while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$LOCAL_APACHE_PORT"; do
+ while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do
echo "Waiting for apache to become available"
sleep 30
done
@@ -50,7 +38,7 @@ done
if [ "$AUTOMATIC_UPDATES" = 1 ]; then
echo "Starting mastercontainer update..."
echo "(The script might get exited due to that. In order to update all the other containers correctly, you need to run this script with the same settings a second time.)"
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/UpdateMastercontainer.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/UpdateMastercontainer.php
fi
# Wait for watchtower to stop
@@ -64,23 +52,17 @@ if [ "$AUTOMATIC_UPDATES" = 1 ]; then
done
fi
-# Update container images to reduce downtime later on
-if [ "$AUTOMATIC_UPDATES" = 1 ]; then
- echo "Updating container images..."
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/PullContainerImages.php
-fi
-
# Stop containers if required
# shellcheck disable=SC2235
if [ "$CHECK_BACKUP" != 1 ] && ([ "$DAILY_BACKUP" != 1 ] || [ "$STOP_CONTAINERS" = 1 ]); then
echo "Stopping containers..."
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/StopContainers.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/StopContainers.php
fi
# Execute the backup itself and some related tasks (also stops the containers)
if [ "$DAILY_BACKUP" = 1 ]; then
echo "Creating daily backup..."
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/CreateBackup.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/CreateBackup.php
if ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-borgbackup$"; then
echo "Something seems to be wrong: the borg container should be started at this step."
fi
@@ -93,17 +75,17 @@ fi
# Execute backup check
if [ "$CHECK_BACKUP" = 1 ]; then
echo "Starting backup check..."
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/CheckBackup.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/CheckBackup.php
fi
# Start and/or update containers
if [ "$AUTOMATIC_UPDATES" = 1 ]; then
echo "Starting and updating containers..."
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/StartAndUpdateContainers.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/StartAndUpdateContainers.php
else
if [ "$START_CONTAINERS" = 1 ]; then
echo "Starting containers without updating them..."
- sudo -E -u www-data php /var/www/docker-aio/php/src/Cron/StartContainers.php
+ sudo -u www-data php /var/www/docker-aio/php/src/Cron/StartContainers.php
fi
fi
diff --git a/Containers/mastercontainer/mastercontainer.conf b/Containers/mastercontainer/mastercontainer.conf
index 7d294694..6a7d37dd 100644
--- a/Containers/mastercontainer/mastercontainer.conf
+++ b/Containers/mastercontainer/mastercontainer.conf
@@ -1,5 +1,5 @@
-Listen 127.0.0.1:8000
-Listen 8080 https
+Listen 8000
+Listen 8080
# Deny access to .ht files
@@ -7,8 +7,8 @@ Listen 8080 https
# Http host
-
- ServerName 127.0.0.1
+
+ ServerName localhost
# Add error log
CustomLog /proc/self/fd/1 proxy
diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh
index a65e29ae..f4121c92 100644
--- a/Containers/mastercontainer/start.sh
+++ b/Containers/mastercontainer/start.sh
@@ -33,25 +33,17 @@ if [ "$*" != "" ]; then
fi
# Check if socket is available and readable
-if ! [ -e "/var/run/docker.sock" ]; then
+if ! [ -a "/var/run/docker.sock" ]; then
print_red "Docker socket is not available. Cannot continue."
echo "Please make sure to mount the docker socket into /var/run/docker.sock inside the container!"
echo "If you did this by purpose because you don't want the container to have access to the docker socket, see https://github.com/nextcloud/all-in-one/tree/main/manual-install."
- echo "And https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml"
exit 1
elif ! mountpoint -q "/mnt/docker-aio-config"; then
print_red "/mnt/docker-aio-config is not a mountpoint. Cannot proceed!"
echo "Please make sure to mount the nextcloud_aio_mastercontainer docker volume into /mnt/docker-aio-config inside the container!"
echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
exit 1
-elif mountpoint -q /var/www/docker-aio/php/containers.json; then
- print_red "/var/www/docker-aio/php/containers.json is a mountpoint. Cannot proceed!"
- echo "This is a not-supported customization of the mastercontainer!"
- echo "Please remove this bind-mount from the mastercontainer."
- echo "If you need to customize things, feel free to use https://github.com/nextcloud/all-in-one/tree/main/manual-install"
- echo "See https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml"
- exit 1
-elif ! sudo -E -u www-data test -r /var/run/docker.sock; then
+elif ! sudo -u www-data test -r /var/run/docker.sock; then
echo "Trying to fix docker.sock permissions internally..."
DOCKER_GROUP=$(stat -c '%G' /var/run/docker.sock)
DOCKER_GROUP_ID=$(stat -c '%g' /var/run/docker.sock)
@@ -69,68 +61,28 @@ elif ! sudo -E -u www-data test -r /var/run/docker.sock; then
groupadd -g "$DOCKER_GROUP_ID" docker
usermod -aG docker www-data
fi
- if ! sudo -E -u www-data test -r /var/run/docker.sock; then
+ if ! sudo -u www-data test -r /var/run/docker.sock; then
print_red "Docker socket is not readable by the www-data user. Cannot continue."
exit 1
fi
fi
-# Get default docker api version
-API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
-API_VERSION="$(grep -oP 'const string API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
-if [ -z "$API_VERSION" ]; then
- print_red "Could not get API_VERSION. Something is wrong!"
+# Check if api version is supported
+if ! sudo -u www-data docker info &>/dev/null; then
+ print_red "Cannot connect to the docker socket. Cannot proceed."
+ echo "Did you maybe remove group read permissions for the docker socket? AIO needs them in order to access the docker socket."
+ echo "If SELinux is enabled on your host, see https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled"
+ echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
exit 1
fi
-
-# Check if DOCKER_API_VERSION is set globally
-if [ -n "$DOCKER_API_VERSION" ]; then
- if ! echo "$DOCKER_API_VERSION" | grep -q '^[0-9].[0-9]\+$'; then
- print_red "You've set DOCKER_API_VERSION but not to an allowed value.
-The string must be a version number like e.g. '1.44'.
-It is set to '$DOCKER_API_VERSION'."
- exit 1
- fi
- print_red "DOCKER_API_VERSION was found to be set to '$DOCKER_API_VERSION'."
- print_red "Please note that only v$API_VERSION is officially supported and tested by the maintainers of Nextcloud AIO."
- print_red "So you run on your own risk and things might break without warning."
-else
- # Export docker api version to use it everywhere
- export DOCKER_API_VERSION="$API_VERSION"
-fi
-
-# Set a fallback docker api version. Needed for api version check.
-# The check will not work otherwise on old docker versions
-FALLBACK_DOCKER_API_VERSION="1.41"
-
-# Check if docker info can be used
-if ! sudo -E -u www-data docker info &>/dev/null; then
- if ! sudo -E -u www-data DOCKER_API_VERSION="$FALLBACK_DOCKER_API_VERSION" docker info &>/dev/null; then
- print_red "Cannot connect to the docker socket. Cannot proceed."
- echo "Did you maybe remove group read permissions for the docker socket? AIO needs them in order to access the docker socket."
- echo "If SELinux is enabled on your host, see https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled"
- echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
- echo "On macOS, see https://github.com/nextcloud/all-in-one#how-to-run-aio-on-macos"
- echo "Another possibility might be that Docker api v$API_VERSION is not supported by your docker daemon."
- echo "In that case, you should report this to https://github.com/nextcloud/all-in-one/issues"
- echo ""
- exit 1
- fi
-fi
-
-# Docker api version check
+API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
+API_VERSION="$(grep -oP 'const string API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
# shellcheck disable=SC2001
-API_VERSION_NUMB="$(echo "$DOCKER_API_VERSION" | sed 's/\.//')"
-LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
-if [ -z "$LOCAL_API_VERSION_NUMB" ]; then
- LOCAL_API_VERSION_NUMB="$(sudo -E -u www-data DOCKER_API_VERSION="$FALLBACK_DOCKER_API_VERSION" docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
-fi
+API_VERSION_NUMB="$(echo "$API_VERSION" | sed 's/\.//')"
+LOCAL_API_VERSION_NUMB="$(sudo -u www-data docker version | grep -i "api version" | grep -oP '[0-9]+.[0-9]+' | head -1 | sed 's/\.//')"
if [ -n "$LOCAL_API_VERSION_NUMB" ] && [ -n "$API_VERSION_NUMB" ]; then
if ! [ "$LOCAL_API_VERSION_NUMB" -ge "$API_VERSION_NUMB" ]; then
- print_red "Docker API v$DOCKER_API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
- echo "Alternatively, set the DOCKER_API_VERSION environmental variable to a compatible version."
- echo "However please note that only v$API_VERSION is officially supported and tested by the maintainers of Nextcloud AIO."
- echo "See https://github.com/nextcloud/all-in-one#how-to-adjust-the-internally-used-docker-api-version"
+ print_red "Docker API v$API_VERSION is not supported by your docker engine. Cannot proceed. Please upgrade your docker engine if you want to run Nextcloud AIO!"
exit 1
fi
else
@@ -139,34 +91,27 @@ else
fi
# Check Storage drivers
-STORAGE_DRIVER="$(sudo -E -u www-data docker info | grep "Storage Driver")"
+STORAGE_DRIVER="$(docker info | grep "Storage Driver")"
# Check if vfs is used: https://github.com/nextcloud/all-in-one/discussions/1467
if echo "$STORAGE_DRIVER" | grep -q vfs; then
echo "$STORAGE_DRIVER"
- print_red "Warning: It seems like the storage driver vfs is used. This will lead to problems with disk space and performance and is disrecommended!"
+ echo "Warning: It seems like the storage driver vfs is used. This will lead to problems with disk space and performance and is disrecommended!"
elif echo "$STORAGE_DRIVER" | grep -q fuse-overlayfs; then
echo "$STORAGE_DRIVER"
- print_red "Warning: It seems like the storage driver fuse-overlayfs is used. Please check if you can switch to overlay2 instead."
-fi
-
-# Check if snap install
-if sudo -E -u www-data docker info | grep "Docker Root Dir" | grep "/var/snap/docker/"; then
- print_red "Warning: It looks like your installation uses docker installed via snap."
- print_red "This comes with some limitations and is disrecommended by the docker maintainers."
- print_red "See for example https://github.com/nextcloud/all-in-one/discussions/4890#discussioncomment-10386752"
+ echo "Warning: It seems like the storage driver fuse-overlayfs is used. Please check if you can switch to overlay2 instead."
fi
# Check if startup command was executed correctly
-if ! sudo -E -u www-data docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-mastercontainer$"; then
+if ! sudo -u www-data docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-mastercontainer$"; then
print_red "It seems like you did not give the mastercontainer the correct name? (The 'nextcloud-aio-mastercontainer' container was not found.)
Using a different name is not supported since mastercontainer updates will not work in that case!
If you are on docker swarm and try to run AIO, see https://github.com/nextcloud/all-in-one#can-i-run-this-with-docker-swarm"
exit 1
-elif ! sudo -E -u www-data docker volume ls --format "{{.Name}}" | grep -q "^nextcloud_aio_mastercontainer$"; then
+elif ! sudo -u www-data docker volume ls --format "{{.Name}}" | grep -q "^nextcloud_aio_mastercontainer$"; then
print_red "It seems like you did not give the mastercontainer volume the correct name? (The 'nextcloud_aio_mastercontainer' volume was not found.)
Using a different name is not supported since the built-in backup solution will not work in that case!"
exit 1
-elif ! sudo -E -u www-data docker inspect nextcloud-aio-mastercontainer --format '{{.Mounts}}' | grep -q " nextcloud_aio_mastercontainer "; then
+elif ! sudo -u www-data docker inspect nextcloud-aio-mastercontainer | grep -q "nextcloud_aio_mastercontainer"; then
print_red "It seems like you did not attach the 'nextcloud_aio_mastercontainer' volume to the mastercontainer?
This is not supported since the built-in backup solution will not work in that case!"
exit 1
@@ -185,7 +130,7 @@ It is set to '$NEXTCLOUD_DATADIR'."
fi
if [ -n "$NEXTCLOUD_MOUNT" ]; then
if ! echo "$NEXTCLOUD_MOUNT" | grep -q "^/" || [ "$NEXTCLOUD_MOUNT" = "/" ]; then
- print_red "You've set NEXTCLOUD_MOUNT but not to an allowed value.
+ print_red "You've set NEXCLOUD_MOUNT but not to an allowed value.
The string must start with '/' and must not be equal to '/'.
It is set to '$NEXTCLOUD_MOUNT'."
exit 1
@@ -241,14 +186,6 @@ It is set to '$APACHE_IP_BINDING'."
exit 1
fi
fi
-if [ -n "$APACHE_ADDITIONAL_NETWORK" ]; then
- if ! echo "$APACHE_ADDITIONAL_NETWORK" | grep -q "^[a-zA-Z0-9._-]\+$"; then
- print_red "You've set APACHE_ADDITIONAL_NETWORK but not to an allowed value.
-It needs to be a string with letters, numbers, hyphens and underscores.
-It is set to '$APACHE_ADDITIONAL_NETWORK'."
- exit 1
- fi
-fi
if [ -n "$TALK_PORT" ]; then
if ! check_if_number "$TALK_PORT"; then
print_red "You provided an Talk port but did not only use numbers.
@@ -306,18 +243,28 @@ It is set to '$NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS'."
fi
fi
if [ -n "$AIO_COMMUNITY_CONTAINERS" ]; then
- print_red "You've set AIO_COMMUNITY_CONTAINERS but the option was removed.
-The community containers get managed via the AIO interface now."
+ read -ra AIO_CCONTAINERS <<< "$AIO_COMMUNITY_CONTAINERS"
+ for container in "${AIO_CCONTAINERS[@]}"; do
+ if ! [ -d "/var/www/docker-aio/community-containers/$container" ]; then
+ print_red "The community container $container was not found!"
+ FAIL_CCONTAINERS=1
+ fi
+ done
+ if [ -n "$FAIL_CCONTAINERS" ]; then
+ print_red "You've set AIO_COMMUNITY_CONTAINERS but at least one container was not found.
+It is set to '$AIO_COMMUNITY_CONTAINERS'."
+ exit 1
+ fi
fi
-# Check if ghcr.io is reachable
-# Solves issues like https://github.com/nextcloud/all-in-one/discussions/5268
-if ! curl --no-progress-meter https://ghcr.io/v2/ >/dev/null; then
- print_red "Could not reach https://ghcr.io."
- echo "Most likely is something blocking access to it."
+# Check DNS resolution
+# Prevents issues like https://github.com/nextcloud/all-in-one/discussions/565
+curl https://nextcloud.com &>/dev/null
+if [ "$?" = 6 ]; then
+ print_red "Could not resolve the host nextcloud.com."
+ echo "Most likely the DNS resolving does not work."
echo "You should be able to fix this by following https://dockerlabs.collabnix.com/intermediate/networking/Configuring_DNS.html"
- echo "Another solution is using https://github.com/nextcloud/all-in-one/tree/main/manual-install"
- echo "See https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml"
+ echo "Apart from that, there has been this: https://github.com/nextcloud/all-in-one/discussions/2065"
exit 1
fi
@@ -328,13 +275,6 @@ if [ -n "$TZ" ]; then
# Disable exit since it seems to be by default set on unraid and we dont want to break these instances
# exit 1
fi
-# Check that http proxy or no_proxy variable is not set which AIO does not support
-if [ -n "$HTTP_PROXY" ] || [ -n "$http_proxy" ] || [ -n "$HTTPS_PROXY" ] || [ -n "$https_proxy" ] || [ -n "$NO_PROXY" ] || [ -n "$no_proxy" ]; then
- print_red "The environmental variable HTTP_PROXY, http_proxy, HTTPS_PROXY, https_proxy, NO_PROXY or no_proxy has been set which is not supported by AIO."
- echo "If you need this, then you should use https://github.com/nextcloud/all-in-one/tree/main/manual-install"
- echo "See https://github.com/nextcloud/all-in-one/blob/main/manual-install/latest.yml"
- exit 1
-fi
if mountpoint -q /etc/localtime; then
print_red "/etc/localtime has been mounted into the container which is not allowed because AIO only supports running in the default Etc/UTC timezone!"
echo "The correct timezone can be set in the AIO interface later on!"
@@ -415,11 +355,6 @@ export TZ=Etc/UTC
# Fix apache startup
rm -f /var/run/apache2/httpd.pid
-# Fix caddy startup
-if [ -d "/mnt/docker-aio-config/caddy/locks" ]; then
- rm -rf /mnt/docker-aio-config/caddy/locks/*
-fi
-
# Fix the Caddyfile format
caddy fmt --overwrite /Caddyfile
@@ -427,4 +362,4 @@ caddy fmt --overwrite /Caddyfile
chmod 777 /root
# Start supervisord
-exec /usr/bin/supervisord -c /supervisord.conf
+/usr/bin/supervisord -c /supervisord.conf
diff --git a/Containers/mastercontainer/supervisord.conf b/Containers/mastercontainer/supervisord.conf
index fa5d0845..f64c9725 100644
--- a/Containers/mastercontainer/supervisord.conf
+++ b/Containers/mastercontainer/supervisord.conf
@@ -9,16 +9,16 @@ loglevel=error
user=root
[program:php-fpm]
-# Stdout logging is disabled as otherwise the logs are spammed
-stdout_logfile=NONE
+# stdout_logfile=/dev/stdout
+# stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=php-fpm
user=root
[program:apache]
-# Stdout logging is disabled as otherwise the logs are spammed
-stdout_logfile=NONE
+# stdout_logfile=/dev/stdout
+# stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
command=httpd -DFOREGROUND
@@ -58,7 +58,9 @@ user=root
[program:domain-validator]
# Logging is disabled as otherwise all attempts will be logged which spams the logs
-stdout_logfile=NONE
-stderr_logfile=NONE
+# stdout_logfile=/dev/stdout
+# stdout_logfile_maxbytes=0
+# stderr_logfile=/dev/stderr
+# stderr_logfile_maxbytes=0
command=php -S 127.0.0.1:9876 /var/www/docker-aio/php/domain-validator.php
user=www-data
diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile
index c6d9bf7e..7b74eda0 100644
--- a/Containers/nextcloud/Dockerfile
+++ b/Containers/nextcloud/Dockerfile
@@ -1,27 +1,22 @@
# syntax=docker/dockerfile:latest
-FROM php:8.3.30-fpm-alpine3.23
+FROM php:8.2.21-fpm-alpine3.20
ENV PHP_MEMORY_LIMIT=512M
-ENV PHP_UPLOAD_LIMIT=16G
+ENV PHP_UPLOAD_LIMIT=10G
ENV PHP_MAX_TIME=3600
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.5
+ENV NEXTCLOUD_VERSION=29.0.4
ENV AIO_TOKEN=123456
ENV AIO_URL=localhost
# AIO settings end # Do not remove or change this line!
-COPY --chmod=775 Containers/nextcloud/*.sh /
-COPY --chmod=774 Containers/nextcloud/upgrade.exclude /upgrade.exclude
-COPY Containers/nextcloud/config/*.php /
-COPY Containers/nextcloud/supervisord.conf /supervisord.conf
-
-# AIO cloning start # Do not remove or change this line!
-COPY app /usr/src/nextcloud/apps/nextcloud-aio
-COPY Containers/nextcloud/root.motd /root.motd
-# AIO cloning end # Do not remove or change this line!
+COPY --chmod=775 *.sh /
+COPY --chmod=774 upgrade.exclude /upgrade.exclude
+COPY config/*.php /
+COPY supervisord.conf /supervisord.conf
+COPY root.motd /root.motd
VOLUME /mnt/ncdata
VOLUME /var/www/html
@@ -82,18 +77,19 @@ RUN set -ex; \
; \
\
# pecl will claim success even if one install fails, so we need to perform each install separately
- pecl install -o igbinary-3.2.16; \
- pecl install APCu-5.1.28; \
- pecl install -D 'enable-memcached-igbinary="yes"' memcached-3.4.0; \
- pecl install -oD 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"' redis-6.3.0; \
- pecl install -o imagick-3.8.1; \
+ pecl install igbinary-3.2.15; \
+ pecl install APCu-5.1.23; \
+ pecl install memcached-3.2.0 \
+ --configureoptions 'enable-memcached-igbinary="yes"'; \
+ pecl install redis-6.0.2 \
+ --configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
+ pecl install imagick-3.7.0; \
\
docker-php-ext-enable \
igbinary \
apcu \
memcached \
redis \
- imagick \
; \
rm -r /tmp/pear; \
\
@@ -112,9 +108,8 @@ RUN set -ex; \
} >> /usr/local/etc/php/conf.d/docker-php-ext-igbinary.ini; \
\
# set recommended PHP.ini settings
-# see https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html#enable-php-opcache and below
+# see https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
{ \
- echo 'opcache.max_accelerated_files=10000'; \
echo 'opcache.memory_consumption=256'; \
echo 'opcache.interned_strings_buffer=64'; \
echo 'opcache.save_comments=1'; \
@@ -123,27 +118,23 @@ RUN set -ex; \
echo 'opcache.jit_buffer_size=8M'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini; \
\
- { \
- echo 'apc.enable_cli=1'; \
- echo 'apc.shm_size=64M'; \
- } >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
+ echo 'apc.enable_cli=1' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
\
{ \
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
echo 'max_execution_time=${PHP_MAX_TIME}'; \
- echo 'max_input_time=-1'; \
- echo 'default_socket_timeout=${PHP_MAX_TIME}'; \
+ echo 'max_input_time=${PHP_MAX_TIME}'; \
+ echo 'default_socket_timeout=600'; \
} > /usr/local/etc/php/conf.d/nextcloud.ini; \
\
{ \
echo 'session.save_handler = redis'; \
- echo 'session.save_path = "tcp://${REDIS_HOST}:${REDIS_PORT}?database=${REDIS_DB_INDEX}${REDIS_USER_AUTH}&auth[]=${REDIS_HOST_PASSWORD}"'; \
+ echo 'session.save_path = "tcp://${REDIS_HOST}:6379?auth=${REDIS_HOST_PASSWORD}"'; \
echo 'redis.session.locking_enabled = 1'; \
echo 'redis.session.lock_retries = -1'; \
echo 'redis.session.lock_wait_time = 10000'; \
- echo 'session.gc_maxlifetime = 86400'; \
} > /usr/local/etc/php/conf.d/redis-session.ini; \
\
mkdir -p /var/www/data; \
@@ -157,7 +148,7 @@ RUN set -ex; \
; \
\
curl -fsSL -o nextcloud.tar.bz2 \
- "https://github.com/nextcloud-releases/server/releases/download/v${NEXTCLOUD_VERSION}/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
+ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \
curl -fsSL -o nextcloud.tar.bz2.asc \
"https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
@@ -217,8 +208,8 @@ RUN set -ex; \
/var/log/supervisord \
/var/run/supervisord \
; \
- chmod 777 -R /var/log/supervisord; \
- chmod 777 -R /var/run/supervisord; \
+ chown www-data:root -R /var/log/supervisord; \
+ chown www-data:root -R /var/run/supervisord; \
\
apk add --no-cache \
bash \
@@ -246,23 +237,33 @@ RUN set -ex; \
sed -i 's/^pm.max_children =.*/pm.max_children = 5000/' /usr/local/etc/php-fpm.d/www.conf; \
sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf; \
\
- echo "[ -n \"\$TERM\" ] && [ -f /root.motd ] && cat /root.motd" >> /root/.bashrc; \
+# AIO cloning start # Do not remove or change this line!
+ rm -rf /tmp/nextcloud-aio && \
+ mkdir -p /tmp/nextcloud-aio && \
+ cd /tmp/nextcloud-aio && \
+ git clone https://github.com/nextcloud-releases/all-in-one.git --depth 1 .; \
+ mkdir -p /usr/src/nextcloud/apps/nextcloud-aio; \
+ cp -r ./app/* /usr/src/nextcloud/apps/nextcloud-aio/; \
+ echo "[ -n \"\$TERM\" ] && cat /root.motd" >> /root/.bashrc; \
+# AIO cloning end # Do not remove or change this line!
\
chown www-data:root -R /usr/src && \
- chmod 777 -R /usr/local/etc/php/conf.d && \
- chmod 777 -R /usr/local/etc/php-fpm.d && \
+ chown www-data:root -R /usr/local/etc/php/conf.d && \
+ chown www-data:root -R /usr/local/etc/php-fpm.d && \
chmod -R 777 /tmp; \
- chmod -R 777 /etc/openldap; \
+ rm -rf /usr/src/nextcloud/apps/updatenotification; \
\
mkdir -p /nc-updater; \
- chmod -R 777 /nc-updater
+ chown -R www-data:www-data /nc-updater; \
+ chmod -R 770 /nc-updater; \
+ \
+# Give root a random password
+ echo "root:$(openssl rand -base64 12)" | chpasswd
# hadolint ignore=DL3002
USER root
ENTRYPOINT ["/start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
-HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+HEALTHCHECK --start-period=60s CMD sudo -E -u www-data bash /healthcheck.sh
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/nextcloud/README.md b/Containers/nextcloud/README.md
deleted file mode 100644
index 574afd03..00000000
--- a/Containers/nextcloud/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Nextcloud All-in-One ``nextcloud`` Container
-
-This folder contains the OCI/Docker container definition, along with associated resources and configuration files, for building the `nextcloud` container as part of the [Nextcloud All-in-One](https://github.com/nextcloud/all-in-one) project. This container hosts PHP and the Nextcloud Server application.
-
-## Overview
-
-The Nextcloud container provides the core Nextcloud application environment, including the necessary dependencies and configuration for seamless integration into the All-in-One stack. The container hosts:
-
-- The PHP SAPI/backend (php-fpm)
-- Nextcloud background jobs and scheduled tasks, which are handled via cron
-- Miscellaneous minor support services specific to AIO's Nextcloud deployment (health and exec)
-
-## Contents
-
-- **Dockerfile**: Instructions for building the Nextcloud container image.
-- **Entrypoint script**: The `start.sh` script is used for container initialization and runtime configuration before starting supervisord.
-- **Nextcloud configuration files**: Specific to running in a containerized setting and/or within AIO.
-- **Supervisor**: The `supervisord.conf` file defines the long-running services hosted within the container (php-fpm, cron, etc.).
-
-## Usage
-
-This container is intended to be used as part of the All-in-One deployment and is not meant to be used on its own. Among other requirements, it needs a web server container (which AIO provides in a dedicated Apache container). It is designed to be orchestrated by the [All-in-One mastercontainer](https://github.com/nextcloud/all-in-one/tree/main/Containers/mastercontainer) or used within an [AIO Manual Installation](https://github.com/nextcloud/all-in-one/tree/main/manual-install) or [AIO Helm chart](https://github.com/nextcloud/all-in-one/tree/main/nextcloud-aio-helm-chart).
-
-## Documentation
-
-- [Nextcloud All-in-One Documentation](https://github.com/nextcloud/all-in-one#readme)
-- [Nextcloud Documentation](https://docs.nextcloud.com/)
-
-## Contributing
-
-Contributions are welcome! Please follow the Nextcloud project's guidelines and submit pull requests or issues via the main repository.
-
-## License
-
-This folder and its contents are licensed under the [GNU AGPLv3](https://www.gnu.org/licenses/agpl-3.0.html), in line with the rest of Nextcloud All-in-One.
diff --git a/Containers/nextcloud/config/apps.config.php b/Containers/nextcloud/config/apps.config.php
index 99bf5e40..6ccf8932 100644
--- a/Containers/nextcloud/config/apps.config.php
+++ b/Containers/nextcloud/config/apps.config.php
@@ -13,9 +13,6 @@ $CONFIG = array (
),
),
);
-if (getenv('APPS_ALLOWLIST')) {
+if (getenv('APPS_ALLOWLIST') !== false) {
$CONFIG['appsallowlist'] = explode(" ", getenv('APPS_ALLOWLIST'));
}
-if (getenv('NEXTCLOUD_APP_STORE_URL')) {
- $CONFIG['appstoreurl'] = getenv('NEXTCLOUD_APP_STORE_URL');
-}
diff --git a/Containers/nextcloud/config/certificates-bundle.config.php b/Containers/nextcloud/config/certificates-bundle.config.php
deleted file mode 100644
index cc05b06a..00000000
--- a/Containers/nextcloud/config/certificates-bundle.config.php
+++ /dev/null
@@ -1,5 +0,0 @@
- array(
- 'mode' => 'verify-ca',
- 'rootcert' => '/var/www/html/data/certificates/ca-bundle.crt',
- ),
- );
-}
-if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_MYSQL')) {
- $CONFIG = array(
- 'dbdriveroptions' => array(
- PDO::MYSQL_ATTR_SSL_CA => '/var/www/html/data/certificates/ca-bundle.crt',
- ),
- );
-}
-
diff --git a/Containers/nextcloud/config/proxy.config.php b/Containers/nextcloud/config/proxy.config.php
deleted file mode 100644
index c283f86e..00000000
--- a/Containers/nextcloud/config/proxy.config.php
+++ /dev/null
@@ -1,13 +0,0 @@
- array(
'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') ?: '',
+ 'sse_c_key' => getenv('OBJECTSTORE_S3_SSE_C_KEY') ?: '',
'region' => getenv('OBJECTSTORE_S3_REGION') ?: '',
'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '',
'port' => getenv('OBJECTSTORE_S3_PORT') ?: '',
'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: '',
'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:",
- 'autocreate' => strtolower($autocreate) !== 'false',
- 'use_ssl' => strtolower($use_ssl) !== 'false',
+ 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true,
+ 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true,
// required for some non Amazon S3 implementations
- 'use_path_style' => strtolower($use_path) === 'true',
+ 'use_path_style' => $use_path == true && strtolower($use_path) !== 'false',
// required for older protocol versions
- 'legacy_auth' => strtolower($use_legacyauth) === 'true',
- 'use_nextcloud_bundle' => 1,
+ 'legacy_auth' => $use_legacyauth == true && strtolower($use_legacyauth) !== 'false'
)
)
);
-
- $sse_c_key = getenv('OBJECTSTORE_S3_SSE_C_KEY');
- if ($sse_c_key) {
- $CONFIG['objectstore']['arguments']['sse_c_key'] = $sse_c_key;
- }
-}
+}
diff --git a/Containers/nextcloud/config/smtp.config.php b/Containers/nextcloud/config/smtp.config.php
index b57f9b68..40cfdf94 100644
--- a/Containers/nextcloud/config/smtp.config.php
+++ b/Containers/nextcloud/config/smtp.config.php
@@ -18,14 +18,3 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN'))
$CONFIG['mail_smtppassword'] = '';
}
}
-
-if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_MAILER')) {
- $CONFIG = array(
- 'mail_smtpstreamoptions' => array(
- 'ssl' => array(
- 'verify_peer_name' => false,
- 'cafile' => '/var/www/html/data/certificates/ca-bundle.crt',
- )
- )
- );
-}
diff --git a/Containers/nextcloud/entrypoint.sh b/Containers/nextcloud/entrypoint.sh
index d4b4f253..fd8fc382 100644
--- a/Containers/nextcloud/entrypoint.sh
+++ b/Containers/nextcloud/entrypoint.sh
@@ -11,106 +11,39 @@ directory_empty() {
}
run_upgrade_if_needed_due_to_app_update() {
- if php /var/www/html/occ status | grep maintenance | grep -q true; then
- php /var/www/html/occ maintenance:mode --off
- fi
if php /var/www/html/occ status | grep needsDbUpgrade | grep -q true; then
+ # Disable integrity check temporarily until next update
+ php /var/www/html/occ config:system:set integrity.check.disabled --type bool --value true
php /var/www/html/occ upgrade
php /var/www/html/occ app:enable nextcloud-aio --force
fi
}
-# Create cert bundle
-if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
-
- # Enable debug mode
- set -x
-
- # Default vars
- CERTIFICATES_ROOT_DIR="/var/www/html/data/certificates"
- CERTIFICATE_BUNDLE="/var/www/html/data/certificates/ca-bundle.crt"
-
- # Remove old root certs and recreate them with current ones
- rm -rf "$CERTIFICATES_ROOT_DIR"
- mkdir -p "$CERTIFICATES_ROOT_DIR"
-
- # Retrieve default root cert bundle
- if ! [ -f "$SOURCE_LOCATION/resources/config/ca-bundle.crt" ]; then
- echo "Root ca-bundle not found. Only concattening configured NEXTCLOUD_TRUSTED_CERTIFICATES files!"
- # Recreate cert file
- touch "$CERTIFICATE_BUNDLE"
- else
- # Write default bundle to the target ca file
- cat "$SOURCE_LOCATION/resources/config/ca-bundle.crt" > "$CERTIFICATE_BUNDLE"
- fi
-
- # Iterate through certs
- TRUSTED_CERTIFICATES="$(env | grep NEXTCLOUD_TRUSTED_CERTIFICATES_ | grep -oP '^[A-Z_a-z0-9]+')"
- mapfile -t TRUSTED_CERTIFICATES <<< "$TRUSTED_CERTIFICATES"
- for certificate in "${TRUSTED_CERTIFICATES[@]}"; do
-
- # Create new line
- echo "" >> "$CERTIFICATE_BUNDLE"
-
- # Check if variable is an actual cert
- if echo "${!certificate}" | grep -q "BEGIN CERTIFICATE" && echo "${!certificate}" | grep -q "END CERTIFICATE"; then
- # Write out cert to bundle
- echo "${!certificate}" >> "$CERTIFICATE_BUNDLE"
- fi
-
- # Create file in cert dir for extra logic in other places
- if ! [ -f "$CERTIFICATES_ROOT_DIR/$CERTIFICATE_NAME" ]; then
- touch "$CERTIFICATES_ROOT_DIR/$CERTIFICATE_NAME"
- fi
-
- done
-
- # 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
- sed -i "s|/var/www/html/data/certificates/MYSQL|/var/www/html/data/certificates/ca-bundle.crt|" /var/www/html/config/postgres.config.php
- fi
-
- # Print out bundle one last time
- cat "$CERTIFICATE_BUNDLE"
-
- # Disable debug mode
- set +x
-fi
-
-# Adjust DATABASE_TYPE to by Nextcloud supported value
-if [ "$DATABASE_TYPE" = postgres ]; then
- export DATABASE_TYPE=pgsql
-fi
-
-# Only start container if Redis is accessible
+# Only start container if redis is accessible
# shellcheck disable=SC2153
-while ! nc -z "$REDIS_HOST" "$REDIS_PORT"; do
- echo "Waiting for Redis to start..."
+while ! nc -z "$REDIS_HOST" "6379"; do
+ echo "Waiting for redis to start..."
sleep 5
done
# Check permissions in ncdata
-test_file="$NEXTCLOUD_DATA_DIR/this-is-a-test-file"
-touch "$test_file"
-if ! [ -f "$test_file" ]; then
- echo "The www-data user does not appear to have access rights to the data directory."
- echo "It is possible that the files are on a filesystem that does not support standard Linux permissions,"
- echo "or the permissions simply need to be adjusted. Please change the permissions as described below."
- echo "Current permissions are:"
- stat -c "%u:%g %a" "$NEXTCLOUD_DATA_DIR"
- echo "(userID:groupID permissions)"
- echo "They should be:"
- echo "33:0 750"
- echo "(userID:groupID permissions)"
- echo "Also, ensure that all parent directories on the host of your chosen data directory are publicly readable."
- echo "For example: sudo chmod +r /mnt (adjust this command as needed)."
- echo "If you want to use a FUSE mount as the data directory, add 'allow_other' as an additional mount option."
- echo "For SMB/CIFS mounts as the data directory, see:"
- echo " https://github.com/nextcloud/all-in-one#can-i-use-a-cifssmb-share-as-nextclouds-datadir"
+touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
+if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then
+ echo "The www-data user doesn't seem to have access rights in the datadir.
+Most likely are the files located on a drive that does not follow linux permissions.
+Please adjust the permissions like mentioned below.
+The found permissions are:
+$(stat -c "%u:%g %a" "$NEXTCLOUD_DATA_DIR")
+(userID:groupID permissions)
+but they should be:
+33:0 750
+(userID:groupID permissions)
+Also make sure that the parent directories on the host of the directory that you've chosen as datadir are publicly readable with e.g. 'sudo chmod +r /mnt' (adjust the command accordingly to your case) and the same for all subdirectories.
+Additionally, if you want to use a Fuse-mount as datadir, set 'allow_other' as additional mount option.
+For SMB/CIFS mounts as datadir, see https://github.com/nextcloud/all-in-one#can-i-use-a-cifssmb-share-as-nextclouds-datadir"
exit 1
fi
-rm -f "$test_file"
+rm "$NEXTCLOUD_DATA_DIR/this-is-a-test-file"
if [ -f /var/www/html/version.php ]; then
# shellcheck disable=SC2016
@@ -132,31 +65,26 @@ fi
# Don't start the container if Nextcloud is not compatible with the PHP version
if [ -f "/var/www/html/lib/versioncheck.php" ] && ! php /var/www/html/lib/versioncheck.php; then
- echo "Your installed Nextcloud version is not compatible with the PHP version provided by this image."
- echo "This typically occurs when you restore an older Nextcloud backup that does not support the"
- echo "PHP version included in this image."
- echo "Please restore a more recent backup that includes a compatible Nextcloud version."
- echo "If you do not have a more recent backup, refer to the manual upgrade documentation:"
- echo " https://github.com/nextcloud/all-in-one/blob/main/manual-upgrade.md"
+ echo "It seems like your installed Nextcloud is not compatible with the by the container provided PHP version."
+ echo "This most likely happened because you tried to restore an old Nextcloud version from backup that is not compatible with the PHP version that comes with the container."
+ echo "Please try to restore a more recent backup which contains a Nextcloud version that is compatible with the PHP version that comes with the container."
+ echo "If you do not have a more recent backup, feel free to have a look at this documentation: https://github.com/nextcloud/all-in-one/blob/main/manual-upgrade.md"
exit 1
fi
# Do not start the container if the last update failed
if [ -f "$NEXTCLOUD_DATA_DIR/update.failed" ]; then
echo "The last Nextcloud update failed."
- echo "Please restore from a backup and try again."
- echo "If you do not have a backup, you can delete the update.failed file in the data directory"
- echo "to allow the container to start again."
+ echo "Please restore from backup and try again!"
+ echo "If you do not have a backup in place, you can simply delete the update.failed file in the datadir which will allow the container to start again."
exit 1
fi
# Do not start the container if the install failed
if [ -f "$NEXTCLOUD_DATA_DIR/install.failed" ]; then
echo "The initial Nextcloud installation failed."
- echo "For more information about what went wrong, check the logs above."
- echo "Please reset AIO properly and try again."
- echo "See:"
- echo " https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance"
+ echo "Please reset AIO properly and try again. For further clues what went wrong, check the logs above."
+ echo "See https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance"
exit 1
fi
@@ -182,11 +110,8 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
curl -fsSL -o nextcloud.tar.bz2.asc "https://download.nextcloud.com/server/releases/latest-${NEXT_MAJOR}.tar.bz2.asc"
GNUPGHOME="$(mktemp -d)"
export GNUPGHOME
- if ! gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; then
- if ! gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 28806A878AE423A28372792ED75899B9A724937A; then
- curl -sSL https://nextcloud.com/nextcloud.asc | gpg --import
- fi
- fi
+ # gpg key from https://nextcloud.com/nextcloud.asc
+ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2
mkdir -p /usr/src/tmp
tar -xjf nextcloud.tar.bz2 -C /usr/src/tmp/
@@ -203,54 +128,45 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
rm -r /usr/src/tmp
rm -r /usr/src/temp-nextcloud
# shellcheck disable=SC2016
- image_version="$(php -r "require '$SOURCE_LOCATION/version.php'; echo implode('.', \$OC_Version);")"
+ image_version="$(php -r "require $SOURCE_LOCATION/version.php; echo implode('.', \$OC_Version);")"
IMAGE_MAJOR="${image_version%%.*}"
set +ex
# Do not skip major versions end # Do not remove or change this line!
fi
if [ "$installed_version" != "0.0.0.0" ]; then
-# Check connection to appstore start # Do not remove or change this line!
while true; do
- echo -e "Checking connection to the app store..."
- APPSTORE_URL="https://apps.nextcloud.com/api/v1"
- if grep -q appstoreurl /var/www/html/config/config.php; then
- set -x
- APPSTORE_URL="$(grep appstoreurl /var/www/html/config/config.php | grep -oP 'https://.*v[0-9]+')"
- set +x
- fi
- # Default appstoreurl parameter in config.php defaults to 'https://apps.nextcloud.com/api/v1' so we check for the apps.json file stored in there
- CURL_STATUS="$(curl -LI "$APPSTORE_URL"/apps.json -o /dev/null -w '%{http_code}\n' -s)"
+ echo -e "Checking connection to appstore"
+ CURL_STATUS="$(curl -LI "https://apps.nextcloud.com/" -o /dev/null -w '%{http_code}\n' -s)"
if [[ "$CURL_STATUS" = "200" ]]
then
- echo "App store is reachable."
+ echo "Appstore is reachable"
break
else
- echo "Curl did not return a 200 status. Is the app store reachable?"
+ echo "Curl didn't produce a 200 status, is appstore reachable?"
sleep 5
fi
done
-# Check connection to appstore end # Do not remove or change this line!
run_upgrade_if_needed_due_to_app_update
php /var/www/html/occ maintenance:mode --off
- echo "Getting and backing up the status of apps for later; this might take a while..."
+ echo "Getting and backing up the status of apps for later, this might take a while..."
NC_APPS="$(find /var/www/html/custom_apps/ -type d -maxdepth 1 -mindepth 1 | sed 's|/var/www/html/custom_apps/||g')"
if [ -z "$NC_APPS" ]; then
- echo "No apps detected. Aborting export of app status..."
+ echo "No apps detected, aborting export of app status..."
APPSTORAGE="no-export-done"
else
mapfile -t NC_APPS_ARRAY <<< "$NC_APPS"
declare -Ag APPSTORAGE
- echo "Disabling apps before the update to make the update procedure safer. This can take a while..."
+ echo "Disabling apps before the update in order to make the update procedure more safe. This can take a while..."
for app in "${NC_APPS_ARRAY[@]}"; do
if APPSTORAGE[$app]="$(php /var/www/html/occ config:app:get "$app" enabled)"; then
php /var/www/html/occ app:disable "$app"
else
APPSTORAGE[$app]=""
- echo "Not disabling $app because the occ command to get its enabled state failed."
+ echo "Not disabling $app because the occ command to get the enabled state was failing."
fi
done
fi
@@ -262,63 +178,29 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
php /var/www/html/occ app:update --all
run_upgrade_if_needed_due_to_app_update
+
+ # Fix removing the updatenotification for old instances
+ UPDATENOTIFICATION_STATUS="$(php /var/www/html/occ config:app:get updatenotification enabled)"
+ if [ -d "/var/www/html/apps/updatenotification" ]; then
+ php /var/www/html/occ app:disable updatenotification
+ elif [ "$UPDATENOTIFICATION_STATUS" != "no" ] && [ -n "$UPDATENOTIFICATION_STATUS" ]; then
+ php /var/www/html/occ config:app:set updatenotification enabled --value="no"
+ fi
fi
- echo "Initializing Nextcloud $image_version ..."
+ echo "Initializing nextcloud $image_version ..."
+ rsync -rlD --delete --exclude-from=/upgrade.exclude "$SOURCE_LOCATION/" /var/www/html/
- # Copy over initial data from Nextcloud archive
- rsync -rlD --delete \
- --exclude-from=/upgrade.exclude \
- "$SOURCE_LOCATION/" \
- /var/www/html/
-
- # Copy custom_apps from Nextcloud archive
- if ! directory_empty "$SOURCE_LOCATION/custom_apps"; then
- set -x
- for app in "$SOURCE_LOCATION/custom_apps"/*; do
- app_id="$(basename "$app")"
- mkdir -p "/var/www/html/custom_apps/$app_id"
- rsync -rlD --delete \
- --include "/$app_id/" \
- --exclude '/*' \
- "$SOURCE_LOCATION/custom_apps/" \
- /var/www/html/custom_apps/
- done
- set +x
- fi
-
- # Copy these from Nextcloud archive if they don't exist yet (i.e. new install)
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
- rsync -rlD \
- --include "/$dir/" \
- --exclude '/*' \
- "$SOURCE_LOCATION/" \
- /var/www/html/
+ rsync -rlD --include "/$dir/" --exclude '/*' "$SOURCE_LOCATION/" /var/www/html/
fi
done
-
- rsync -rlD --delete \
- --include '/config/' \
- --exclude '/*' \
- --exclude '/config/CAN_INSTALL' \
- --exclude '/config/config.sample.php' \
- --exclude '/config/config.php' \
- "$SOURCE_LOCATION/" \
- /var/www/html/
-
- rsync -rlD \
- --include '/version.php' \
- --exclude '/*' \
- "$SOURCE_LOCATION/" \
- /var/www/html/
-
+ rsync -rlD --delete --include '/config/' --exclude '/*' --exclude '/config/CAN_INSTALL' --exclude '/config/config.sample.php' --exclude '/config/config.php' "$SOURCE_LOCATION/" /var/www/html/
+ rsync -rlD --include '/version.php' --exclude '/*' "$SOURCE_LOCATION/" /var/www/html/
echo "Initializing finished"
- ################
- # Fresh Install
- ################
-
+ #install
if [ "$installed_version" = "0.0.0.0" ]; then
echo "New Nextcloud instance."
@@ -332,31 +214,21 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
INSTALL_OPTIONS+=(--data-dir "$NEXTCLOUD_DATA_DIR")
fi
- # Skip the default permission check (we do our own)
- cat > /var/www/html/config/datadir.permission.config.php <<'EOF'
+ # We do our own permission check so the permission check is not needed
+ cat << DATADIR_PERMISSION_CONF > /var/www/html/config/datadir.permission.config.php
false
- );
-EOF
+ \$CONFIG = array (
+ 'check_data_directory_permissions' => false
+);
+DATADIR_PERMISSION_CONF
- echo "Installing with $DATABASE_TYPE database"
+ echo "Installing with PostgreSQL database"
# Set a default value for POSTGRES_PORT
if [ -z "$POSTGRES_PORT" ]; then
- POSTGRES_PORT=5432
+ POSTGRES_PORT=5432
fi
+ INSTALL_OPTIONS+=(--database pgsql --database-name "$POSTGRES_DB" --database-user "$POSTGRES_USER" --database-pass "$POSTGRES_PASSWORD" --database-host "$POSTGRES_HOST" --database-port "$POSTGRES_PORT")
- # Add database options to INSTALL_OPTIONS
- # shellcheck disable=SC2153
- INSTALL_OPTIONS+=(
- --database "$DATABASE_TYPE"
- --database-name "$POSTGRES_DB"
- --database-user "$POSTGRES_USER"
- --database-pass "$POSTGRES_PASSWORD"
- --database-host "$POSTGRES_HOST"
- --database-port "$POSTGRES_PORT"
- )
-
echo "Starting Nextcloud installation..."
if ! php /var/www/html/occ maintenance:install "${INSTALL_OPTIONS[@]}"; then
echo "Installation of Nextcloud failed!"
@@ -378,7 +250,7 @@ EOF
if [ "$try" -ge "$max_retries" ]; then
echo "Installation of Nextcloud failed!"
- echo "Installation errors: $(cat /var/www/html/data/nextcloud.log)"
+ echo "Install errors: $(cat /var/www/html/data/nextcloud.log)"
touch "$NEXTCLOUD_DATA_DIR/install.failed"
exit 1
fi
@@ -390,10 +262,6 @@ EOF
# unset admin password
unset ADMIN_PASSWORD
- # Enable the updatenotification app but disable its UI and server update notifications
- php /var/www/html/occ config:system:set updatechecker --type=bool --value=false
- php /var/www/html/occ config:app:set updatenotification notify_groups --value="[]"
-
# AIO update to latest start # Do not remove or change this line!
if [ "$INSTALL_LATEST_MAJOR" = yes ]; then
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
@@ -414,19 +282,18 @@ EOF
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
INSTALLED_MAJOR="${installed_version%%.*}"
IMAGE_MAJOR="${image_version%%.*}"
- # If a valid upgrade path, trigger the Nextcloud built-in Updater
if ! [ "$INSTALLED_MAJOR" -gt "$IMAGE_MAJOR" ]; then
php /var/www/html/updater/updater.phar --no-interaction --no-backup
if ! php /var/www/html/occ -V || php /var/www/html/occ status | grep maintenance | grep -q 'true'; then
echo "Installation of Nextcloud failed!"
- # TODO: Add a hint here about what to do / where to look / updater.log?
touch "$NEXTCLOUD_DATA_DIR/install.failed"
exit 1
fi
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
fi
- php /var/www/html/occ config:system:set updatechecker --type=bool --value=true
+ php /var/www/html/occ app:disable updatenotification
+ rm -rf /var/www/html/apps/updatenotification
php /var/www/html/occ app:enable nextcloud-aio --force
php /var/www/html/occ db:add-missing-columns
php /var/www/html/occ db:add-missing-primary-keys
@@ -472,13 +339,15 @@ EOF
php /var/www/html/occ config:system:set activity_expire_days --value="30" --type=integer
php /var/www/html/occ config:system:set simpleSignUpLink.shown --type=bool --value=false
php /var/www/html/occ config:system:set share_folder --value="/Shared"
+ # Not needed anymore with the removal of the updatenotification app:
+ # php /var/www/html/occ config:app:set updatenotification notify_groups --value="[]"
# Install some apps by default
if [ -n "$STARTUP_APPS" ]; then
read -ra STARTUP_APPS_ARRAY <<< "$STARTUP_APPS"
for app in "${STARTUP_APPS_ARRAY[@]}"; do
if ! echo "$app" | grep -q '^-'; then
- if [ -z "$(find /var/www/html/apps /var/www/html/custom_apps -type d -maxdepth 1 -mindepth 1 -name "$app" )" ]; then
+ if [ -z "$(find /var/www/html/apps -type d -maxdepth 1 -mindepth 1 -name "$app" )" ]; then
# If not shipped, install and enable the app
php /var/www/html/occ app:install "$app"
else
@@ -496,11 +365,11 @@ EOF
#upgrade
else
touch "$NEXTCLOUD_DATA_DIR/update.failed"
- echo "Upgrading Nextcloud from $installed_version to $image_version..."
+ echo "Upgrading nextcloud from $installed_version to $image_version..."
php /var/www/html/occ config:system:delete integrity.check.disabled
if ! php /var/www/html/occ upgrade || ! php /var/www/html/occ -V; then
echo "Upgrade failed. Please restore from backup."
- bash /notify.sh "Nextcloud update to $image_version failed!" "Please restore from backup."
+ bash /notify.sh "Nextcloud update to $image_version failed!" "Please restore from backup!"
exit 1
fi
@@ -508,7 +377,7 @@ EOF
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
rm "$NEXTCLOUD_DATA_DIR/update.failed"
- bash /notify.sh "Nextcloud update to $image_version successful!" "You may inspect the Nextcloud container logs for more information."
+ bash /notify.sh "Nextcloud update to $image_version successful!" "Feel free to inspect the Nextcloud container logs for more info."
php /var/www/html/occ app:update --all
@@ -516,7 +385,7 @@ EOF
# Restore app status
if [ "${APPSTORAGE[0]}" != "no-export-done" ]; then
- echo "Restoring app statuses. This may take a while..."
+ echo "Restoring the status of apps. This can take a while..."
for app in "${!APPSTORAGE[@]}"; do
if [ -n "${APPSTORAGE[$app]}" ]; then
if [ "${APPSTORAGE[$app]}" != "no" ]; then
@@ -528,13 +397,13 @@ EOF
php /var/www/html/occ maintenance:mode --off
fi
run_upgrade_if_needed_due_to_app_update
- echo "The $app app could not be re-enabled, probably because it is not compatible with the new Nextcloud version."
+ echo "The $app app could not get enabled. Probably because it is not compatible with the new Nextcloud version."
if [ "$app" = apporder ]; then
CUSTOM_HINT="The apporder app was deprecated. A possible replacement is the side_menu app, aka 'Custom menu'."
else
- CUSTOM_HINT="Most likely, it is not compatible with the new Nextcloud version."
+ CUSTOM_HINT="Most likely because it is not compatible with the new Nextcloud version."
fi
- bash /notify.sh "Could not re-enable the $app app after the Nextcloud update!" "$CUSTOM_HINT Feel free to review the Nextcloud update logs and force-enable the app again if you wish."
+ bash /notify.sh "Could not enable the $app app after the Nextcloud update!" "$CUSTOM_HINT Feel free to look at the Nextcloud update logs and force-enable the app again from the app-store UI."
continue
fi
# Only restore the group settings, if the app was enabled (and is thus compatible with the new NC version)
@@ -550,21 +419,14 @@ EOF
run_upgrade_if_needed_due_to_app_update
- # Enable the updatenotification app but disable its UI and server update notifications
- php /var/www/html/occ config:system:set updatechecker --type=bool --value=false
- php /var/www/html/occ app:enable updatenotification
- php /var/www/html/occ config:app:set updatenotification notify_groups --value="[]"
-
# Apply optimization
- echo "Performing some optimizations..."
+ echo "Doing some optimizations..."
+ php /var/www/html/occ maintenance:repair
if [ "$NEXTCLOUD_SKIP_DATABASE_OPTIMIZATION" != yes ]; then
- php /var/www/html/occ maintenance:repair --include-expensive
php /var/www/html/occ db:add-missing-indices
php /var/www/html/occ db:add-missing-columns
php /var/www/html/occ db:add-missing-primary-keys
yes | php /var/www/html/occ db:convert-filecache-bigint
- else
- php /var/www/html/occ maintenance:repair
fi
fi
fi
@@ -587,10 +449,10 @@ if [ -z "$OBJECTSTORE_S3_BUCKET" ] && [ -z "$OBJECTSTORE_SWIFT_URL" ]; then
# Check if appdata is present
# If not, something broke (e.g. changing ncdatadir after aio was first started)
if [ -z "$(find "$NEXTCLOUD_DATA_DIR/" -maxdepth 1 -mindepth 1 -type d -name "appdata_*")" ]; then
- echo "Appdata is not present. Did you change the datadir after the initial Nextcloud installation? This is not supported!"
+ echo "Appdata is not present. Did you maybe change the datadir after the initial Nextcloud installation? This is not supported!"
echo "See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir"
- echo "If you moved the datadir to an external drive, make sure that the drive is still mounted."
- echo "The following was found in the datadir:"
+ echo "If you adjusted the datadir to be located on an external drive, make sure that the drive is still mounted!"
+ echo "In the datadir was found:"
ls -la "$NEXTCLOUD_DATA_DIR/"
exit 1
fi
@@ -611,12 +473,6 @@ if [ -f "$NEXTCLOUD_DATA_DIR/fingerprint.update" ]; then
rm "$NEXTCLOUD_DATA_DIR/fingerprint.update"
fi
-# Perform preview scan if previews were excluded from restore
-if [ -f "$NEXTCLOUD_DATA_DIR/trigger-preview.scan" ]; then
- php /var/www/html/occ files:scan-app-data preview -vvv
- rm "$NEXTCLOUD_DATA_DIR/trigger-preview.scan"
-fi
-
# AIO one-click settings start # Do not remove or change this line!
# Apply one-click-instance settings
echo "Applying one-click-instance settings..."
@@ -643,13 +499,6 @@ php /var/www/html/occ config:system:set upgrade.cli-upgrade-link --value="https:
php /var/www/html/occ config:system:set logfile --value="/var/www/html/data/nextcloud.log"
php /var/www/html/occ config:app:set admin_audit logfile --value="/var/www/html/data/audit.log"
php /var/www/html/occ config:system:set updatedirectory --value="/nc-updater"
-if [ -n "$NEXTCLOUD_SKELETON_DIRECTORY" ]; then
- if [ "$NEXTCLOUD_SKELETON_DIRECTORY" = "empty" ]; then
- php /var/www/html/occ config:system:set skeletondirectory --value=""
- else
- php /var/www/html/occ config:system:set skeletondirectory --value="$NEXTCLOUD_SKELETON_DIRECTORY"
- fi
-fi
if [ -n "$SERVERINFO_TOKEN" ] && [ -z "$(php /var/www/html/occ config:app:get serverinfo token)" ]; then
php /var/www/html/occ config:app:set serverinfo token --value="$SERVERINFO_TOKEN"
fi
@@ -665,7 +514,6 @@ php /var/www/html/occ config:system:set allow_local_remote_servers --type=bool -
php /var/www/html/occ config:system:set davstorage.request_timeout --value="$PHP_MAX_TIME" --type=int
php /var/www/html/occ config:system:set trusted_domains 1 --value="$NC_DOMAIN"
php /var/www/html/occ config:system:set overwrite.cli.url --value="https://$NC_DOMAIN/"
-php /var/www/html/occ config:system:set documentation_url.server_logs --value="https://github.com/nextcloud/all-in-one/discussions/5425"
php /var/www/html/occ config:system:set htaccess.RewriteBase --value="/"
php /var/www/html/occ maintenance:update:htaccess
@@ -715,17 +563,12 @@ if [ -n "$ADDITIONAL_TRUSTED_PROXY" ]; then
php /var/www/html/occ config:system:set trusted_proxies 2 --value="$ADDITIONAL_TRUSTED_PROXY"
fi
-# Get ipv4-address of Nextcloud
-if [ -z "$NEXTCLOUD_HOST" ]; then
- export NEXTCLOUD_HOST="nextcloud-aio-nextcloud"
-fi
-IPv4_ADDRESS="$(dig "$NEXTCLOUD_HOST" A +short +search | head -1)"
+# Get ipv4-address of Nextcloud
+IPv4_ADDRESS="$(dig nextcloud-aio-nextcloud A +short +search | head -1)"
# Bring it in CIDR notation
# shellcheck disable=SC2001
IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|0/16|')"
-if [ -n "$IPv4_ADDRESS" ]; then
- php /var/www/html/occ config:system:set trusted_proxies 10 --value="$IPv4_ADDRESS"
-fi
+php /var/www/html/occ config:system:set trusted_proxies 10 --value="$IPv4_ADDRESS"
if [ -n "$ADDITIONAL_TRUSTED_DOMAIN" ]; then
php /var/www/html/occ config:system:set trusted_domains 2 --value="$ADDITIONAL_TRUSTED_DOMAIN"
@@ -739,10 +582,6 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
COLLABORA_HOST="$NC_DOMAIN"
fi
set +x
- # Remove richdcoumentscode if it should be incorrectly installed
- if [ -d "/var/www/html/custom_apps/richdocumentscode" ]; then
- php /var/www/html/occ app:remove richdocumentscode
- fi
if ! [ -d "/var/www/html/custom_apps/richdocuments" ]; then
php /var/www/html/occ app:install richdocuments
elif [ "$(php /var/www/html/occ config:app:get richdocuments enabled)" != "yes" ]; then
@@ -764,7 +603,7 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
fi
fi
else
- echo "Warning: No IPv4 address found for $COLLABORA_HOST."
+ echo "Warning: No ipv4-address found for $COLLABORA_HOST."
fi
if [ -n "$COLLABORA_IPv6_ADDRESS" ]; then
if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$COLLABORA_IPv6_ADDRESS"; then
@@ -775,10 +614,10 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
fi
fi
else
- echo "No IPv6 address found for $COLLABORA_HOST."
+ echo "No ipv6-address found for $COLLABORA_HOST."
fi
if [ -n "$COLLABORA_ALLOW_LIST" ]; then
- PRIVATE_IP_RANGES='127.0.0.0/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,100.64.0.0/10,fd00::/8,::1/128'
+ PRIVATE_IP_RANGES='127.0.0.1/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,fd00::/8,::1'
if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$PRIVATE_IP_RANGES"; then
COLLABORA_ALLOW_LIST+=",$PRIVATE_IP_RANGES"
fi
@@ -789,7 +628,7 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
fi
php /var/www/html/occ config:app:set richdocuments wopi_allowlist --value="$COLLABORA_ALLOW_LIST"
else
- echo "Warning: wopi_allowlist is empty; this should not be the case!"
+ echo "Warning: wopi_allowlist is empty which should not be the case!"
fi
else
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/richdocuments" ]; then
@@ -799,52 +638,23 @@ fi
# OnlyOffice
if [ "$ONLYOFFICE_ENABLED" = 'yes' ]; then
- # Determine OnlyOffice port based on host pattern
- if echo "$ONLYOFFICE_HOST" | grep -q "nextcloud-.*-onlyoffice"; then
- ONLYOFFICE_PORT=80
- else
- ONLYOFFICE_PORT=443
- fi
-
- count=0
- while ! nc -z "$ONLYOFFICE_HOST" "$ONLYOFFICE_PORT" && [ "$count" -lt 90 ]; do
- echo "Waiting for OnlyOffice to become available..."
- count=$((count+5))
+ while ! nc -z "$ONLYOFFICE_HOST" 80; do
+ echo "waiting for OnlyOffice to become available..."
sleep 5
done
- if [ "$count" -ge 90 ]; then
- bash /notify.sh "Onlyoffice did not start in time!" "Skipping initialization and disabling onlyoffice app."
- php /var/www/html/occ app:disable onlyoffice
- else
- # Install or enable OnlyOffice app as needed
- if ! [ -d "/var/www/html/custom_apps/onlyoffice" ]; then
- php /var/www/html/occ app:install onlyoffice
- elif [ "$(php /var/www/html/occ config:app:get onlyoffice enabled)" != "yes" ]; then
- php /var/www/html/occ app:enable onlyoffice
- elif [ "$SKIP_UPDATE" != 1 ]; then
- php /var/www/html/occ app:update onlyoffice
- fi
-
- # Set OnlyOffice configuration
- php /var/www/html/occ config:system:set onlyoffice editors_check_interval --value="0" --type=integer
- php /var/www/html/occ config:system:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET"
- php /var/www/html/occ config:app:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET"
- php /var/www/html/occ config:system:set onlyoffice jwt_header --value="AuthorizationJwt"
-
- # Adjust the OnlyOffice host if using internal pattern
- if echo "$ONLYOFFICE_HOST" | grep -q "nextcloud-.*-onlyoffice"; then
- ONLYOFFICE_HOST="$NC_DOMAIN/onlyoffice"
- export ONLYOFFICE_HOST
- fi
-
- php /var/www/html/occ config:app:set onlyoffice DocumentServerUrl --value="https://$ONLYOFFICE_HOST"
+ if ! [ -d "/var/www/html/custom_apps/onlyoffice" ]; then
+ php /var/www/html/occ app:install onlyoffice
+ elif [ "$(php /var/www/html/occ config:app:get onlyoffice enabled)" != "yes" ]; then
+ php /var/www/html/occ app:enable onlyoffice
+ elif [ "$SKIP_UPDATE" != 1 ]; then
+ php /var/www/html/occ app:update onlyoffice
fi
+ php /var/www/html/occ config:system:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET"
+ php /var/www/html/occ config:app:set onlyoffice jwt_secret --value="$ONLYOFFICE_SECRET"
+ php /var/www/html/occ config:system:set onlyoffice jwt_header --value="AuthorizationJwt"
+ php /var/www/html/occ config:app:set onlyoffice DocumentServerUrl --value="https://$NC_DOMAIN/onlyoffice"
else
- # Remove OnlyOffice app if disabled and removal is requested
- if [ "$REMOVE_DISABLED_APPS" = yes ] && \
- [ -d "/var/www/html/custom_apps/onlyoffice" ] && \
- [ -n "$ONLYOFFICE_SECRET" ] && \
- [ "$(php /var/www/html/occ config:system:get onlyoffice jwt_secret)" = "$ONLYOFFICE_SECRET" ]; then
+ if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/onlyoffice" ] && [ -n "$ONLYOFFICE_SECRET" ] && [ "$(php /var/www/html/occ config:system:get onlyoffice jwt_secret)" = "$ONLYOFFICE_SECRET" ]; then
php /var/www/html/occ app:remove onlyoffice
fi
fi
@@ -890,16 +700,14 @@ fi
if [ -d "/var/www/html/custom_apps/spreed" ]; then
if [ "$TALK_RECORDING_ENABLED" = 'yes' ]; then
while ! nc -z "$TALK_RECORDING_HOST" 1234; do
- echo "Waiting for Talk Recording to become available..."
+ echo "waiting for Talk Recording to become available..."
sleep 5
done
# TODO: migrate to occ command if that becomes available
RECORDING_SERVERS_STRING="{\"servers\":[{\"server\":\"http://$TALK_RECORDING_HOST:1234/\",\"verify\":true}],\"secret\":\"$RECORDING_SECRET\"}"
php /var/www/html/occ config:app:set spreed recording_servers --value="$RECORDING_SERVERS_STRING"
else
- if [ "$REMOVE_DISABLED_APPS" = yes ]; then
- php /var/www/html/occ config:app:delete spreed recording_servers
- fi
+ php /var/www/html/occ config:app:delete spreed recording_servers
fi
fi
@@ -907,12 +715,12 @@ fi
if [ "$CLAMAV_ENABLED" = 'yes' ]; then
count=0
while ! nc -z "$CLAMAV_HOST" 3310 && [ "$count" -lt 90 ]; do
- echo "Waiting for ClamAV to become available..."
+ echo "waiting for clamav to become available..."
count=$((count+5))
sleep 5
done
if [ "$count" -ge 90 ]; then
- bash /notify.sh "ClamAV did not start in time!" "Skipping initialization and disabling files_antivirus app."
+ echo "Clamav did not start in time. Skipping initialization and disabling files_antivirus app."
php /var/www/html/occ app:disable files_antivirus
else
if ! [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
@@ -925,13 +733,9 @@ if [ "$CLAMAV_ENABLED" = 'yes' ]; then
php /var/www/html/occ config:app:set files_antivirus av_mode --value="daemon"
php /var/www/html/occ config:app:set files_antivirus av_port --value="3310"
php /var/www/html/occ config:app:set files_antivirus av_host --value="$CLAMAV_HOST"
- # av_stream_max_length must be synced with StreamMaxLength inside clamav
- php /var/www/html/occ config:app:set files_antivirus av_stream_max_length --value="2147483648"
- php /var/www/html/occ config:app:set files_antivirus av_max_file_size --value="-1"
+ php /var/www/html/occ config:app:set files_antivirus av_stream_max_length --value="$CLAMAV_MAX_SIZE"
+ php /var/www/html/occ config:app:set files_antivirus av_max_file_size --value="$CLAMAV_MAX_SIZE"
php /var/www/html/occ config:app:set files_antivirus av_infected_action --value="only_log"
- if [ -n "$CLAMAV_BLOCKLISTED_DIRECTORIES" ]; then
- php /var/www/html/occ config:app:set files_antivirus av_blocklisted_directories --value="$CLAMAV_BLOCKLISTED_DIRECTORIES"
- fi
fi
else
if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/files_antivirus" ]; then
@@ -942,7 +746,6 @@ fi
# Imaginary
if [ "$IMAGINARY_ENABLED" = 'yes' ]; then
php /var/www/html/occ config:system:set enabledPreviewProviders 0 --value="OC\\Preview\\Imaginary"
- php /var/www/html/occ config:system:set enabledPreviewProviders 23 --value="OC\\Preview\\ImaginaryPDF"
php /var/www/html/occ config:system:set preview_imaginary_url --value="http://$IMAGINARY_HOST:9000"
php /var/www/html/occ config:system:set preview_imaginary_key --value="$IMAGINARY_SECRET"
else
@@ -952,63 +755,50 @@ else
php /var/www/html/occ config:system:delete enabledPreviewProviders 20
php /var/www/html/occ config:system:delete enabledPreviewProviders 21
php /var/www/html/occ config:system:delete enabledPreviewProviders 22
- php /var/www/html/occ config:system:delete enabledPreviewProviders 23
fi
fi
# Fulltextsearch
if [ "$FULLTEXTSEARCH_ENABLED" = 'yes' ]; then
- count=0
- while ! nc -z "$FULLTEXTSEARCH_HOST" "$FULLTEXTSEARCH_PORT" && [ "$count" -lt 90 ]; do
- echo "Waiting for Fulltextsearch to become available..."
- count=$((count+5))
+ while ! nc -z "$FULLTEXTSEARCH_HOST" 9200; do
+ echo "waiting for Fulltextsearch to become available..."
sleep 5
done
- if [ "$count" -ge 90 ]; then
- echo "Fulltextsearch did not start in time. Skipping initialization and disabling fulltextsearch apps."
- php /var/www/html/occ app:disable fulltextsearch
- php /var/www/html/occ app:disable fulltextsearch_elasticsearch
- php /var/www/html/occ app:disable files_fulltextsearch
- else
- if [ -z "$FULLTEXTSEARCH_PROTOCOL" ]; then
- FULLTEXTSEARCH_PROTOCOL="http"
- fi
- if ! [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
- php /var/www/html/occ app:install fulltextsearch
- elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" != "yes" ]; then
- php /var/www/html/occ app:enable fulltextsearch
- elif [ "$SKIP_UPDATE" != 1 ]; then
- php /var/www/html/occ app:update fulltextsearch
- fi
- if ! [ -d "/var/www/html/custom_apps/fulltextsearch_elasticsearch" ]; then
- php /var/www/html/occ app:install fulltextsearch_elasticsearch
- elif [ "$(php /var/www/html/occ config:app:get fulltextsearch_elasticsearch enabled)" != "yes" ]; then
- php /var/www/html/occ app:enable fulltextsearch_elasticsearch
- elif [ "$SKIP_UPDATE" != 1 ]; then
- php /var/www/html/occ app:update fulltextsearch_elasticsearch
- fi
- if ! [ -d "/var/www/html/custom_apps/files_fulltextsearch" ]; then
- php /var/www/html/occ app:install files_fulltextsearch
- elif [ "$(php /var/www/html/occ config:app:get files_fulltextsearch enabled)" != "yes" ]; then
- php /var/www/html/occ app:enable files_fulltextsearch
- elif [ "$SKIP_UPDATE" != 1 ]; then
- php /var/www/html/occ app:update files_fulltextsearch
- fi
- php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}'
- php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"$FULLTEXTSEARCH_PROTOCOL://$FULLTEXTSEARCH_USER:$FULLTEXTSEARCH_PASSWORD@$FULLTEXTSEARCH_HOST:$FULLTEXTSEARCH_PORT\",\"elastic_index\":\"$FULLTEXTSEARCH_INDEX\"}"
- php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":true,\"files_office\":true}"
+ if ! [ -d "/var/www/html/custom_apps/fulltextsearch" ]; then
+ php /var/www/html/occ app:install fulltextsearch
+ elif [ "$(php /var/www/html/occ config:app:get fulltextsearch enabled)" != "yes" ]; then
+ php /var/www/html/occ app:enable fulltextsearch
+ elif [ "$SKIP_UPDATE" != 1 ]; then
+ php /var/www/html/occ app:update fulltextsearch
+ fi
+ if ! [ -d "/var/www/html/custom_apps/fulltextsearch_elasticsearch" ]; then
+ php /var/www/html/occ app:install fulltextsearch_elasticsearch
+ elif [ "$(php /var/www/html/occ config:app:get fulltextsearch_elasticsearch enabled)" != "yes" ]; then
+ php /var/www/html/occ app:enable fulltextsearch_elasticsearch
+ elif [ "$SKIP_UPDATE" != 1 ]; then
+ php /var/www/html/occ app:update fulltextsearch_elasticsearch
+ fi
+ if ! [ -d "/var/www/html/custom_apps/files_fulltextsearch" ]; then
+ php /var/www/html/occ app:install files_fulltextsearch
+ elif [ "$(php /var/www/html/occ config:app:get files_fulltextsearch enabled)" != "yes" ]; then
+ php /var/www/html/occ app:enable files_fulltextsearch
+ elif [ "$SKIP_UPDATE" != 1 ]; then
+ php /var/www/html/occ app:update files_fulltextsearch
+ fi
+ php /var/www/html/occ fulltextsearch:configure '{"search_platform":"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform"}'
+ php /var/www/html/occ fulltextsearch_elasticsearch:configure "{\"elastic_host\":\"http://elastic:$FULLTEXTSEARCH_PASSWORD@$FULLTEXTSEARCH_HOST:9200\",\"elastic_index\":\"nextcloud-aio\"}"
+ php /var/www/html/occ files_fulltextsearch:configure "{\"files_pdf\":\"1\",\"files_office\":\"1\"}"
- # Do the index
- if ! [ -f "$NEXTCLOUD_DATA_DIR/fts-index.done" ]; then
- echo "Waiting 10 seconds before activating fulltextsearch..."
- sleep 10
- echo "Activating fulltextsearch..."
- if php /var/www/html/occ fulltextsearch:test && php /var/www/html/occ fulltextsearch:index "{\"errors\": \"reset\"}" --no-readline; then
- touch "$NEXTCLOUD_DATA_DIR/fts-index.done"
- else
- echo "Fulltextsearch failed. Could not index."
- echo "If you want to skip indexing in the future, see https://github.com/nextcloud/all-in-one/discussions/1709"
- fi
+ # Do the index
+ if ! [ -f "$NEXTCLOUD_DATA_DIR/fts-index.done" ]; then
+ echo "Waiting 10s before activating FTS..."
+ sleep 10
+ echo "Activating fulltextsearch..."
+ if php /var/www/html/occ fulltextsearch:test && php /var/www/html/occ fulltextsearch:index "{\"errors\": \"reset\"}" --no-readline; then
+ touch "$NEXTCLOUD_DATA_DIR/fts-index.done"
+ else
+ echo "Fulltextsearch failed. Could not index."
+ echo "Feel free to follow https://github.com/nextcloud/all-in-one/discussions/1709 if you want to skip the indexing in the future."
fi
fi
else
@@ -1026,37 +816,19 @@ else
fi
# Docker socket proxy
-# app_api is a shipped app
-if [ -d "/var/www/html/custom_apps/app_api" ]; then
- php /var/www/html/occ app:disable app_api
- rm -r "/var/www/html/custom_apps/app_api"
-fi
-if [ "$DOCKER_SOCKET_PROXY_ENABLED" = 'yes' ]; then
- if [ "$(php /var/www/html/occ config:app:get app_api enabled)" != "yes" ]; then
- php /var/www/html/occ app:enable app_api
- fi
-else
- if [ "$REMOVE_DISABLED_APPS" = yes ]; then
- if [ "$(php /var/www/html/occ config:app:get app_api enabled)" != "no" ]; then
- php /var/www/html/occ app:disable app_api
+if version_greater "$installed_version" "27.1.2.0"; then
+ if [ "$DOCKER_SOCKET_PROXY_ENABLED" = 'yes' ]; then
+ if ! [ -d "/var/www/html/custom_apps/app_api" ]; then
+ php /var/www/html/occ app:install app_api
+ elif [ "$(php /var/www/html/occ config:app:get app_api enabled)" != "yes" ]; then
+ php /var/www/html/occ app:enable app_api
+ elif [ "$SKIP_UPDATE" != 1 ]; then
+ php /var/www/html/occ app:update app_api
+ fi
+ else
+ if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/app_api" ]; then
+ php /var/www/html/occ app:remove app_api
fi
- fi
-fi
-
-# Whiteboard app
-if [ "$WHITEBOARD_ENABLED" = 'yes' ]; then
- if ! [ -d "/var/www/html/custom_apps/whiteboard" ]; then
- php /var/www/html/occ app:install whiteboard
- elif [ "$(php /var/www/html/occ config:app:get whiteboard enabled)" != "yes" ]; then
- php /var/www/html/occ app:enable whiteboard
- elif [ "$SKIP_UPDATE" != 1 ]; then
- php /var/www/html/occ app:update whiteboard
- fi
- php /var/www/html/occ config:app:set whiteboard collabBackendUrl --value="https://$NC_DOMAIN/whiteboard"
- php /var/www/html/occ config:app:set whiteboard jwt_secret_key --value="$WHITEBOARD_SECRET"
-else
- if [ "$REMOVE_DISABLED_APPS" = yes ] && [ -d "/var/www/html/custom_apps/whiteboard" ]; then
- php /var/www/html/occ app:remove whiteboard
fi
fi
diff --git a/Containers/nextcloud/notify-all.sh b/Containers/nextcloud/notify-all.sh
index f4dfa0fd..b11130d1 100644
--- a/Containers/nextcloud/notify-all.sh
+++ b/Containers/nextcloud/notify-all.sh
@@ -20,7 +20,7 @@ mapfile -t NC_USERS <<< "$NC_USERS"
for user in "${NC_USERS[@]}"
do
echo "Posting '$SUBJECT' to: $user"
- "${COMMAND[@]}" notification:generate "$user" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE" --object-type='update' --object-id="$SUBJECT"
+ "${COMMAND[@]}" notification:generate "$user" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE"
done
echo "Done!"
diff --git a/Containers/nextcloud/notify.sh b/Containers/nextcloud/notify.sh
index 2ac4ceac..f74ec16b 100644
--- a/Containers/nextcloud/notify.sh
+++ b/Containers/nextcloud/notify.sh
@@ -28,7 +28,7 @@ done
for admin in "${NC_ADMIN_USER[@]}"
do
echo "Posting '$SUBJECT' to: $admin"
- "${COMMAND[@]}" notification:generate "$admin" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE" --object-type='update' --object-id="$SUBJECT"
+ "${COMMAND[@]}" notification:generate "$admin" "$NC_DOMAIN: $SUBJECT" -l "$MESSAGE"
done
echo "Done!"
diff --git a/Containers/nextcloud/root.motd b/Containers/nextcloud/root.motd
index 00cb4805..d3cae8a9 100644
--- a/Containers/nextcloud/root.motd
+++ b/Containers/nextcloud/root.motd
@@ -1,4 +1,4 @@
Warning: You have logged in into the Nextcloud container as root user.
See https://github.com/nextcloud/all-in-one#how-to-run-occ-commands if you want to run occ commands.
-Apart from that, you can use 'sudo -E -u www-data php occ ' in order to run occ commands.
+Apart from that, you can use 'sudo -u www-data -E php occ ' in order to run occ commands.
Of course needs to be substituted with the command that you want to use.
diff --git a/Containers/nextcloud/run-exec-commands.sh b/Containers/nextcloud/run-exec-commands.sh
index e8066881..ab3abab7 100644
--- a/Containers/nextcloud/run-exec-commands.sh
+++ b/Containers/nextcloud/run-exec-commands.sh
@@ -1,10 +1,7 @@
#!/bin/bash
-# Wait until the apache container is ready
-while ! nc -z "$APACHE_HOST" "$APACHE_PORT"; do
- echo "Waiting for $APACHE_HOST to become available..."
- sleep 15
-done
+# Wait 15s for domain to be reachable
+sleep 15
if [ -n "$NEXTCLOUD_EXEC_COMMANDS" ]; then
echo "#!/bin/bash" > /tmp/nextcloud-exec-commands
@@ -19,13 +16,11 @@ else
echo "Activating Collabora config..."
php /var/www/html/occ richdocuments:activate-config
fi
+ # OnlyOffice must work also if using manual-install
+ if [ "$ONLYOFFICE_ENABLED" = yes ]; then
+ echo "Activating OnlyOffice config..."
+ php /var/www/html/occ onlyoffice:documentserver --check
+ fi
fi
-signal_handler() {
- exit 0
-}
-
-trap signal_handler SIGINT SIGTERM
-
-sleep inf &
-wait $!
+sleep inf
diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh
index a5f38534..0bbea739 100644
--- a/Containers/nextcloud/start.sh
+++ b/Containers/nextcloud/start.sh
@@ -8,7 +8,7 @@ fi
# Only start container if database is accessible
# POSTGRES_HOST must be set in the containers env vars and POSTGRES_PORT has a default above
# shellcheck disable=SC2153
-while ! sudo -E -u www-data nc -z "$POSTGRES_HOST" "$POSTGRES_PORT"; do
+while ! sudo -u www-data nc -z "$POSTGRES_HOST" "$POSTGRES_PORT"; do
echo "Waiting for database to start..."
sleep 5
done
@@ -17,15 +17,10 @@ done
POSTGRES_USER="oc_$POSTGRES_USER"
export POSTGRES_USER
-# Check that db type is not empty
-if [ -z "$DATABASE_TYPE" ]; then
- export DATABASE_TYPE=postgres
-fi
-
# Fix false database connection on old instances
if [ -f "/var/www/html/config/config.php" ]; then
sleep 2
- while ! sudo -E -u www-data psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" -c "select now()"; do
+ while ! sudo -u www-data psql -d "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB" -c "select now()"; do
echo "Waiting for the database to start..."
sleep 5
done
@@ -56,12 +51,12 @@ fi
set +x
# Check datadir permissions
-sudo -E -u www-data touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
+sudo -u www-data touch "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" &>/dev/null
if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then
chown -R www-data:root "$NEXTCLOUD_DATA_DIR"
chmod 750 -R "$NEXTCLOUD_DATA_DIR"
fi
-sudo -E -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file"
+sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file"
# Install additional dependencies
if [ -n "$ADDITIONAL_APKS" ]; then
@@ -86,15 +81,13 @@ fi
# Install additional php extensions
if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then
if ! [ -f "/additional-php-extensions-are-installed" ]; then
- # Allow to disable imagick without having to enable it each time
- if ! echo "$ADDITIONAL_PHP_EXTENSIONS" | grep -q imagick; then
- # Remove the ini file as there is no docker-php-ext-disable script available
- rm /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini
- fi
read -ra ADDITIONAL_PHP_EXTENSIONS_ARRAY <<< "$ADDITIONAL_PHP_EXTENSIONS"
for app in "${ADDITIONAL_PHP_EXTENSIONS_ARRAY[@]}"; do
if [ "$app" = imagick ]; then
- # imagick is already enabled by default, so does not need to be enabled anymore.
+ echo "Enabling Imagick..."
+ if ! docker-php-ext-enable imagick >/dev/null; then
+ echo "Could not install PHP extension imagick!"
+ fi
continue
fi
# shellcheck disable=SC2086
diff --git a/Containers/nextcloud/supervisord.conf b/Containers/nextcloud/supervisord.conf
index 1db885e9..184074af 100644
--- a/Containers/nextcloud/supervisord.conf
+++ b/Containers/nextcloud/supervisord.conf
@@ -39,7 +39,5 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
-# Restart the netcat command once a day to ensure that it stays reachable
-# See https://github.com/nextcloud/all-in-one/issues/6334
-command=timeout 86400 nc -lk 9001
+command=nc -lk 9001
user=www-data
diff --git a/Containers/notify-push/Dockerfile b/Containers/notify-push/Dockerfile
index 838c847c..2da52eef 100644
--- a/Containers/notify-push/Dockerfile
+++ b/Containers/notify-push/Dockerfile
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:latest
-FROM alpine:3.23.3
+FROM alpine:3.20.2
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
@@ -11,7 +11,6 @@ RUN set -ex; \
netcat-openbsd \
tzdata \
bash \
- jq \
openssl; \
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
@@ -22,6 +21,4 @@ USER 33
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/notify-push/start.sh b/Containers/notify-push/start.sh
index 26d74333..6180162f 100644
--- a/Containers/notify-push/start.sh
+++ b/Containers/notify-push/start.sh
@@ -1,13 +1,13 @@
#!/bin/bash
if [ -z "$NEXTCLOUD_HOST" ]; then
- echo "NEXTCLOUD_HOST needs to be provided. Exiting!"
+ echo "NEXTCLOUD_HOST need to be provided. Exiting!"
exit 1
elif [ -z "$POSTGRES_HOST" ]; then
- echo "POSTGRES_HOST needs to be provided. Exiting!"
+ echo "POSTGRES_HOST need to be provided. Exiting!"
exit 1
elif [ -z "$REDIS_HOST" ]; then
- echo "REDIS_HOST needs to be provided. Exiting!"
+ echo "REDIS_HOST need to be provided. Exiting!"
exit 1
fi
@@ -48,43 +48,9 @@ echo "notify-push was started"
if [ -z "$POSTGRES_PORT" ]; then
POSTGRES_PORT=5432
fi
-# Set a default for redis db index
-if [ -z "$REDIS_DB_INDEX" ]; then
- REDIS_DB_INDEX=0
-fi
-# Set a default value for REDIS_PORT
-if [ -z "$REDIS_PORT" ]; then
- REDIS_PORT=6379
-fi
-# Set a default for db type
-if [ -z "$DATABASE_TYPE" ]; then
- DATABASE_TYPE=postgres
-elif [ "$DATABASE_TYPE" != postgres ] && [ "$DATABASE_TYPE" != mysql ]; then
- echo "DB type must be either postgres or mysql"
- exit 1
-fi
-
-# Use the correct Postgres username
-if [ "$POSTGRES_USER" = nextcloud ]; then
- POSTGRES_USER="oc_$POSTGRES_USER"
- export POSTGRES_USER
-fi
-
-# URL-encode passwords
-POSTGRES_PASSWORD="$(jq -rn --arg v "$POSTGRES_PASSWORD" '$v|@uri')"
-REDIS_HOST_PASSWORD="$(jq -rn --arg v "$REDIS_HOST_PASSWORD" '$v|@uri')"
-
-# Postgres root cert
-if [ -f "/nextcloud/data/certificates/POSTGRES" ]; then
- CERT_OPTIONS="?sslmode=verify-ca&sslrootcert=/nextcloud/data/certificates/ca-bundle.crt"
-# Mysql root cert
-elif [ -f "/nextcloud/data/certificates/MYSQL" ]; then
- CERT_OPTIONS="?sslmode=verify-ca&ssl-ca=/nextcloud/data/certificates/ca-bundle.crt"
-fi
-
# Set sensitive values as env
-export DATABASE_URL="$DATABASE_TYPE://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB$CERT_OPTIONS"
-export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST:$REDIS_PORT/$REDIS_DB_INDEX"
+export DATABASE_URL="postgres://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB"
+export REDIS_URL="redis://:$REDIS_HOST_PASSWORD@$REDIS_HOST"
# Run it
/nextcloud/custom_apps/notify_push/bin/"$CPU_ARCH"/notify_push \
diff --git a/Containers/onlyoffice/Dockerfile b/Containers/onlyoffice/Dockerfile
index 13b4d456..8c899516 100644
--- a/Containers/onlyoffice/Dockerfile
+++ b/Containers/onlyoffice/Dockerfile
@@ -1,12 +1,8 @@
# syntax=docker/dockerfile:latest
# From https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/Dockerfile
-FROM onlyoffice/documentserver:9.2.1.1
+FROM onlyoffice/documentserver:8.1.1.1
# USER root is probably used
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
-
-HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+HEALTHCHECK CMD nc -z 127.0.0.1 80 || exit 1
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/onlyoffice/healthcheck.sh b/Containers/onlyoffice/healthcheck.sh
deleted file mode 100644
index 7a9d79d0..00000000
--- a/Containers/onlyoffice/healthcheck.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-nc -z 127.0.0.1 80 || exit 1
diff --git a/Containers/postgresql/Dockerfile b/Containers/postgresql/Dockerfile
index 56090f26..ff8de132 100644
--- a/Containers/postgresql/Dockerfile
+++ b/Containers/postgresql/Dockerfile
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:latest
-# From https://github.com/docker-library/postgres/blob/master/17/alpine3.23/Dockerfile
-FROM postgres:17.7-alpine
+# From https://github.com/docker-library/postgres/blob/master/16/alpine3.20/Dockerfile
+FROM postgres:16.3-alpine
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
@@ -39,10 +39,8 @@ RUN set -ex; \
VOLUME /mnt/data
-USER 999
+USER postgres
ENTRYPOINT ["/start.sh"]
HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/postgresql/healthcheck.sh b/Containers/postgresql/healthcheck.sh
index 9f303a3a..f72aeecf 100644
--- a/Containers/postgresql/healthcheck.sh
+++ b/Containers/postgresql/healthcheck.sh
@@ -2,6 +2,4 @@
test -f "/mnt/data/backup-is-running" && exit 0
-psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:11000/$POSTGRES_DB" -c "select now()" && exit 0
-
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@127.0.0.1:5432/$POSTGRES_DB" -c "select now()" || exit 1
diff --git a/Containers/postgresql/start.sh b/Containers/postgresql/start.sh
index 551bb10e..10e46550 100644
--- a/Containers/postgresql/start.sh
+++ b/Containers/postgresql/start.sh
@@ -99,7 +99,7 @@ if ( [ -f "$DATADIR/PG_VERSION" ] && [ "$PG_MAJOR" != "$(cat "$DATADIR/PG_VERSIO
fi
# Get the Owner
- DB_OWNER="$(grep -a "$GREP_STRING" "$DUMP_FILE" | head -1 | grep -oP 'Owner:.*$' | sed 's|Owner:||;s|[[:space:]]||g')"
+ DB_OWNER="$(grep -a "$GREP_STRING" "$DUMP_FILE" | head -1 | grep -oP 'Owner:.*$' | sed 's|Owner:||;s| ||g')"
if [ "$DB_OWNER" = "$POSTGRES_USER" ]; then
echo "Unfortunately was the found database owner of the dump file the same as the POSTGRES_USER $POSTGRES_USER"
echo "It is not possible to import a database dump from this database owner."
@@ -128,9 +128,7 @@ EOSQL
fi
# Shut down the database to be able to start it again
- # The smart mode disallows new connections, then waits for all existing clients to disconnect and any online backup to finish
- # Wait for 1800s to make sure that a checkpoint is completed successfully
- pg_ctl stop -m smart -t 1800
+ pg_ctl stop -m fast
# Change database port back to default
export PGPORT=5432
diff --git a/Containers/redis/Dockerfile b/Containers/redis/Dockerfile
index cc9181ad..d8a97f33 100644
--- a/Containers/redis/Dockerfile
+++ b/Containers/redis/Dockerfile
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:latest
-# From https://github.com/redis/docker-library-redis/blob/release/8.2/alpine/Dockerfile
-FROM redis:8.2.3-alpine
+# From https://github.com/docker-library/redis/blob/master/7.2/alpine/Dockerfile
+FROM redis:7.2.5-alpine
COPY --chmod=775 start.sh /start.sh
@@ -14,12 +14,8 @@ RUN set -ex; \
# Get rid of unused binaries
rm -f /usr/local/bin/gosu;
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
-
-USER 999
+USER redis
ENTRYPOINT ["/start.sh"]
-HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING || exit 1
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/redis/healthcheck.sh b/Containers/redis/healthcheck.sh
deleted file mode 100644
index 6588229f..00000000
--- a/Containers/redis/healthcheck.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1
diff --git a/Containers/talk-recording/Dockerfile b/Containers/talk-recording/Dockerfile
index 8df5b89e..e61a1680 100644
--- a/Containers/talk-recording/Dockerfile
+++ b/Containers/talk-recording/Dockerfile
@@ -1,13 +1,11 @@
# syntax=docker/dockerfile:latest
-FROM python:3.14.2-alpine3.23
+FROM python:3.12.4-alpine3.20
COPY --chmod=775 start.sh /start.sh
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
-ENV RECORDING_VERSION=v0.2.1
+ENV RECORDING_VERSION=v0.1
ENV ALLOW_ALL=false
ENV HPB_PROTOCOL=https
-ENV NC_PROTOCOL=https
ENV SKIP_VERIFY=false
ENV HPB_PATH=/standalone-signaling/
@@ -30,7 +28,7 @@ RUN set -ex; \
build-base \
linux-headers \
geckodriver; \
- useradd -d /tmp --system recording -u 122; \
+ useradd -d /tmp --system recording; \
# Give root a random password
echo "root:$(openssl rand -base64 12)" | chpasswd; \
git clone --recursive https://github.com/nextcloud/nextcloud-talk-recording --depth=1 --single-branch --branch "$RECORDING_VERSION" /src; \
@@ -50,13 +48,10 @@ RUN set -ex; \
build-base \
linux-headers;
-VOLUME /tmp
WORKDIR /tmp
-USER 122
+USER recording
ENTRYPOINT ["/start.sh"]
CMD ["python", "-m", "nextcloud.talk.recording", "--config", "/conf/recording.conf"]
-HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+HEALTHCHECK CMD nc -z 127.0.0.1 1234 || exit 1
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/talk-recording/healthcheck.sh b/Containers/talk-recording/healthcheck.sh
deleted file mode 100644
index 8397ab3c..00000000
--- a/Containers/talk-recording/healthcheck.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-nc -z 127.0.0.1 1234 || exit 1
diff --git a/Containers/talk-recording/recording.conf b/Containers/talk-recording/recording.conf
index cc8bd495..99515528 100644
--- a/Containers/talk-recording/recording.conf
+++ b/Containers/talk-recording/recording.conf
@@ -1,5 +1,3 @@
-# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
-# SPDX-License-Identifier: AGPL-3.0-or-later
[logs]
# Log level based on numeric values of Python logging levels:
# - Critical: 50
@@ -14,11 +12,6 @@
# IP and port to listen on for HTTP requests.
#listen = 127.0.0.1:8000
-[app]
-# Comma separated list of trusted proxies (IPs or CIDR networks) that may set
-# the "X-Forwarded-For" header.
-#trustedproxies =
-
[backend]
# Allow any hostname as backend endpoint. This is extremely insecure and should
# only be used during development.
@@ -107,18 +100,6 @@
# ffmpeg. The options given here fully override the default global options.
#common = ffmpeg -loglevel level+warning -n
-# The (additional) options given to ffmpeg for the audio input. The options
-# given here extend the default options for the audio input, although they do
-# not override them.
-# Default options: '-f pulse -i {AUDIO_SOURCE}'
-#inputaudio =
-
-# The (additional) options given to ffmpeg for the video input. The options
-# given here extend the default options for the video input, although they do
-# not override them.
-# Default options: '-f x11grab -draw_mouse 0 -video_size {WIDTH}x{HEIGHT} -i {VIDEO_SOURCE}'
-#inputvideo =
-
# The options given to ffmpeg to encode the audio output. The options given here
# fully override the default options for the audio output.
#outputaudio = -c:a libopus
@@ -139,31 +120,4 @@
# will use Google Chrome, or Chromium if Google Chrome is not installed.
# Allowed values: firefox, chrome
# Defaults to firefox
-#browser = firefox
-
-# Path to the Selenium driver to use for recordings.
-# If set the driver must match the browser being used (for example,
-# "/usr/bin/geckodriver" for "firefox"). If no driver is explicitly set Selenium
-# Manager will try to find the right one in $PATH, downloading it as a fallback.
-# Note that Selenium Manager does not work in some architectures (for example,
-# Linux on arm64/aarch64), so in those architectures the driver must be
-# explicitly set.
-#driverPath =
-
-# Path to the browser executable to use for recordings.
-# If set the executable must match the browser being used (for example,
-# "/usr/bin/firefox-esr" for "firefox"). If no executable is explicitly set
-# Selenium Manager will try to find the right one in $PATH. Depending on the
-# installed Selenium version if the executable is not found Selenium Manager may
-# also download the browser as a fallback.
-# Note that Selenium Manager does not work in some architectures (for example,
-# Linux on arm64/aarch64); in those architectures the Selenium driver will try
-# to find the executable, but the executable may need to be explicitly set if
-# not found by the driver.
-#browserPath =
-
-[stats]
-# Comma-separated list of IP addresses (or CIDR networks) that are allowed to
-# access the stats endpoint.
-# Leave commented to only allow access from "127.0.0.1".
-#allowed_ips =
+# browser = firefox
diff --git a/Containers/talk-recording/start.sh b/Containers/talk-recording/start.sh
index b49e5e9c..14a893a4 100644
--- a/Containers/talk-recording/start.sh
+++ b/Containers/talk-recording/start.sh
@@ -16,9 +16,6 @@ if [ -z "$HPB_DOMAIN" ]; then
export HPB_DOMAIN="$NC_DOMAIN"
fi
-# Delete all contents on startup to start fresh
-rm -fr /tmp/{*,.*}
-
cat << RECORDING_CONF > "/conf/recording.conf"
[logs]
# 30 means Warning
@@ -39,7 +36,7 @@ videoheight = 1080
directory = /tmp
[backend-1]
-url = ${NC_PROTOCOL}://${NC_DOMAIN}
+url = ${HPB_PROTOCOL}://${NC_DOMAIN}
secret = ${RECORDING_SECRET}
skipverify = ${SKIP_VERIFY}
@@ -59,8 +56,6 @@ extensionvideo = .webm
[recording]
browser = firefox
-driverPath = /usr/bin/geckodriver
-browserPath = /usr/bin/firefox
RECORDING_CONF
exec "$@"
diff --git a/Containers/talk/Dockerfile b/Containers/talk/Dockerfile
index e8d3d72f..d3d3e623 100644
--- a/Containers/talk/Dockerfile
+++ b/Containers/talk/Dockerfile
@@ -1,13 +1,12 @@
# syntax=docker/dockerfile:latest
-FROM nats:2.12.4-scratch AS nats
-FROM eturnal/eturnal:1.12.2-alpine AS eturnal
-FROM strukturag/nextcloud-spreed-signaling:2.0.4 AS signaling
-FROM alpine:3.23.3 AS janus
+FROM nats:2.10.18-scratch AS nats
+FROM eturnal/eturnal:1.12.0 AS eturnal
+FROM strukturag/nextcloud-spreed-signaling:1.3.2 AS signaling
+FROM alpine:3.20.2 AS janus
-ARG JANUS_VERSION=v1.3.3
+ARG JANUS_VERSION=v0.14.3
WORKDIR /src
RUN set -ex; \
- apk upgrade --no-cache -a; \
apk add --no-cache \
ca-certificates \
git \
@@ -35,9 +34,8 @@ RUN set -ex; \
make configs; \
rename -v ".jcfg.sample" ".jcfg" /usr/local/etc/janus/*.jcfg.sample
-FROM alpine:3.23.3
+FROM alpine:3.20.2
ENV ETURNAL_ETC_DIR="/conf"
-ENV SKIP_CERT_VERIFY=false
COPY --from=janus --chmod=777 --chown=1000:1000 /usr/local /usr/local
COPY --from=eturnal --chmod=777 --chown=1000:1000 /opt/eturnal /opt/eturnal
COPY --from=nats --chmod=777 --chown=1000:1000 /nats-server /usr/local/bin/nats-server
@@ -101,11 +99,9 @@ RUN set -ex; \
ln -s /opt/eturnal/bin/stun /usr/local/bin/stun; \
ln -s /opt/eturnal/bin/eturnalctl /usr/local/bin/eturnalctl
-USER 1000
+USER eturnal
ENTRYPOINT ["/start.sh"]
CMD ["supervisord", "-c", "/supervisord.conf"]
HEALTHCHECK CMD /healthcheck.sh
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/talk/server.conf.in b/Containers/talk/server.conf.in
index 8f437e30..b748cacd 100644
--- a/Containers/talk/server.conf.in
+++ b/Containers/talk/server.conf.in
@@ -55,15 +55,6 @@ blockkey = -encryption-key-
# value as configured in the respective internal services.
internalsecret = the-shared-secret-for-internal-clients
-[federation]
-# If set to "true", certificate validation of federation targets will be skipped.
-# This should only be enabled during development, e.g. to work with self-signed
-# certificates.
-#skipverify = false
-
-# Timeout in seconds for requests to federation targets.
-#timeout = 10
-
[backend]
# Type of backend configuration.
# Defaults to "static".
@@ -84,8 +75,7 @@ internalsecret = the-shared-secret-for-internal-clients
# For backend type "etcd":
# Key prefix of backend entries. All keys below will be watched and assumed to
# contain a JSON document with the following entries:
-# - "urls": List of urls of the Nextcloud instance.
-# - "url": Url of the Nextcloud instance (deprecated).
+# - "url": Url of the Nextcloud instance.
# - "secret": Shared secret for requests from and to the backend servers.
#
# Additional optional entries:
@@ -94,8 +84,8 @@ internalsecret = the-shared-secret-for-internal-clients
# - "sessionlimit": Number of sessions that are allowed to connect.
#
# Example:
-# "/signaling/backend/one" -> {"urls": ["https://nextcloud.domain1.invalid"], ...}
-# "/signaling/backend/two" -> {"urls": ["https://domain2.invalid/nextcloud"], ...}
+# "/signaling/backend/one" -> {"url": "https://nextcloud.domain1.invalid", ...}
+# "/signaling/backend/two" -> {"url": "https://domain2.invalid/nextcloud", ...}
#backendprefix = /signaling/backend
# Allow any hostname as backend endpoint. This is extremely insecure and should
@@ -123,8 +113,8 @@ connectionsperhost = 8
# Backend configurations as defined in the "[backend]" section above. The
# section names must match the ids used in "backends" above.
#[backend-id]
-# Comma-separated list of urls of the Nextcloud instance
-#urls = https://cloud.domain.invalid
+# URL of the Nextcloud instance
+#url = https://cloud.domain.invalid
# Shared secret for requests from and to the backend servers. Leave empty to use
# the common shared secret from above.
@@ -144,8 +134,8 @@ connectionsperhost = 8
#maxscreenbitrate = 2097152
#[another-backend]
-# Comma-separated list of urls of the Nextcloud instance
-#urls = https://cloud.otherdomain.invalid
+# URL of the Nextcloud instance
+#url = https://cloud.otherdomain.invalid
# Shared secret for requests from and to the backend servers. Leave empty to use
# the common shared secret from above.
@@ -180,13 +170,6 @@ connectionsperhost = 8
# proxy server that is used.
#maxscreenbitrate = 2097152
-# List of IP addresses / subnets that are allowed to be used by clients in
-# candidates. The allowed list has preference over the blocked list below.
-#allowedcandidates = 10.0.0.0/8
-
-# List of IP addresses / subnets to filter from candidates received by clients.
-#blockedcandidates = 1.2.3.0/24
-
# For type "proxy": timeout in seconds for requests to the proxy server.
#proxytimeout = 2
diff --git a/Containers/talk/start.sh b/Containers/talk/start.sh
index f89949f3..e73525b8 100644
--- a/Containers/talk/start.sh
+++ b/Containers/talk/start.sh
@@ -30,23 +30,14 @@ if [ -n "$IPv4_ADDRESS_TALK" ] && [ "$IPv4_ADDRESS_TALK_RELAY" = "$IPv4_ADDRESS_
IPv4_ADDRESS_TALK=""
fi
-set -x
-IP_BINDING="::"
-if grep -q "1" /sys/module/ipv6/parameters/disable \
-|| grep -q "1" /proc/sys/net/ipv6/conf/all/disable_ipv6 \
-|| grep -q "1" /proc/sys/net/ipv6/conf/default/disable_ipv6; then
- IP_BINDING="0.0.0.0"
-fi
-set +x
-
# Turn
cat << TURN_CONF > "/conf/eturnal.yml"
eturnal:
listen:
- - ip: "$IP_BINDING"
+ - ip: "::"
port: $TALK_PORT
transport: udp
- - ip: "$IP_BINDING"
+ - ip: "::"
port: $TALK_PORT
transport: tcp
log_dir: stdout
@@ -95,10 +86,9 @@ backends = backend-1
allowall = false
timeout = 10
connectionsperhost = 8
-skipverify = ${SKIP_CERT_VERIFY}
[backend-1]
-urls = https://${NC_DOMAIN}
+url = https://${NC_DOMAIN}
secret = ${SIGNALING_SECRET}
maxstreambitrate = ${TALK_MAX_STREAM_BITRATE}
maxscreenbitrate = ${TALK_MAX_SCREEN_BITRATE}
diff --git a/Containers/watchtower/Dockerfile b/Containers/watchtower/Dockerfile
index fc9ea093..cacebde7 100644
--- a/Containers/watchtower/Dockerfile
+++ b/Containers/watchtower/Dockerfile
@@ -1,21 +1,13 @@
# syntax=docker/dockerfile:latest
-FROM golang:1.25.6-alpine3.23 AS go
+# From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained
+FROM containrrr/watchtower:1.7.1 AS watchtower
-ENV WATCHTOWER_COMMIT_HASH=f522ce27e1fbe4618da54833025a95be62aa838a
+FROM alpine:3.20.2
-RUN set -ex; \
- apk upgrade --no-cache -a; \
- apk add --no-cache \
- build-base; \
- go install github.com/nicholas-fedor/watchtower@$WATCHTOWER_COMMIT_HASH # v1.14.0
+RUN apk upgrade --no-cache -a; \
+ apk add --no-cache bash
-FROM alpine:3.23.3
-
-RUN set -ex; \
- apk upgrade --no-cache -a; \
- apk add --no-cache bash ca-certificates tzdata
-
-COPY --from=go /go/bin/watchtower /watchtower
+COPY --from=watchtower /watchtower /watchtower
COPY --chmod=775 start.sh /start.sh
@@ -23,6 +15,4 @@ COPY --chmod=775 start.sh /start.sh
USER root
ENTRYPOINT ["/start.sh"]
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
+LABEL com.centurylinklabs.watchtower.enable="false"
diff --git a/Containers/watchtower/start.sh b/Containers/watchtower/start.sh
index cf16e7a4..2c7a1835 100644
--- a/Containers/watchtower/start.sh
+++ b/Containers/watchtower/start.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Check if socket is available and readable
-if ! [ -e "/var/run/docker.sock" ]; then
+if ! [ -a "/var/run/docker.sock" ]; then
echo "Docker socket is not available. Cannot continue."
exit 1
elif ! test -r /var/run/docker.sock; then
@@ -9,13 +9,6 @@ elif ! test -r /var/run/docker.sock; then
exit 1
fi
-if [ -f /run/.containerenv ]; then
- # If running under podman disable memory_swappiness setting in watchtower.
- # It is a necessary workaround until https://github.com/containers/podman/issues/23824 gets fixed.
- echo "Running under Podman. Setting WATCHTOWER_DISABLE_MEMORY_SWAPPINESS to 1."
- export WATCHTOWER_DISABLE_MEMORY_SWAPPINESS=1
-fi
-
if [ -n "$CONTAINER_TO_UPDATE" ]; then
exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE"
else
diff --git a/Containers/whiteboard/Dockerfile b/Containers/whiteboard/Dockerfile
deleted file mode 100644
index c83dd46b..00000000
--- a/Containers/whiteboard/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-# syntax=docker/dockerfile:latest
-# Probably from this file: https://github.com/nextcloud/whiteboard/blob/main/Dockerfile
-FROM ghcr.io/nextcloud-releases/whiteboard:v1.5.4
-
-USER root
-RUN set -ex; \
- apk add --no-cache bash jq; \
- chmod 777 -R /tmp; \
- if [ -f /usr/lib/chromium/chrome_crashpad_handler ] && [ ! -f /usr/lib/chromium/chrome_crashpad_handler.real ]; then \
- mv /usr/lib/chromium/chrome_crashpad_handler /usr/lib/chromium/chrome_crashpad_handler.real; \
- printf '%s\n' '#!/bin/sh' "exec /usr/lib/chromium/chrome_crashpad_handler.real --no-periodic-tasks --database=\"\${CRASHPAD_DATABASE:-/tmp/chrome-crashpad}\" \"\$@\"" >/usr/lib/chromium/chrome_crashpad_handler; \
- chmod +x /usr/lib/chromium/chrome_crashpad_handler; \
- fi
-USER 65534
-
-COPY --chmod=775 start.sh /start.sh
-COPY --chmod=775 healthcheck.sh /healthcheck.sh
-
-HEALTHCHECK CMD /healthcheck.sh
-
-WORKDIR /tmp
-
-ENTRYPOINT ["/start.sh"]
-
-LABEL com.centurylinklabs.watchtower.enable="false" \
- wud.watch="false" \
- org.label-schema.vendor="Nextcloud"
diff --git a/Containers/whiteboard/healthcheck.sh b/Containers/whiteboard/healthcheck.sh
deleted file mode 100644
index 5909db82..00000000
--- a/Containers/whiteboard/healthcheck.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-nc -z "$REDIS_HOST" "$REDIS_PORT" || exit 0
-nc -z 127.0.0.1 3002 || exit 1
diff --git a/Containers/whiteboard/start.sh b/Containers/whiteboard/start.sh
deleted file mode 100644
index e0babd7f..00000000
--- a/Containers/whiteboard/start.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# Only start container if nextcloud is accessible
-while ! nc -z "$REDIS_HOST" "$REDIS_PORT"; do
- echo "Waiting for redis to start..."
- sleep 5
-done
-
-# Set a default for redis db index
-if [ -z "$REDIS_DB_INDEX" ]; then
- REDIS_DB_INDEX=0
-fi
-
-# URL-encode password
-REDIS_HOST_PASSWORD="$(jq -rn --arg v "$REDIS_HOST_PASSWORD" '$v|@uri')"
-
-export REDIS_URL="redis://$REDIS_USER:$REDIS_HOST_PASSWORD@$REDIS_HOST:$REDIS_PORT/$REDIS_DB_INDEX"
-
-# Run it
-exec npm --prefix /app run server:start
diff --git a/app/appinfo/info.xml b/app/appinfo/info.xml
index 832d3ccd..e064273d 100644
--- a/app/appinfo/info.xml
+++ b/app/appinfo/info.xml
@@ -5,7 +5,7 @@
Nextcloud All-in-OneProvides a login link for admins.Add a link to the admin settings that gives access to the Nextcloud All-in-One admin interface
- 0.8.0
+ 0.6.0agplAzulAllInOne
@@ -13,11 +13,20 @@
monitoringhttps://github.com/nextcloud/all-in-one/issues
-
+ OCA\AllInOne\Settings\Admin
+
+
diff --git a/app/templates/admin.php b/app/templates/admin.php
index 4812ad90..8256dfab 100644
--- a/app/templates/admin.php
+++ b/app/templates/admin.php
@@ -10,7 +10,7 @@ declare(strict_types=1);
*/
/** @var array $_ */ ?>
\ No newline at end of file
diff --git a/php/templates/containers.twig b/php/templates/containers.twig
index 8e437bc2..bedfd481 100644
--- a/php/templates/containers.twig
+++ b/php/templates/containers.twig
@@ -5,639 +5,680 @@
-
-
-
-
- {% set aio_version = include('includes/aio-version.twig') %}
-
Nextcloud AIO v{{ aio_version }}
+
+
Nextcloud AIO v9.4.1
- {# Add 2nd tab warning #}
-
+ {# Add 2nd tab warning #}
+
- {# timezone-prefill #}
-
+ {# timezone-prefill #}
+
- {# js for optional containers and additional containers forms #}
-
+ {% set isAnyRunning = false %}
+ {% set isAnyRestarting = false %}
+ {% set isWatchtowerRunning = false %}
+ {% set isDomaincheckRunning = false %}
+ {% set isBackupOrRestoreRunning = false %}
+ {% set isApacheStarting = false %}
+ {# Setting newMajorVersion to '' will hide corresponding options/elements, can be set to an integer like 26 in order to show corresponding elements. If set, also increase installLatestMajor in https://github.com/nextcloud/all-in-one/blob/main/php/src/Controller/DockerController.php #}
+ {% set newMajorVersion = '' %}
- {% set hasBackupLocation = borg_backup_host_location or borg_remote_repo %}
- {% set isAnyRunning = false %}
- {% set isAnyRestarting = false %}
- {% set isWatchtowerRunning = false %}
- {% set isDomaincheckRunning = false %}
- {% set isBackupOrRestoreRunning = false %}
- {% set isApacheStarting = false %}
- {# Setting newMajorVersion to '' will hide corresponding options/elements, can be set to an integer like 26 in order to show corresponding elements. If set, also increase installLatestMajor in https://github.com/nextcloud/all-in-one/blob/main/php/src/Controller/DockerController.php #}
- {% set newMajorVersionString = '' %}
+ {% if is_backup_container_running == true %}
+ {% if borg_backup_mode == 'backup' or borg_backup_mode == 'restore' %}
+ {% set isBackupOrRestoreRunning = true %}
+ {% endif %}
+ {% endif %}
- {% if is_backup_container_running == true %}
- {% if borg_backup_mode == 'backup' or borg_backup_mode == 'restore' %}
- {% set isBackupOrRestoreRunning = true %}
+ {% for container in containers %}
+ {% if container.GetDisplayName() != '' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
+ {% set isAnyRunning = true %}
+ {% endif %}
+ {% if container.GetDisplayName() != '' and class(container.GetRestartingState()) == 'AIO\\Container\\State\\RestartingState' %}
+ {% set isAnyRestarting = true %}
+ {% endif %}
+ {% if container.GetIdentifier() == 'nextcloud-aio-watchtower' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
+ {% set isWatchtowerRunning = true %}
+ {% endif %}
+ {% if container.GetIdentifier() == 'nextcloud-aio-domaincheck' and class(container.GetRunningState()) == 'AIO\\Container\\State\\RunningState' %}
+ {% set isDomaincheckRunning = true %}
+ {% endif %}
+ {% if container.GetIdentifier() == 'nextcloud-aio-apache' and class(container.GetStartingState()) == 'AIO\\Container\\State\\StartingState' %}
+ {% set isApacheStarting = true %}
+ {% endif %}
+ {% endfor %}
+
+ {% if is_daily_backup_running == true %}
+ Daily backup currently running. (Logs)
+ {% if automatic_updates == true %}
+ This will update your containers, the mastercontainer and, on Saturdays, your Nextcloud apps if the backup is successful.
+ {% if is_mastercontainer_update_available == true %}
+ When the mastercontainer is updated it will restart, making it unavailable for a moment. (Logs)
+ {% endif %}
+ {% endif %}
+ {% if has_update_available == false %}
+ The whole process should not take more than a few minutes.
+ {% elseif automatic_updates == true %}
+ The whole process can take a while as your containers will be updated.
+ If the daily backup is stuck somehow, you can unstick it by running sudo docker exec nextcloud-aio-mastercontainer rm /mnt/docker-aio-config/data/daily_backup_running and afterwards reloading this interface.
+ {% elseif isWatchtowerRunning == true %}
+ Mastercontainer update currently running. Once the update is complete the mastercontainer will restart, making it unavailable for a moment. Please wait until it's done. (Logs)
+ Reload ↻
+ {% else %}
+ {% if is_backup_container_running == false and domain == "" %}
+ {% if isDomaincheckRunning == false %}
+
Domaincheck container is not running
+ This is not expected. Most likely this happened because port {{ apache_port }} is already in use on your server. You can check the mastercontainer logs and domaincheck container logs for further clues. You should be able to resolve this by adjusting the APACHE_PORT by following the reverse proxy documentation. Advice: have a detailed look at the changed docker run command for AIO.
+ {% elseif is_mastercontainer_update_available == true %}
+
Mastercontainer update
+ ⚠️ A mastercontainer update is available. Please click on the button below to update it. Afterwards, you will be able to proceed with the setup.
+
+ {% else %}
+ {% if borg_backup_host_location == '' and borg_restore_password == '' %}
+ The official Nextcloud installation method. Nextcloud All-in-One provides easy deployment and maintenance with most features included in this one Nextcloud instance.
+ You can either create a new AIO instance or restore a former AIO instance from backup. See the two sections below.
+ {{ include('includes/aio-config.twig') }}
+
New AIO instance
+ {% if apache_port == '443' %}
+ AIO is currently in "normal mode" which means that it handles the TLS proxying itself. This also means that it cannot be installed behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). If you want to run AIO behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else), see the reverse proxy documentation. Advice: have a detailed look at the changed docker run command for AIO.
+ {% else %}
+ AIO is currently in "reverse proxy mode" which means that it can be installed behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) and does not do the TLS proxying itself.
+ {% endif %}
+ Please type the domain that will be used for Nextcloud below in order to create a new AIO instance.
+ {% if skip_domain_validation == true %}
+ Please note: The domain validation is disabled so any domain will be accepted here! Make sure you do not make a typo here as you will not be able to change it afterwards!
+ {% endif %}
+
+ {% if skip_domain_validation == false %}
+ Make sure that this server is reachable on port 443 (port 443/tcp is open/forwarded in your firewall/router and 443/udp as well if you want to enable http3) and that you've correctly set up the DNS config for the domain that you enter (set the A record to your public ipv4-address and if you need ipv6, set the AAAA record to your public ipv6-address. A CNAME record is, of course, also possible). You should see hints on what went wrong in the top right corner if your domain is not accepted.
+
+ Click here for further hints
+ If you do not have a domain yet, you can get one for free e.g. from duckdns.org and others.
+ If you have a dynamic public IP-address, you can use e.g. DDclient with a compatible domain provider for DNS updates.
+ If you only want to install AIO locally without exposing it to the public internet or if you cannot do so, feel free to follow this documentation.
+ If you should be using Cloudflare Proxy for your domain, make sure to disable the Proxy feature temporarily as it might block the domain validation attempts.
+ {% if apache_port != '443' %}
+ If you run into issues with your domain being accepted, see these steps for how to debug things.
+ {% endif %}
+ Hint: If the domain validation fails but you are completely sure that you've configured everything correctly, you may skip the domain validation by following this documentation.
+
+ {% endif %}
+
+
Restore former AIO instance from backup
+ You can alternatively restore a former AIO instance from backup.
+ {% endif %}
+
+ {% if is_instance_restore_attempt == false %}
+ {% if borg_backup_host_location != '' and borg_restore_password != '' %}
+ {% if borg_backup_mode in ['test', 'check'] %}
+ {% if backup_exit_code > 0 %}
+ Last {{ borg_backup_mode }} failed! (Logs)
+ {% if borg_backup_mode == 'test' %}
+ Please adjust the path and/or the encryption password in order to make it work!
+ {% elseif borg_backup_mode == 'check' %}
+ The backup archive seems to be corrupt. Please try to use a different intact backup archive or try to fix it by following this documentation
+
+ Reveal repair option
+ Below is the option to repair the integrity of your backup. Please note: Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)
+ {% if borg_backup_mode == 'test' %}
+ Feel free to check the integrity of the backup archive below before starting the restore process in order to make ensure that the restore will work. This can take a long time though depending on the size of the backup archive and is thus not required.
+
+ {% endif %}
+ Choose the backup that you want to restore and click on the button below to restore the selected backup. This will restore the whole AIO instance. Please note that the current AIO passphrase will be kept and the previous AIO passphrase will not be restored from backup!
+ Please note: If the backup that you want to restore contained any community container, but you did not specify the same community containers via environmental variable while creating this new AIO instance, you need to restore the same backup a second time after this attempt so that the community container data is also correctly restored.
+ The restore process has unexpectedly failed! Please adjust the path and encryption password, test it and try to restore again!
+ {% endif %}
+ {% endif %}
+ {% endif %}
+
+ {% if borg_backup_host_location == '' or borg_restore_password == '' or borg_backup_mode not in ['test', 'check', ''] or backup_exit_code > 0 %}
+ Please enter the location of the backup archive on your host and the encryption password of the backup archive below:
+
+ {{ include('includes/backup-dirs.twig') }}
+ ⚠️ Please note that the backup archive must be located in a subfolder of the folder that you enter here and the subfolder which contains the archive must be named 'borg', or the backup container will not be able to find the backup archive!
+ {% endif %}
+ {% else %}
+ Everything set! Click on the button below to test the path and encryption password:
+
+ {% endif %}
+ {% endif %}
+
How to reset the AIO instance?
+ If something should be going wrong, for example during the initial installation, you can reset the instance by following this documentation.
+ {% endif %}
+
+ {% if was_start_button_clicked == true %}
+ {% if current_channel starts with 'latest' or current_channel starts with 'beta' or current_channel starts with 'develop' %}
+ You are running the {{ current_channel }} channel. (Logs)
+ {% else %}
+ No channel was found. This means that AIO is not able to update itself and its component and will also not be able to report about updates. Updates need to be done externally.
{% endif %}
{% endif %}
- {% for container in containers %}
- {% if container.displayName != '' and container.GetRunningState().value == 'running' %}
- {% set isAnyRunning = true %}
- {% endif %}
- {% if container.displayName != '' and container.GetRestartingState().value == 'restarting' %}
- {% set isAnyRestarting = true %}
- {% endif %}
- {% if container.identifier == 'nextcloud-aio-watchtower' and container.GetRunningState().value == 'running' %}
- {% set isWatchtowerRunning = true %}
- {% endif %}
- {% if container.identifier == 'nextcloud-aio-domaincheck' and container.GetRunningState().value == 'running' %}
- {% set isDomaincheckRunning = true %}
- {% endif %}
- {% if container.identifier == 'nextcloud-aio-apache' and container.GetStartingState().value == 'starting' %}
- {% set isApacheStarting = true %}
- {% endif %}
- {% endfor %}
+ {% if is_backup_container_running == true %}
+ Backup container is currently running: {{ borg_backup_mode }} (Logs)
If the daily backup is stuck somehow, you can unstick it by running sudo docker exec nextcloud-aio-mastercontainer rm /mnt/docker-aio-config/data/daily_backup_running and afterwards reloading this interface.
- {% elseif isWatchtowerRunning == true %}
-
Mastercontainer update currently running. Once the update is complete the mastercontainer will restart, making it unavailable for a moment. Please wait until it's done. (Logs)
- {% else %}
- {% if is_backup_container_running == false and domain == "" %}
- {% if isDomaincheckRunning == false %}
-
Domaincheck container is not running
-
This is not expected. Most likely this happened because port {{ apache_port }} is already in use on your server. You can check the mastercontainer logs and domaincheck container logs for further clues. You should be able to resolve this by adjusting the APACHE_PORT by following the reverse proxy documentation. Advice: have a detailed look at the changed docker run command for AIO.
+ {% if borg_backup_host_location == '' %}
+ If your Nextcloud does not open when clicking the button above, see this documentation
+ {% endif %}
{% else %}
- {% if not hasBackupLocation %}
-
The official Nextcloud installation method. Nextcloud All-in-One provides easy deployment and maintenance with most features included in this one Nextcloud instance.
-
You can either create a new AIO instance or restore a former AIO instance from backup. See the two sections below.
- {{ include('includes/aio-config.twig') }}
-
New AIO instance
- {% if apache_port == '443' %}
-
AIO is currently in "normal mode" which means that it handles the TLS proxying itself. This also means that it cannot be installed behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). If you want to run AIO behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else), see the reverse proxy documentation. Advice: have a detailed look at the changed docker run command for AIO.
- {% else %}
-
AIO is currently in "reverse proxy mode" which means that it can be installed behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) and does not do the TLS proxying itself.
- {% endif %}
-
Please type in the domain that will be used for Nextcloud and submit it.
- {% if skip_domain_validation == true %}
-
Please note: The domain validation is disabled so any domain will be accepted here! Make sure you do not make a typo here as you will not be able to change it afterwards!
Make sure that this server is reachable on port 443 (port 443/tcp is open/forwarded in your firewall/router and 443/udp as well if you want to enable http3) and that you've correctly set up the DNS config for the domain that you enter (set the A record to your public ipv4-address and if you need ipv6, set the AAAA record to your public ipv6-address. A CNAME record is, of course, also possible). You should see hints on what went wrong in the top right corner if your domain is not accepted.
-
- Click here for further hints
-
If you do not have a domain yet, you can get one for free e.g. from duckdns.org and others. Recommended is to use Tailscale
-
If you have a dynamic public IP-address, you can use e.g. DDclient with a compatible domain provider for DNS updates.
-
If you only want to install AIO locally without exposing it to the public internet or if you cannot do so, feel free to follow this documentation.
-
If you should be using Cloudflare Proxy for your domain, make sure to disable the Proxy feature temporarily as it might block the domain validation attempts.
- {% if apache_port != '443' %}
-
If you run into issues with your domain being accepted, see these steps for how to debug things.
- {% endif %}
-
Hint: If the domain validation fails but you are completely sure that you've configured everything correctly, you may skip the domain validation by following this documentation.
-
- {% endif %}
-
-
Restore former AIO instance from backup
-
You can alternatively restore a former AIO instance from backup.
{% endif %}
+ {% endif %}
+ {% endif %}
- {% if is_instance_restore_attempt == false %}
- {% if hasBackupLocation %}
- {% if borg_backup_mode in ['test', 'check'] %}
- {% if backup_exit_code > 0 %}
-
Please adjust the path and/or the encryption password in order to make it work!
- {% elseif borg_backup_mode == 'check' %}
-
The backup archive seems to be corrupt. Please try to use a different intact backup archive or try to fix it by following this documentation
-
- Reveal repair option
-
Below is the option to repair the integrity of your backup. Please note: Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)
-
-
+ {% if isApacheStarting == false and is_backup_container_running == false %}
+ {{ include('includes/aio-config.twig') }}
+ {% endif %}
+
+ {% if was_start_button_clicked == true %}
+
Containers
+
+ {# @var containers \AIO\Container\Container[] #}
+ {% for container in containers %}
+ {% if container.GetDisplayName() != '' %}
+
Feel free to check the integrity of the backup archive below before starting the restore process in order to make ensure that the restore will work. This can take a long time though depending on the size of the backup archive and is thus not required.
+
+ {% if has_update_available == true %}
+ {% if is_mastercontainer_update_available == false %}
+ ⚠️ Container updates are available. Click on Stop containers and Start and update containers to update them. You should consider creating a backup first.
+ {% endif %}
+ {% else %}
+ {% if is_mastercontainer_update_available == false %}
+ Your containers are up-to-date.
+ {% if newMajorVersion != '' and isAnyRunning == true and isApacheStarting != true %}
+
+ Note about Nextcloud {{ newMajorVersion }}
+ If you haven't upgraded to Nextcloud {{ newMajorVersion }} yet and want to do that now, feel free to follow this documentation
+
+ {% endif %}
+ {% endif %}
+ {% endif %}
+ {% endif %}
+
+ {% if isAnyRunning == true %}
+ {% if isApacheStarting != true %}
+ {% if is_mastercontainer_update_available == true %}
+ ⚠️ A mastercontainer update is available. Please click on the button below to stop your containers in order to update the mastercontainer.
+ {% if current_channel starts with 'latest' %}
+ You can find the changelog here
+ {% elseif current_channel starts with 'beta' %}
+ You can find the changelog here
+ {% elseif current_channel starts with 'develop' %}
+ You can find all changes here
+ {% endif %}
+ {% endif %}
+
+ {% endif %}
+ {% else %}
+ {% if isBackupOrRestoreRunning == true %}
+ Restore or Backup currently running. Cannot start the containers until Restore or Backup is complete.
+ {% else %}
+ {% if was_start_button_clicked == false %}
+ Clicking on the button below will download all docker containers and start them. This can take a long time depending on your internet connection. Since the overall size is a few GB, this can take around 5-10 min or more. Please be patient!
+ {% endif %}
+ {% if is_mastercontainer_update_available == true %}
+ ⚠️ A mastercontainer update is available. Please click on the button below to update it.
+ The backup section is disabled via environmental variable.
+ {% else %}
+ {% if is_backup_container_running == false and borg_backup_host_location == "" and isApacheStarting != true %}
+
Backup and restore
+ Please enter the directory path below where backups will be created on the host system. It's best to choose a location on a separate drive and not on your root drive.
+ {% if backup_exit_code > 0 %}
+ Last {{ borg_backup_mode }} failed! (Logs)
+ {% if borg_backup_mode == "check" %}
+ The backup check was not successful. This might indicate a corrupt archive (look at the logs). If that should be the case, you can try to fix it by following this documentation
+
+ Reveal repair option
+ Below is the option to repair the integrity of your backup. Please note: Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)
+
- {% endif %}
-
Choose the backup that you want to restore and click on the button below to restore the selected backup. This will restore the whole AIO instance. Please note that the current AIO passphrase will be kept and the previous AIO passphrase will not be restored from backup!
-
Important: If the backup that you want to restore contained any community container, you need to restore the same backup a second time after this attempt so that the community container data is also correctly restored.
-
+
+ {% endif %}
+ {% if has_backup_run_once == false %}
+ You may change the backup path again since the initial backup was not successful. After submitting the new value, you need to click on Create Backup to test the new value.
+ {% endif %}
+ {% endif %}
+ {% endif %}
+
+ {% if is_backup_container_running == false and isApacheStarting == false %}
+ {% if has_backup_run_once == true %}
+
+ Click here to reveal all backup options (including an option for automatic updates)
+ {% endif %}
+
Backup information
+ This is your encryption password for backups: {{ borgbackup_password }}
+ Please save this password in a safe place. You won't be able to restore from backup if you lose this password!
+ All important data from your Nextcloud AIO instance such as the database, your files and the mastercontainer's configuration files, will be backed up.
+ The backup uses a tool called BorgBackup, a well-known server backup tool that efficiently backs up your files and encrypts them on the fly.
+ By using this tool, backups are incremental, differential, compressed and encrypted – so only the first backup will take a while. Further backups should be fast as only changes are taken into account.
+ Backups will be created in the following directory on the host: {{ borg_backup_host_location }}/borg
+ Be aware that this solution does not backup files and folders that are mounted into Nextcloud using the external storage app, but you can add further Docker volumes and host paths that you want to back up after the initial backup is done.
+ For information about backup retention, see this.
+ Daily backups can be enabled after the initial backup is done. Enabling this also allows you to enable an option to update all containers, Nextcloud, and its apps automatically.
+ For further documentation and options on this backup solution refer to this section and below.
+
+ {% if isApacheStarting != true %}
+
Backup creation
+ Clicking on the button below will create a backup.
+
+
+ {% if has_backup_run_once == false %}
+
Reset backup host location
+ If the configured backup host location {{ borg_backup_host_location }} is wrong, you can reset it by clicking on the button below.
+ Click on the button below to perform a backup integrity check. This is an option that verifies that your backup is intact. It shouldn't be needed in most situations.
+
+
+
Backup restore
+ Choose the backup that you want to restore and click on the button below to restore the selected backup. This will overwrite all your files with the chosen backup so you should consider creating a backup first. You can run an integrity check before restoring your files but this shouldn't be needed in most situations. Please note that this will not restore additionally chosen backup directories! The restore process should be pretty fast as rsync, which only transfers changed files, is used to restore the chosen backup.
The restore process has unexpectedly failed! Please adjust the path and encryption password, test it and try to restore again!
+
+
Daily backup and automatic updates
+ {% if daily_backup_time == "" %}
+ By entering a time below, you can enable daily backups. It will create them at the entered time in 24h format. E.g. 04:00 will create backups at 4 am UTC and 16:00 at 4 pm UTC. When creating the backup, containers will be stopped and restarted after the backup is complete.
+
+ {% else %}
+ Daily backups will be created at {{ daily_backup_time }} UTC. A notification about the result of the backup will be sent.
+ {% if automatic_updates == true %}
+ Also your containers, the mastercontainer and, on Saturdays, your Nextcloud apps will be automatically updated.
+ {% endif %}
+ To change your backup time first disable Daily Backups, then enter your new backup time, and then re-enable them.
+
+ {% endif %}
+
+
Back up additional directories and docker volumes of your host
+ Below you can enter directories and docker volumes of your host that will be backed up into the same borg backup archive.
+
+ Each line and entry needs to start with a slash or letter/digit. Only a-z, A-Z, ., 0-9, _, -, and / are allowed. If the entry begins with a letter/digit slashes are not supported. Two valid entries are /directory/on/the/host and my_custom_docker_volume. You need to make sure that all given directories exist or the backup container will fail to start!
+ Be sure to individually specify all storage that you want to back up as storage will not be mounted recursively. E.g. providing / as additional backup directory will only back up files and folders that are stored on the root partition and not on the EFI partition or any other. Excluded by the backup will be caches and a few other directories. If you want to back up the root partition you should make sure to stop all services before the backup so it can run correctly. For automating this see this documentation
+ Please note that the chosen directories/volumes will not be restored when you restore your instance, so this would need to be done manually.
+ {% if additional_backup_directories != "" %}
+ This option is currently set. You can disable it again by clearing the field and submitting your changes.
+ {% endif %}
{% endif %}
{% endif %}
- {% endif %}
-
- {% if not hasBackupLocation or borg_backup_mode not in ['test', 'check', ''] or backup_exit_code > 0 %}
- {% if borg_remote_repo and backup_exit_code > 0 %}
-
- You may still need to authorize this pubkey on your borg remote: {{ borg_public_key }}
- To try again, resubmit your location and rerun the test.
-
- {% endif %}
-
-
- Please enter the location of the backup archive on your host or a
- remote borg repo url
- if stored remotely; and the encryption password of the backup archive below and submit all values:
-
-
- {{ include('includes/backup-dirs.twig') }}
-
⚠️ Please note that the backup archive must be located in a subfolder of the folder that you enter here and the subfolder which contains the archive must be named 'borg', or the backup container will not be able to find the backup archive!
- {% endif %}
- {% else %}
-
Everything set! Click on the button below to test the path and encryption password:
-
- {% endif %}
- {% endif %}
-
How to reset the AIO instance?
-
If something should be going wrong, for example during the initial installation, you can reset the instance by following this documentation.
- {% endif %}
-
- {% if was_start_button_clicked == true %}
- {% if current_channel starts with 'latest' or current_channel starts with 'beta' or current_channel starts with 'develop' %}
-
No channel was found. This means that AIO is not able to update itself and its component and will also not be able to report about updates. Updates need to be done externally.
- {% endif %}
-
- {% if domain != "" %}
- {% if isAnyRunning == true %}
- {% if isApacheStarting != true %}
- {% if hasBackupLocation %}
-
- Click here to reveal the initial Nextcloud credentials
- {% endif %}
-
Initial Nextcloud username: admin
- {% if hasBackupLocation %}
- {# nextcloud_password needs to be duplicated due to a bug in Firefox. See https://github.com/nextcloud/all-in-one/issues/638. #}
-
- {# @var containers \AIO\Container\Container[] #}
- {% for container in containers %}
- {% if container.displayName != '' %}
- {% include 'components/container-state.twig' with {'c': container} only %}
- {% endif %}
- {% endfor %}
-
-
- {% if has_update_available == true %}
- {% if is_mastercontainer_update_available == false %}
-
⚠️ Container updates are available. Click on Stop containers and Start and update containers to update them. You should consider creating a backup first.
+
+ Click here to change your AIO passphrase
+ You can change your AIO passphrase below:
+
+ The new passphrase needs to be at least 24 characters long. Allowed characters are the latin charactersa-z, A-Z, 0-9 and spaces.
+
+ {% endif %}
+ {% endif %}
+ {% endif %}
+ {% if is_backup_container_running == false %}
+
Optional containers
+ In this section you can enable or disable optional containers. There are further community containers available that are not listed below. See this documentation how to add them.
{% if isAnyRunning == true %}
- {% if isApacheStarting != true %}
- {% if is_mastercontainer_update_available == true %}
-
⚠️ A mastercontainer update is available. Please click on the button below to stop your containers in order to update the mastercontainer.
- {% endif %}
- {% endif %}
-
+ Minimal system requirements: When any optional container is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, Nextcloud Talk Recording-server or Fulltextsearch, at least 3GB RAM are required. For Talk Recording-server additional 2 vCPUs are required. When enabling everything, at least 5GB RAM and a quad-core CPU are required. Recommended are at least 1GB more RAM than the minimal requirement. For further advices and recommendations see this documentation
+ {% if isAnyRunning == true or is_x64_platform == false %}
+
+ {% endif %}
+ {% if isAnyRunning == true %}
+
+
+
+
+
+
+
+ {% endif %}
+
+ {% if is_collabora_enabled == true and isAnyRunning == false and was_start_button_clicked == true %}
+
Collabora dictionaries
+
+ {% if collabora_dictionaries == "" %}
+ In order to get the correct dictionaries in Collabora, you may configure the dictionaries below:
+
+ You need to make sure that the dictionaries that you enter are valid. An example is de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru.
+ {% else %}
+ The dictionaries for Collabora are currently set to {{ collabora_dictionaries }}. You can reset them again by clicking on the button below.
+
{% endif %}
+ {% endif %}
+
+
Timezone change
+ {% if isAnyRunning == true %}
+ {% if timezone != "" %}
+ The timezone for Nextcloud is currently set to {{ timezone }}.
+ {% endif %}
+ Please note: You can change the timezone when your containers are stopped.
Restore or Backup currently running. Cannot start the containers until Restore or Backup is complete.
+ {% if timezone == "" %}
+ To get the correct time values for certain Nextcloud features, set the timezone for Nextcloud to the one that your users mainly use. Please note that this setting does not apply to the mastercontainer and any backup option.
+ You can configure the timezone for Nextcloud below:
+
+ You need to make sure that the timezone that you enter is valid. An example is Europe/Berlin. You can get valid values by looking at the 'TZ identifier' column of this list: click here. The default is Etc/UTC if nothing is entered.
Clicking on the button below will download all docker containers and start them. This can take a long time depending on your internet connection. Since the overall size is a few GB, this can take around 5-10 min or more. Please be patient!
⚠️ A mastercontainer update is available. Please click on the button below to update it.
-
- {% else %}
- {% if was_start_button_clicked == false %}
-
- {% elseif has_update_available == false %}
-
- {% else %}
-
- {% endif %}
- {% endif %}
+ The timezone for Nextcloud is currently set to {{ timezone }}. You can change the timezone by clicking on the button below.
The backup section is disabled via environmental variable.
- {% else %}
- {% if is_backup_container_running == false and not hasBackupLocation and isApacheStarting != true %}
-
Backup and restore
-
Please enter the directory path below where backups will be created on the host system and submit it. It's best to choose a location on a separate drive and not on your root drive.
-
- To store backups remotely instead, fill in the
- remote borg repo url and submit it.
- You will be provided with an SSH public key for authorization at the remote afterwards.
-
The backup check was not successful. This might indicate a corrupt archive (look at the logs). If that should be the case, you can try to fix it by following this documentation
-
- Reveal repair option
-
Below is the option to repair the integrity of your backup. Please note: Please only use this after you have read the documentation above! (It will run the command 'borg check --repair' for you.)
- You may still need to authorize this pubkey on your borg remote: {{ borg_public_key }}
- To try again, click Create backup.
-
- {% endif %}
-
-
You may change the backup path again since the initial backup was not successful. After submitting the new value, you need to click on Create Backup to test the new value.
- {% endif %}
- {% endif %}
- {% endif %}
-
- {% if is_backup_container_running == false and isApacheStarting == false %}
- {% if has_backup_run_once == true %}
-
- Click here to reveal all backup options (including an option for automatic updates)
- {% endif %}
-
Backup information
-
This is your encryption password for backups: {{ borgbackup_password }}
-
Please save this password in a safe place. You won't be able to restore from backup if you lose this password!
-
All important data from your Nextcloud AIO instance such as the database, your files and the mastercontainer's configuration files, will be backed up.
-
The backup uses a tool called BorgBackup, a well-known server backup tool that efficiently backs up your files and encrypts them on the fly.
-
By using this tool, backups are incremental, differential, compressed and encrypted – so only the first backup will take a while. Further backups should be fast as only changes are taken into account.
- {% if borg_remote_repo != '' %}
-
- Backups get created remotely at:
- {{ borg_remote_repo }}
- {% if has_backup_run_once == true %}
- Your borg ssh public key is: {{ borg_public_key }}
- {% endif %}
-
- {% else %}
-
Backups will be created in the following directory on the host: {{ borg_backup_host_location }}/borg
- {% endif %}
-
Be aware that this solution does not backup files and folders that are mounted into Nextcloud using the external storage app, but you can add further Docker volumes and host paths that you want to back up after the initial backup is done.
Daily backups can be enabled after the initial backup is done. Enabling this also allows you to enable an option to update all containers, Nextcloud, and its apps automatically.
-
For further documentation and options on this backup solution refer to this section and below.
-
- {% if isApacheStarting != true %}
-
Backup creation
-
Clicking on the button below will create a backup.
-
-
- {% if has_backup_run_once == true %}
-
Backup Viewer
-
There is now a community container that allows to access your backups in a web session. See this documentation.
-
-
Backup check
-
Click on the button below to perform a backup integrity check. This is an option that verifies that your backup is intact. It shouldn't be needed in most situations.
-
-
-
Backup restore
-
Choose the backup that you want to restore and click on the button below to restore the selected backup. This will overwrite all your files with the chosen backup so you should consider creating a backup first. You can run an integrity check before restoring your files but this shouldn't be needed in most situations. Please note that this will not restore additionally chosen backup directories! The restore process should be pretty fast as rsync, which only transfers changed files, is used to restore the chosen backup.
-
-
-
Update backup list
-
- Click here to reveal this option
-
If you use an external snapshot tool to restore the server that runs AIO, you might run into a problem that the above listed available backups are not up-to-date to restore your server from. You can click the button below to update this list.
-
-
-
-
Daily backup and automatic updates
- {% if daily_backup_time == "" %}
-
By entering a time below and submitting it, you can enable daily backups. It will create them at the entered time in 24h format. E.g. 04:00 will create backups at 4 am UTC and 16:00 at 4 pm UTC. When creating the backup, containers will be stopped and restarted after the backup is complete.
-
- {% else %}
-
Daily backups will be created at {{ daily_backup_time }} UTC. A notification about the result of the backup will be sent.
- {% if automatic_updates == true %}
- Also your containers, the mastercontainer and, on Saturdays, your Nextcloud apps will be automatically updated.
- {% endif %}
-
To change your backup time first disable Daily Backups, then enter your new backup time, and then re-enable them.
-
- {% endif %}
-
-
Back up additional directories and docker volumes of your host
-
Below you can enter directories and docker volumes of your host that will be backed up into the same borg backup archive. Make sure to press the submit button after changing anything.
-
-
Each line and entry needs to start with a slash or letter/digit. Only a-z, A-Z, ., 0-9, _, -, and / are allowed. If the entry begins with a letter/digit slashes are not supported. Two valid entries are /directory/on/the/host and my_custom_docker_volume. You need to make sure that all given directories exist or the backup container will fail to start!
-
Be sure to individually specify all storage that you want to back up as storage will not be mounted recursively. E.g. providing / as additional backup directory will only back up files and folders that are stored on the root partition and not on the EFI partition or any other. Excluded by the backup will be caches and a few other directories. If you want to back up the root partition you should make sure to stop all services before the backup so it can run correctly. For automating this see this documentation
-
Please note that the chosen directories/volumes will not be restored when you restore your instance, so this would need to be done manually.
- {% if additional_backup_directories != "" %}
-
This option is currently set. You can disable it again by clearing the field and submitting your changes.
- {% endif %}
- {% endif %}
-
-
Reset backup location
-
- If the configured backup host location {{ borg_backup_host_location }}
- {% if borg_remote_repo %}
- or the remote repo {{ borg_remote_repo }}
- {% endif %}
- is wrong or if you want to reset the backup location due to other reasons, you can do so by clicking on the button below.
-
- {% if isAnyRunning == true %}
- {% if timezone != "" %}
-
The timezone for Nextcloud is currently set to {{ timezone }}.
- {% endif %}
-
Please note: You can change the timezone when your containers are stopped.
- {% else %}
- {% if timezone == "" %}
-
To get the correct time values for certain Nextcloud features, set the timezone for Nextcloud to the one that your users mainly use. Please note that this setting does not apply to the mastercontainer and any backup option.
-
You can configure the timezone for Nextcloud below (Do not forget to submit the value!):
-
-
You need to make sure that the timezone that you enter is valid. An example is Europe/Berlin. You can get valid values by looking at the 'TZ identifier' column of this list: click here. The default is Etc/UTC if nothing is entered.
- {% else %}
-
The timezone for Nextcloud is currently set to {{ timezone }}. You can change the timezone by clicking on the button below.
{% endblock %}
diff --git a/php/templates/includes/aio-config.twig b/php/templates/includes/aio-config.twig
index fbb70230..e3c34d62 100644
--- a/php/templates/includes/aio-config.twig
+++ b/php/templates/includes/aio-config.twig
@@ -1,44 +1,36 @@
- Click here to view the current AIO config and documentation links
+ Click here to view the current AIO config and documentation links
{% if was_start_button_clicked == true %}
-
Nextcloud's config.php file is stored in the nextcloud_aio_nextcloud Docker volume and can be edited by following the config.php documentation.
-
You can run Nextcloud's usual occ commands by following the occ documentation.
+ Nextclouds config.php file is stored in the nextcloud_aio_nextcloud Docker volume and can be edited by following the config.php documentation.
+ You can run Nextcloud's usual occ commands by following the occ documentation.
{% endif %}
+
+ {% if nextcloud_datadir starts with '/' %}
+ Nextcloud's datadir is getting stored in the {{ nextcloud_datadir }} directory.
+ {% else %}
+ Nextcloud's datadir is getting stored in the {{ nextcloud_datadir }} Docker volume.
+ {% endif %}
+ See the NEXTCLOUD_DATADIR documentation on how to change this.
-
- {% if nextcloud_datadir starts with '/' %}
- Nextcloud's datadir is getting stored in the {{ nextcloud_datadir }} directory.
- {% else %}
- Nextcloud's datadir is getting stored in the {{ nextcloud_datadir }} Docker volume.
- {% endif %}
- See the NEXTCLOUD_DATADIR documentation on how to change this.
-
+ {% if nextcloud_mount == '' %}
+ The Nextcloud container is confied and local external storage in Nextcloud is disabled.
+ {% else %}
+ The Nextcloud container is getting gets access to the {{ nextcloud_mount }} directory and local external storage in Nextcloud is enabled.
+ {% endif %}
+ See the NEXTCLOUD_MOUNT documentation on how to change this.
-
- {% if nextcloud_mount == '' %}
- The Nextcloud container is confined and local external storage in Nextcloud is disabled.
- {% else %}
- The Nextcloud container is getting access to the {{ nextcloud_mount }} directory and local external storage in Nextcloud is enabled.
- {% endif %}
- See the NEXTCLOUD_MOUNT documentation on how to change this.
+ Nextcloud has an upload limit of {{ nextcloud_upload_limit }} configured (for public link uploads. Bigger uploads are always possible when users are logged in). See the NEXTCLOUD_UPLOAD_LIMIT documentation on how to change this.
-
Nextcloud has an upload limit of {{ nextcloud_upload_limit }} configured (for public link uploads. Bigger uploads are always possible when users are logged in). See the NEXTCLOUD_UPLOAD_LIMIT documentation on how to change this.
+ For Nextcloud, a memory limit of {{ nextcloud_memory_limit }} per PHP process is configured. See the NEXTCLOUD_MEMORY_LIMIT documentation on how to change this.
-
For Nextcloud, a memory limit of {{ nextcloud_memory_limit }} per PHP process is configured. See the NEXTCLOUD_MEMORY_LIMIT documentation on how to change this.
+ Nextcloud has a timeout of {{ nextcloud_max_time }} seconds configured (important for big file uploads). See the NEXTCLOUD_MAX_TIME documentation on how to change this.
-
Nextcloud has a timeout of {{ nextcloud_max_time }} seconds configured (important for big file uploads). See the NEXTCLOUD_MAX_TIME documentation on how to change this.
+ {% if is_dri_device_enabled == true %}
+ The /dev/dri device which is needed for hardware transcoding is getting attached to the Nextcloud container.
+ {% else %}
+ The /dev/dri device which is needed for hardware transcoding is not attached to the Nextcloud container.
+ {% endif %}
+ See the NEXTCLOUD_ENABLE_DRI_DEVICE documentation on how to change this.
-
- {% if is_dri_device_enabled == true and is_nvidia_gpu_enabled == true %}
- Hardware acceleration is enabled with the /dev/dri device and the Nvidia runtime.
- {% elseif is_dri_device_enabled == true %}
- Hardware acceleration is enabled with the /dev/dri device.
- {% elseif is_nvidia_gpu_enabled == true %}
- Hardware acceleration is enabled with the Nvidia runtime.
- {% else %}
- Hardware acceleration is not enabled. It's recommended to enable hardware transcoding for better performance.
- {% endif %}
- See the hardware acceleration documentation on how to change this.
-
-
For further documentation on AIO, refer to this page. You can use the browser search [CTRL]+[F] to search through the documentation. Additional documentation can be found here.
+ For further documentation on AIO, refer to this page. You can use the browser search [CTRL]+[F] to search through the documentation. Additional documentation can be found here.
diff --git a/php/templates/includes/aio-version.twig b/php/templates/includes/aio-version.twig
deleted file mode 100644
index 1b62f917..00000000
--- a/php/templates/includes/aio-version.twig
+++ /dev/null
@@ -1 +0,0 @@
-12.6.1
diff --git a/php/templates/includes/backup-dirs.twig b/php/templates/includes/backup-dirs.twig
index 390bf69c..bbc11eb8 100644
--- a/php/templates/includes/backup-dirs.twig
+++ b/php/templates/includes/backup-dirs.twig
@@ -1,6 +1,6 @@
-
The folder path that you enter must start with / and must not end with /.
-
An example for Linux is /mnt/backup.
-
On Synology it could be /volume1/docker/nextcloud/backup.
-
For macOS it may be /var/backup.
-
On Windows it might be /run/desktop/mnt/host/c/backup. (This path is equivalent to 'C:\backup' on your Windows host so you need to translate the path accordingly. Hint: the path that you enter needs to start with '/run/desktop/mnt/host/'. Append to that the exact location on your windows host, e.g. 'c/backup' which is equivalent to 'C:\backup'.) ⚠️ Please note: This does not work with external drives like USB or network drives and only with internal drives like SATA or NVME drives.
-
Another option is to enter a specific volume name here: nextcloud_aio_backupdir. This volume needs to be created beforehand manually by you in order to be able to use it. See this documentation for an example.
+The folder path that you enter must start with / and must not end with /.
+An example for Linux is /mnt/backup.
+On Synology it could be /volume1/docker/nextcloud/backup.
+For macOS it may be /var/backup.
+On Windows it might be /run/desktop/mnt/host/c/backup. (This path is equivalent to 'C:\backup' on your Windows host so you need to translate the path accordingly. Hint: the path that you enter needs to start with '/run/desktop/mnt/host/'. Append to that the exact location on your windows host, e.g. 'c/backup' which is equivalent to 'C:\backup'.) ⚠️ Please note: This does not work with external drives like USB or network drives and only with internal drives like SATA or NVME drives.
+Another option is to enter a specific volume name here: nextcloud_aio_backupdir. This volume needs to be created beforehand manually by you in order to be able to use it. See this documentation for an example.
In this section you can enable or disable optional Community Containers that are not included by default in the main installation. These containers are provided by the community and can be useful for various purposes and are automatically integrated in AIOs backup solution and update mechanisms.
-
⚠️ Caution: Community Containers are maintained by the community and not officially by Nextcloud. Some containers may not be compatible with your system, may not work as expected or may discontinue. Use them at your own risk. Please read the documentation for each container first before adding any as some are also incompatible between each other! Never add all of them at the same time!
-{% if isAnyRunning == true %}
-
Please note: You can enable or disable the options below only when your containers are stopped.
-{% else %}
-
Please note: Make sure to save your changes by clicking Save changes below the list of Community Containers. The changes will not be auto-saved.
-{% endif %}
-
- Show/Hide available Community Containers
-
-
diff --git a/php/templates/includes/optional-containers.twig b/php/templates/includes/optional-containers.twig
deleted file mode 100644
index eabcb139..00000000
--- a/php/templates/includes/optional-containers.twig
+++ /dev/null
@@ -1,273 +0,0 @@
-
Optional containers
-
In this section you can enable or disable optional containers.
-{% if isAnyRunning == true %}
-
Please note: You can enable or disable the options below only when your containers are stopped.
-{% else %}
-
Please note: Make sure to save your changes by clicking Save changes below the list of optional containers. The changes will not be auto-saved.
-{% endif %}
-
-
Minimal system requirements: When any optional container is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, Nextcloud Talk Recording-server or Fulltextsearch, at least 3GB RAM are required. For Talk Recording-server additional 2 vCPUs are required. When enabling everything, at least 5GB RAM and a quad-core CPU are required. Recommended are at least 1GB more RAM than the minimal requirement. For further advice and recommendations see this documentation
-{% if isAnyRunning == true %}
-
-
-
-
-
-
-
-
-
-{% endif %}
-
-{% if is_collabora_enabled == true and isAnyRunning == false and was_start_button_clicked == true %}
-
Nextcloud Office dictionaries
-
- {% if collabora_dictionaries == "" %}
-
In order to get the correct dictionaries in Nextcloud Office, you may configure the dictionaries below:
-
-
You need to make sure that the dictionaries that you enter are valid. An example is de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru.
- {% else %}
-
The dictionaries for Nextcloud Office are currently set to {{ collabora_dictionaries }}. You can reset them again by clicking on the button below.
-
- {% endif %}
-
-
Additional Nextcloud Office options
-
- {% if collabora_additional_options == "" %}
-
You can configure additional options for Nextcloud Office below.
-
(This can be used for configuring the net.content_security_policy and more. Make sure to submit the value!)
-
-
You need to make sure that the options that you enter are valid. An example is --o:net.content_security_policy=frame-ancestors *.example.com:*;.
- {% else %}
-
The additioinal options for Nextcloud Office are currently set to {{ collabora_additional_options }}. You can reset them again by clicking on the button below.
The official Nextcloud installation method. Nextcloud All-in-One provides easy deployment and maintenance with most features included in this one Nextcloud instance.
-
⚠️ Please note down the passphrase to access the AIO interface and don't lose it!
The official Nextcloud installation method. Nextcloud All-in-One provides easy deployment and maintenance with most features included in this one Nextcloud instance.
+
⚠️ Please note down the passphrase to access the AIO interface and don't lose it!
{% endblock %}
diff --git a/php/tests/.gitignore b/php/tests/.gitignore
deleted file mode 100644
index 58786aac..00000000
--- a/php/tests/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-
-# Playwright
-node_modules/
-/test-results/
-/playwright-report/
-/blob-report/
-/playwright/.cache/
diff --git a/php/tests/package-lock.json b/php/tests/package-lock.json
deleted file mode 100644
index 7d7d3383..00000000
--- a/php/tests/package-lock.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "name": "e2e",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "e2e",
- "version": "1.0.0",
- "license": "AGPL-3.0-or-later",
- "devDependencies": {
- "@playwright/test": "^1.56.1"
- }
- },
- "node_modules/@playwright/test": {
- "version": "1.56.1",
- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz",
- "integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "playwright": "1.56.1"
- },
- "bin": {
- "playwright": "cli.js"
- },
- "engines": {
- "node": ">=18"
- }
- },
- "node_modules/fsevents": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
- "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
- "node_modules/playwright": {
- "version": "1.56.1",
- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz",
- "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==",
- "dev": true,
- "license": "Apache-2.0",
- "dependencies": {
- "playwright-core": "1.56.1"
- },
- "bin": {
- "playwright": "cli.js"
- },
- "engines": {
- "node": ">=18"
- },
- "optionalDependencies": {
- "fsevents": "2.3.2"
- }
- },
- "node_modules/playwright-core": {
- "version": "1.56.1",
- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz",
- "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==",
- "dev": true,
- "license": "Apache-2.0",
- "bin": {
- "playwright-core": "cli.js"
- },
- "engines": {
- "node": ">=18"
- }
- }
- }
-}
diff --git a/php/tests/package.json b/php/tests/package.json
deleted file mode 100644
index 95aae5a8..00000000
--- a/php/tests/package.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "nextcloud-aio-mastercontainer-tests",
- "version": "1.0.0",
- "license": "AGPL-3.0-or-later",
- "devDependencies": {
- "@playwright/test": "^1.56.1"
- }
-}
diff --git a/php/tests/playwright.config.js b/php/tests/playwright.config.js
deleted file mode 100644
index 191a7f59..00000000
--- a/php/tests/playwright.config.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import { defineConfig, devices } from '@playwright/test'
-
-/**
- * @see https://playwright.dev/docs/test-configuration
- */
-export default defineConfig({
- testDir: './tests',
- fullyParallel: false,
- forbidOnly: !!process.env.CI,
- retries: 0,
- workers: 1,
- reporter: [
- ['list'],
- ['html'],
- ],
- use: {
- baseURL: process.env.BASE_URL ?? 'http://localhost:8080',
- trace: 'on',
- },
- projects: [
- {
- name: 'chromium',
- use: {
- ...devices['Desktop Chrome'],
- ignoreHTTPSErrors: true,
- },
- },
- ],
-})
diff --git a/php/tests/tests/initial-setup.spec.js b/php/tests/tests/initial-setup.spec.js
deleted file mode 100644
index 1f21f011..00000000
--- a/php/tests/tests/initial-setup.spec.js
+++ /dev/null
@@ -1,96 +0,0 @@
-import { test, expect } from '@playwright/test';
-import { writeFileSync } from 'node:fs'
-
-test('Initial setup', async ({ page: setupPage }) => {
- test.setTimeout(10 * 60 * 1000)
-
- // Extract initial password
- await setupPage.goto('./setup');
- const password = await setupPage.locator('#initial-password').innerText()
- const containersPagePromise = setupPage.waitForEvent('popup');
- await setupPage.getByRole('link', { name: 'Open Nextcloud AIO login ↗' }).click();
- const containersPage = await containersPagePromise;
-
- // Log in and wait for redirect
- await containersPage.locator('#master-password').click();
- await containersPage.locator('#master-password').fill(password);
- await containersPage.getByRole('button', { name: 'Log in' }).click();
- await containersPage.waitForURL('./containers');
-
- // Reject IP addresses
- await containersPage.locator('#domain').click();
- await containersPage.locator('#domain').fill('1.1.1.1');
- await containersPage.getByRole('button', { name: 'Submit domain' }).click();
- await expect(containersPage.locator('body')).toContainText('Please enter a domain and not an IP-address!');
-
- // Accept example.com (requires disabled domain validation)
- await containersPage.locator('#domain').click();
- await containersPage.locator('#domain').fill('example.com');
- await containersPage.getByRole('button', { name: 'Submit domain' }).click();
-
- // Disable all additional containers
- await containersPage.locator('#talk').uncheck();
- await containersPage.getByRole('checkbox', { name: 'Whiteboard' }).uncheck();
- await containersPage.getByRole('checkbox', { name: 'Imaginary' }).uncheck();
- await containersPage.getByText('Disable office suite').click();
- await containersPage.getByRole('button', { name: 'Save changes' }).last().click();
- await expect(containersPage.locator('#talk')).not.toBeChecked()
- await expect(containersPage.getByRole('checkbox', { name: 'Whiteboard' })).not.toBeChecked()
- await expect(containersPage.getByRole('checkbox', { name: 'Imaginary' })).not.toBeChecked()
- await expect(containersPage.locator('#office-none')).toBeChecked()
-
- // Reject invalid time zones
- await containersPage.locator('#timezone').click();
- await containersPage.locator('#timezone').fill('Invalid time zone');
- containersPage.once('dialog', dialog => {
- console.log(`Dialog message: ${dialog.message()}`)
- dialog.accept()
- });
- await containersPage.getByRole('button', { name: 'Submit timezone' }).click();
- await expect(containersPage.locator('body')).toContainText('The entered timezone does not seem to be a valid timezone!')
-
- // Accept valid time zone
- await containersPage.locator('#timezone').click();
- await containersPage.locator('#timezone').fill('Europe/Berlin');
- containersPage.once('dialog', dialog => {
- console.log(`Dialog message: ${dialog.message()}`)
- dialog.accept()
- });
- await containersPage.getByRole('button', { name: 'Submit timezone' }).click();
-
- // Start containers and wait for starting message
- await containersPage.getByRole('button', { name: 'Download and start containers' }).click();
- await expect(containersPage.getByRole('main')).toContainText('Containers are currently starting.', { timeout: 5 * 60 * 1000 });
- await expect(containersPage.getByRole('link', { name: 'Open your Nextcloud ↗' })).toBeVisible({ timeout: 3 * 60 * 1000 });
- await expect(containersPage.getByRole('link', { name: 'Open your Nextcloud ↗' })).toHaveAttribute('href', 'https://example.com');
-
- // Extract initial nextcloud password
- await expect(containersPage.getByRole('main')).toContainText('Initial Nextcloud password:')
- const initialNextcloudPassword = await containersPage.locator('#initial-nextcloud-password').innerText();
-
- // Set backup location and create backup
- const borgBackupLocation = `/mnt/test/aio-${Math.floor(Math.random() * 2147483647)}`
- await containersPage.locator('#borg_backup_host_location').click();
- await containersPage.locator('#borg_backup_host_location').fill(borgBackupLocation);
- await containersPage.getByRole('button', { name: 'Submit backup location' }).click();
- containersPage.once('dialog', dialog => {
- console.log(`Dialog message: ${dialog.message()}`)
- dialog.accept()
- });
- await containersPage.getByRole('button', { name: 'Create backup' }).click();
- await expect(containersPage.getByRole('main')).toContainText('Backup container is currently running:', { timeout: 3 * 60 * 1000 });
- await expect(containersPage.getByRole('main')).toContainText('Last backup successful on', { timeout: 3 * 60 * 1000 });
- await containersPage.getByText('Click here to reveal all backup options').click();
- await expect(containersPage.locator('#borg-backup-password')).toBeVisible();
- const borgBackupPassword = await containersPage.locator('#borg-backup-password').innerText();
-
- // Assert that all containers are stopped
- await expect(containersPage.getByRole('button', { name: 'Start containers' })).toBeVisible();
-
- // Save passwords for restore backup test
- writeFileSync('test_data.json', JSON.stringify({
- initialNextcloudPassword,
- borgBackupLocation,
- borgBackupPassword,
- }))
-});
diff --git a/php/tests/tests/restore-instance.spec.js b/php/tests/tests/restore-instance.spec.js
deleted file mode 100644
index 696a4376..00000000
--- a/php/tests/tests/restore-instance.spec.js
+++ /dev/null
@@ -1,83 +0,0 @@
-import { test, expect } from '@playwright/test';
-import { readFileSync } from 'node:fs';
-
-test('Restore instance', async ({ page: setupPage }) => {
- test.setTimeout(10 * 60 * 1000)
-
- // Load passwords from previous test
- const {
- initialNextcloudPassword,
- borgBackupLocation,
- borgBackupPassword,
- } = JSON.parse(readFileSync('test_data.json'))
-
- // Extract initial password
- await setupPage.goto('./setup');
- const password = await setupPage.locator('#initial-password').innerText()
- const containersPagePromise = setupPage.waitForEvent('popup');
- await setupPage.getByRole('link', { name: 'Open Nextcloud AIO login ↗' }).click();
- const containersPage = await containersPagePromise;
-
- // Log in and wait for redirect
- await containersPage.locator('#master-password').click();
- await containersPage.locator('#master-password').fill(password);
- await containersPage.getByRole('button', { name: 'Log in' }).click();
- await containersPage.waitForURL('./containers');
-
- // Reject example.com (requires enabled domain validation)
- await containersPage.locator('#domain').click();
- await containersPage.locator('#domain').fill('example.com');
- await containersPage.getByRole('button', { name: 'Submit domain' }).click();
- await expect(containersPage.locator('body')).toContainText('Domain does not point to this server or the reverse proxy is not configured correctly.', { timeout: 15 * 1000 });
-
- // Reject invalid backup location
- await containersPage.locator('#borg_restore_host_location').click();
- await containersPage.locator('#borg_restore_host_location').fill('/mnt/test/aio-incorrect-path');
- await containersPage.locator('#borg_restore_password').click();
- await containersPage.locator('#borg_restore_password').fill(borgBackupPassword);
- await containersPage.getByRole('button', { name: 'Submit location and encryption password' }).click()
- await containersPage.getByRole('button', { name: 'Test path and encryption' }).click();
- await expect(containersPage.getByRole('main')).toContainText('Last test failed!', { timeout: 60 * 1000 });
-
- // Reject invalid backup password
- await containersPage.locator('#borg_restore_host_location').click();
- await containersPage.locator('#borg_restore_host_location').fill(borgBackupLocation);
- await containersPage.locator('#borg_restore_password').click();
- await containersPage.locator('#borg_restore_password').fill('foobar');
- await containersPage.getByRole('button', { name: 'Submit location and encryption password' }).click()
- await containersPage.getByRole('button', { name: 'Test path and encryption' }).click();
- await expect(containersPage.getByRole('main')).toContainText('Last test failed!', { timeout: 60 * 1000 });
-
- // Accept correct backup location and password
- await containersPage.locator('#borg_restore_host_location').click();
- await containersPage.locator('#borg_restore_host_location').fill(borgBackupLocation);
- await containersPage.locator('#borg_restore_password').click();
- await containersPage.locator('#borg_restore_password').fill(borgBackupPassword);
- await containersPage.getByRole('button', { name: 'Submit location and encryption password' }).click()
- await containersPage.getByRole('button', { name: 'Test path and encryption' }).click();
-
- // Check integrity and restore backup
- await containersPage.getByRole('button', { name: 'Check backup integrity' }).click();
- await expect(containersPage.getByRole('main')).toContainText('Last check successful!', { timeout: 5 * 60 * 1000 });
- containersPage.once('dialog', dialog => {
- console.log(`Dialog message: ${dialog.message()}`)
- dialog.accept()
- });
- await containersPage.getByRole('button', { name: 'Restore selected backup' }).click();
- await expect(containersPage.getByRole('main')).toContainText('Backup container is currently running:', { timeout: 1 * 60 * 1000 });
-
- // Verify a successful backup restore
- await expect(containersPage.getByRole('main')).toContainText('Last restore successful!', { timeout: 3 * 60 * 1000 });
- await expect(containersPage.getByRole('main')).toContainText('⚠️ Container updates are available. Click on Stop containers and Start and update containers to update them. You should consider creating a backup first.');
- containersPage.once('dialog', dialog => {
- console.log(`Dialog message: ${dialog.message()}`)
- dialog.accept()
- });
- await containersPage.getByRole('button', { name: 'Start and update containers' }).click();
- await expect(containersPage.getByRole('link', { name: 'Open your Nextcloud ↗' })).toBeVisible({ timeout: 8 * 60 * 1000 });
- await expect(containersPage.getByRole('main')).toContainText(initialNextcloudPassword);
-
- // Verify that containers are all stopped
- await containersPage.getByRole('button', { name: 'Stop containers' }).click();
- await expect(containersPage.getByRole('button', { name: 'Start containers' })).toBeVisible({ timeout: 60 * 1000 });
-});
\ No newline at end of file
diff --git a/readme.md b/readme.md
index 66059954..dbcf8306 100644
--- a/readme.md
+++ b/readme.md
@@ -1,8 +1,4 @@
# Nextcloud All-in-One
-
-> [!NOTE]
-> Nextcloud AIO is actively looking for contributors. See [the forum post](https://help.nextcloud.com/t/nextcloud-aio-is-looking-for-contributors/205234).
-
The official Nextcloud installation method. Nextcloud AIO provides easy deployment and maintenance with most features included in this one Nextcloud instance.
Included are:
@@ -15,9 +11,6 @@ Included are:
- Imaginary (optional, for previews of heic, heif, illustrator, pdf, svg, tiff and webp)
- ClamAV (optional, Antivirus backend for Nextcloud)
- Fulltextsearch (optional)
-- Whiteboard (optional)
-- Docker Socket Proxy (optional, needed for [Nextcloud App API](https://github.com/cloud-py-api/app_api#nextcloud-appapi))
-- [Community containers](https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers)
And much more:
- Simple web interface included that enables easy installation and maintenance
@@ -32,7 +25,6 @@ Included are:
- A+ security in Nextcloud security scan
- Ready to be used behind existing [Reverse proxies](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md)
- Can be used behind [Cloudflare Tunnel](https://github.com/nextcloud/all-in-one#how-to-run-nextcloud-behind-a-cloudflare-tunnel)
-- Can be used via [Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817)
- Ready for big file uploads up to 10 GB on public links, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud) (logged in users can upload much bigger files using the webinterface or the mobile/desktop clients since chunking is used in that case)
- PHP and web server timeouts set to 3600s, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud) (important for big file uploads)
- Defaults to a max of 512 MB RAM per PHP process, [adjustable](https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud)
@@ -49,11 +41,11 @@ Included are:
- `ffmpeg`, `smbclient` and `nodejs` are included by default
- Possibility included to [permanently add additional OS packages into the Nextcloud container](https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup) without having to build your own Docker image
- Possibility included to [permanently add additional PHP extensions into the Nextcloud container](https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container) without having to build your own Docker image
-- Possibility included to [pass the needed device for hardware transcoding](https://github.com/nextcloud/all-in-one#how-to-enable-hardware-acceleration-for-nextcloud) to the Nextcloud container
+- Possibility included to [pass the needed device for hardware transcoding](https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud) to the Nextcloud container
- Possibility included to [store all docker related files on a separate drive](https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive)
+- [Additional features can be added very easily](https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers)
- [LDAP can be used as user backend for Nextcloud](https://github.com/nextcloud/all-in-one/tree/main#ldap)
-- Migration from any former Nextcloud installation to AIO is possible. See [this documentation](https://github.com/nextcloud/all-in-one/blob/main/migration.md).
-- Migration in the other direction (e.g. from AIO to a VM-based installation) is also possible.
+- Migration from any former Nextcloud installation to AIO is possible. See [this documentation](https://github.com/nextcloud/all-in-one/blob/main/migration.md)
- [Fail2Ban can be added](https://github.com/nextcloud/all-in-one#fail2ban)
- [phpMyAdmin, Adminer or pgAdmin can be added](https://github.com/nextcloud/all-in-one#phpmyadmin-adminer-or-pgadmin)
- [Mail server can be added](https://github.com/nextcloud/all-in-one#mail-server)
@@ -72,10 +64,10 @@ Included are:
- Many of the included containers have a read-only root-FS (good for security)
- Included containers run in its own docker network (good for security) and only really necessary ports are exposed on the host
- [Multiple instances on one server](https://github.com/nextcloud/all-in-one/blob/main/multiple-instances.md) are doable without having to deal with VMs
-- Adjustable backup path or remote borg repository from the AIO interface (good to put the backups e.g. on a different drive if using a local backup path)
+- Adjustable backup path from the AIO interface (good to put the backups e.g. on a different drive)
- Possibility included to also back up external Docker Volumes or Host paths (can be used for host backups)
- Borg backup can be completely managed from the AIO interface, including backup creation, backup restore, backup integrity check and integrity-repair
-- Other forms of [remote backup](https://github.com/nextcloud/all-in-one#are-remote-borg-backups-supported) are indirectly possible
+- [Remote backups](https://github.com/nextcloud/all-in-one#are-remote-borg-backups-supported) are indirectly possible
- Updates and backups can be [run from an external script](https://github.com/nextcloud/all-in-one#how-to-stopstartupdate-containers-or-trigger-the-daily-backup-from-a-script-externally). See [this documentation](https://github.com/nextcloud/all-in-one#how-to-enable-automatic-updates-without-creating-a-backup-beforehand) for a complete example.
@@ -83,234 +75,75 @@ Included are:
## Screenshots
| First setup | After installation |
|---|---|
-|  |  |
+|  |  |
## How to use this?
+The following instructions are meant for installations without a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) already being in place. If you want to run AIO behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else), see the [reverse proxy documentation](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md). Also, the instructions below are especially meant for Linux. For macOS see [this](#how-to-run-aio-on-macos), for Windows see [this](#how-to-run-aio-on-windows) and for Synology see [this](#how-to-run-aio-on-synology-dsm).
+1. Install Docker on your Linux installation by following the official documentation: https://docs.docker.com/engine/install/#supported-platforms. The easiest way is installing it by **using the convenience script**:
+ ```sh
+ curl -fsSL https://get.docker.com | sudo sh
+ ```
+1. If you need ipv6 support, you should enable it by following https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md.
+2. Run the command below in order to start the container on Linux and without a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) already in place:
+ ```
+ # For Linux and without a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) already in place:
+ sudo docker run \
+ --init \
+ --sig-proxy=false \
+ --name nextcloud-aio-mastercontainer \
+ --restart always \
+ --publish 80:80 \
+ --publish 8080:8080 \
+ --publish 8443:8443 \
+ --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
+ --volume /var/run/docker.sock:/var/run/docker.sock:ro \
+ nextcloud/all-in-one:latest
+ ```
+
+ Explanation of the command
-The steps below are written for Linux. For platform-specific guidance see:
-- macOS: [How to run AIO on macOS](#how-to-run-aio-on-macos)
-- Windows: [How to run AIO on Windows](#how-to-run-aio-on-windows)
-- Synology DSM: [How to run AIO on Synology DSM](#how-to-run-aio-on-synology-dsm)
-- TrueNAS SCALE: [Can I run AIO on TrueNAS SCALE?](#can-i-run-aio-on-truenas-scale)
+ - `sudo docker run` This command spins up a new docker container. Docker commands can optionally be used without `sudo` if the user is added to the docker group (this is not the same as docker rootless, see FAQ below).
+ - `--init` This option makes sure that no zombie-processes are created, ever. See [the Docker documentation](https://docs.docker.com/reference/cli/docker/container/run/#init).
+ - `--sig-proxy=false` This option allows to exit the container shell that gets attached automatically when using `docker run` by using `[CTRL] + [C]` without shutting down the container.
+ - `--name nextcloud-aio-mastercontainer` This is the name of the container. This line is not allowed to be changed, since mastercontainer updates would fail.
+ - `--restart always` This is the "restart policy". `always` means that the container should always get started with the Docker daemon. See the Docker documentation for further detail about restart policies: https://docs.docker.com/config/containers/start-containers-automatically/
+ - `--publish 80:80` This means that port 80 of the container should get published on the host using port 80. It is used for getting valid certificates for the AIO interface if you want to use port 8443. It is not needed if you run AIO behind a web server or reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then.
+ - `--publish 8080:8080` This means that port 8080 of the container should get published on the host using port 8080. This port is used for the AIO interface and uses a self-signed certificate by default. You can also use a different host port if port 8080 is already used on your host, for example `--publish 8081:8080` (only the first port can be changed for the host, the second port is for the container and must remain at 8080).
+ - `--publish 8443:8443` This means that port 8443 of the container should get published on the host using port 8443. If you publish port 80 and 8443 to the public internet, you can access the AIO interface via this port with a valid certificate. It is not needed if you run AIO behind a web server or reverse proxy and can get removed in that case as you can simply use port 8080 for the AIO interface then.
+ - `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` This means that the files that are created by the mastercontainer will be stored in a docker volume that is called `nextcloud_aio_mastercontainer`. This line is not allowed to be changed, since built-in backups would fail later on.
+ - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootless. See the applicable documentation on this. If adjusting, don't forget to also set `WATCHTOWER_DOCKER_SOCKET_PATH`! If you dislike this, see https://github.com/nextcloud/all-in-one/tree/main/manual-install.
+ - `nextcloud/all-in-one:latest` This is the docker container image that is used.
+ - Further options can be set using environment variables, for example `--env NEXTCLOUD_DATADIR="/mnt/ncdata"` (This is an example for Linux. See [this](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) for other OS' and for an explanation of what this value does. This specific one needs to be specified upon the first startup if you want to change it to a specific path instead of the default Docker volume). To see explanations and examples for further variables (like changing the location of Nextcloud's datadir or mounting some locations as external storage into the Nextcloud container), read through this readme and look at the docker-compose file: https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
+
-> [!IMPORTANT]
-> These instructions assume there is no existing web server or reverse proxy (for example Apache, Nginx, Caddy, or Cloudflare Tunnel) that you intend to place in front of AIO. If you plan to run AIO behind an existing web server or reverse proxy, follow the AIO reverse proxy documentation: [Reverse proxy docs](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md)
+ Note: You may be interested in adjusting Nextcloud’s datadir to store the files in a different location than the default docker volume. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
-You're encouraged to skim the attached [FAQ](#faq). While we've tried to make things straightforward, Nextcloud is a large and flexible platform. Reading the FAQ will save you time, particularly if edge cases come up.
-
-> [!TIP]
-> Don't worry about getting everything perfect on the first try — test deployments are cheap and disposable.
-
-1. Install Docker on your Linux host by following the official documentation: [Docker install — supported platforms](https://docs.docker.com/engine/install/#supported-platforms)
-
-> [!WARNING]
-> Snap-based Docker installations are not supported. Make sure you are not using a snap-based Docker installation (generally only applicable to Ubuntu). To check, run:
-> ```sh
-> sudo docker info | grep "Docker Root Dir" | grep "/var/snap/docker/"
-> ```
-> If you see the following output:
-> ```
-> /var/snap/docker/
-> ```
-> you should migrate to a standard Docker installation and remove the snap-based package before proceeding: [Install Docker on Ubuntu](https://docs.docker.com/engine/install/ubuntu/).
->
-> ⚠️ To avoid losing data or interrupting services, only remove the Docker snap after you are certain you're not running any existing containers in it.
->
-> Consult the official Docker documentation or other guides for instructions on migrating existing containers. Once you are certain it's safe, remove the snap-based Docker installation with:
-> ```sh
-> sudo snap remove docker
-> ```
-
-2. If you need IPv6 support, enable it by following: [Docker IPv6 support for AIO](https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md)
-
-3. AIO uses a special `mastercontainer` to orchestrate the various pieces of the Nextcloud stack. To start AIO, launch the `mastercontainer` with the command below:
-
-```sh
-# For Linux and without a web server or reverse proxy already in place:
-sudo docker run \
- --init \
- --sig-proxy=false \
- --name nextcloud-aio-mastercontainer \
- --restart always \
- --publish 80:80 \
- --publish 8080:8080 \
- --publish 8443:8443 \
- --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
- --volume /var/run/docker.sock:/var/run/docker.sock:ro \
- ghcr.io/nextcloud-releases/all-in-one:latest
-```
-
-
- Explanation of the command
-
- - `sudo docker run` — starts a new Docker container. Omit `sudo` if your user is in the `docker` group.
- - `--init` — runs an init process inside the container to handle zombie processes.
- - `--sig-proxy=false` — prevents Ctrl+C in the attached terminal from stopping the container.
- - `--name nextcloud-aio-mastercontainer` — the container name. Do not change this name; mastercontainer updates rely on it.
- - `--restart always` — ensures the container restarts automatically with the Docker daemon.
- - `--publish 80:80` — publishes container port 80 on host port 80 (used for ACME http-challenge when obtaining certificates). Not required if you run AIO behind a reverse proxy.
- - `--publish 8080:8080` — publishes the AIO interface (self-signed certificate) on host port 8080. You may map a different host port if 8080 is in use (e.g. `--publish 8081:8080`).
- - `--publish 8443:8443` — publishes the AIO interface with a valid certificate on host port 8443 (requires ports 80 and 8443 to be reachable and a domain pointing to your server). Not required if you run AIO behind a reverse proxy.
- - `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` — stores mastercontainer configuration in the named Docker volume. Do not change this volume name; built-in backups depend on it.
- - `--volume /var/run/docker.sock:/var/run/docker.sock:ro` — mounts the Docker socket (read-only) so the mastercontainer can manage other containers. On Windows/macOS or when using rootless Docker, this path may need adjustment; see the platform-specific docs. If you change the socket path, also set `WATCHTOWER_DOCKER_SOCKET_PATH` accordingly. If you prefer not to expose the socket, see the manual-install documentation: [Manual install without docker socket access](https://github.com/nextcloud/all-in-one/tree/main/manual-install)
- - `ghcr.io/nextcloud-releases/all-in-one:latest` — the mastercontainer image.
-
- Additional options can be set with environment variables (for example `--env NEXTCLOUD_DATADIR="/mnt/ncdata"` to change Nextcloud's datadir on first startup). See the Customization section and example compose file: [compose.yaml](https://github.com/nextcloud/all-in-one/blob/main/compose.yaml) for more options.
-
-
-> [!TIP]
-> If you want Nextcloud’s data directory in a different location than the default Docker volume, see "How to change the default location of Nextcloud's Datadir" in this README: [How to change the default location of Nextcloud's Datadir](#how-to-change-the-default-location-of-nextclouds-datadir)
-
-> [!NOTE]
-> For production usage (and ease of upgrades and changes), we suggest using the example [Compose file](https://github.com/nextcloud/all-in-one/blob/main/compose.yaml) rather than `docker run`.
-
-4. After the initial startup, open the Nextcloud AIO interface on port 8080 of this server **by IP address**, for example:
-```txt
-https://192.168.5.5:8080
-```
-
-> [!CAUTION]
-> Use an IP address (not a domain) when accessing the AIO interface on port 8080. Accessing via a domain may work temporarily but is likely to break later due to HSTS.
-
-Port 8080 uses a self-signed certificate that you must accept in your browser.
-
-It is also possible to obtain a valid certificate automatically if your firewall/router forwards ports 80 and 8443 and you point a domain to your server. In that case, access the AIO interface using the dedicated port for this purpose (8443), for example:
-```txt
-https://your-domain-that-points-to-this-server.tld:8443
-```
-
-5. If you enable Nextcloud Talk, open port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk (TURN) container.
-
-# FAQ
-- [TOC](#faq)
- - [Where can I find additional documentation?](#where-can-i-find-additional-documentation)
- - [How does it work?](#how-does-it-work)
- - [How to contribute?](#how-to-contribute)
- - [How many users are possible?](#how-many-users-are-possible)
-- [Network](#network)
- - [Are reverse proxies supported?](#are-reverse-proxies-supported)
- - [Which ports are mandatory to be open in your firewall/router?](#which-ports-are-mandatory-to-be-open-in-your-firewallrouter)
- - [Explanation of used ports](#explanation-of-used-ports)
- - [Notes on Cloudflare (proxy/tunnel)](#notes-on-cloudflare-proxytunnel)
- - [How to run Nextcloud behind a Cloudflare Tunnel?](#how-to-run-nextcloud-behind-a-cloudflare-tunnel)
- - [How to run Nextcloud via Tailscale?](#how-to-run-nextcloud-via-tailscale)
- - [How to get Nextcloud running using the ACME DNS-challenge?](#how-to-get-nextcloud-running-using-the-acme-dns-challenge)
- - [How to run Nextcloud locally? No domain wanted, or wanting intranet access within your LAN.](#how-to-run-nextcloud-locally-no-domain-wanted-or-wanting-intranet-access-within-your-lan)
- - [Can I use an ip-address for Nextcloud instead of a domain?](#can-i-use-an-ip-address-for-nextcloud-instead-of-a-domain)
- - [Can I run AIO offline or in an airgapped system?](#can-i-run-aio-offline-or-in-an-airgapped-system)
- - [Are self-signed certificates supported for Nextcloud?](#are-self-signed-certificates-supported-for-nextcloud)
- - [Can I use AIO with multiple domains?](#can-i-use-aio-with-multiple-domains)
- - [Are other ports than the default 443 for Nextcloud supported?](#are-other-ports-than-the-default-443-for-nextcloud-supported)
- - [Can I run Nextcloud in a subdirectory on my domain?](#can-i-run-nextcloud-in-a-subdirectory-on-my-domain)
- - [How can I access Nextcloud locally?](#how-can-i-access-nextcloud-locally)
- - [How to skip the domain validation?](#how-to-skip-the-domain-validation)
- - [How to resolve firewall problems with Fedora Linux, RHEL OS, CentOS, SUSE Linux and others?](#how-to-resolve-firewall-problems-with-fedora-linux-rhel-os-centos-suse-linux-and-others)
- - [What can I do to fix the internal or reserved ip-address error?](#what-can-i-do-to-fix-the-internal-or-reserved-ip-address-error)
- - [How to adjust the MTU size of the docker network](#how-to-adjust-the-mtu-size-of-the-docker-network)
-- [Infrastructure](#infrastructure)
- - [Which CPU architectures are supported?](#which-cpu-architectures-are-supported)
- - [Disrecommended VPS providers](#disrecommended-vps-providers)
- - [Recommended VPS](#recommended-vps)
- - [Note on storage options](#note-on-storage-options)
- - [Are there known problems when SELinux is enabled?](#are-there-known-problems-when-selinux-is-enabled)
-- [Customization](#customization)
- - [How to adjust the internally used docker api version?](#how-to-adjust-the-internally-used-docker-api-version)
- - [How to change the default location of Nextcloud's Datadir?](#how-to-change-the-default-location-of-nextclouds-datadir)
- - [How to store the files/installation on a separate drive?](#how-to-store-the-filesinstallation-on-a-separate-drive)
- - [How to limit the resource usage of AIO?](#how-to-limit-the-resource-usage-of-aio)
- - [How to allow the Nextcloud container to access directories on the host?](#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host)
- - [How to adjust the Talk port?](#how-to-adjust-the-talk-port)
- - [How to adjust the upload limit for Nextcloud?](#how-to-adjust-the-upload-limit-for-nextcloud)
- - [How to adjust the max execution time for Nextcloud?](#how-to-adjust-the-max-execution-time-for-nextcloud)
- - [How to adjust the PHP memory limit for Nextcloud?](#how-to-adjust-the-php-memory-limit-for-nextcloud)
- - [How to change the Nextcloud apps that are installed on the first startup?](#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup)
- - [How to add OS packages permanently to the Nextcloud container?](#how-to-add-os-packages-permanently-to-the-nextcloud-container)
- - [How to add PHP extensions permanently to the Nextcloud container?](#how-to-add-php-extensions-permanently-to-the-nextcloud-container)
- - [What about the pdlib PHP extension for the facerecognition app?](#what-about-the-pdlib-php-extension-for-the-facerecognition-app)
- - [How to enable hardware acceleration for Nextcloud?](#how-to-enable-hardware-acceleration-for-nextcloud)
- - [With open source drivers MESA for AMD, Intel and **new** drivers `Nouveau` for Nvidia](#with-open-source-drivers-mesa-for-amd-intel-and-new-drivers-nouveau-for-nvidia)
- - [With proprietary drivers for Nvidia :warning: BETA](#with-proprietary-drivers-for-nvidia-warning-beta)
- - [How to keep disabled apps?](#how-to-keep-disabled-apps)
- - [How to trust user-defined Certification Authorities (CA)?](#how-to-trust-user-defined-certification-authorities-ca)
- - [How to disable Collabora's Seccomp feature?](#how-to-disable-collaboras-seccomp-feature)
- - [How to adjust the Fulltextsearch Java options?](#how-to-adjust-the-fulltextsearch-java-options)
-- [Guides](#guides)
- - [How to run AIO on macOS?](#how-to-run-aio-on-macos)
- - [How to run AIO on Windows?](#how-to-run-aio-on-windows)
- - [How to run AIO on Synology DSM](#how-to-run-aio-on-synology-dsm)
- - [How to run AIO with Portainer?](#how-to-run-aio-with-portainer)
- - [Can I run AIO on TrueNAS SCALE?](#can-i-run-aio-on-truenas-scale)
- - [How to run `occ` commands?](#how-to-run-occ-commands)
- - [How to resolve `Security & setup warnings displays the "missing default phone region" after initial install`?](#how-to-resolve-security--setup-warnings-displays-the-missing-default-phone-region-after-initial-install)
- - [How to run multiple AIO instances on one server?](#how-to-run-multiple-aio-instances-on-one-server)
- - [Bruteforce protection FAQ](#bruteforce-protection-faq)
- - [How to switch the channel?](#how-to-switch-the-channel)
- - [How to update the containers?](#how-to-update-the-containers)
- - [How to easily log in to the AIO interface?](#how-to-easily-log-in-to-the-aio-interface)
- - [How to change the domain?](#how-to-change-the-domain)
- - [How to properly reset the instance?](#how-to-properly-reset-the-instance)
- - [Can I use a CIFS/SMB share as Nextcloud's datadir?](#can-i-use-a-cifssmb-share-as-nextclouds-datadir)
- - [Can I run this with Docker swarm?](#can-i-run-this-with-docker-swarm)
- - [Can I run this with Kubernetes?](#can-i-run-this-with-kubernetes)
- - [How to run this with Docker rootless?](#can-i-run-this-with-podman-instead-of-docker)
- - [Can I run this with Podman instead of Docker?](#can-i-run-this-with-podman-instead-of-docker)
- - [Access/Edit Nextcloud files/folders manually](#accessedit-nextcloud-filesfolders-manually)
- - [How to edit Nextclouds config.php file with a texteditor?](#how-to-edit-nextclouds-configphp-file-with-a-texteditor)
- - [How to change default files by creating a custom skeleton directory?](#how-to-change-default-files-by-creating-a-custom-skeleton-directory)
- - [How to adjust the version retention policy and trashbin retention policy?](#how-to-adjust-the-version-retention-policy-and-trashbin-retention-policy)
- - [How to enable automatic updates without creating a backup beforehand?](#how-to-enable-automatic-updates-without-creating-a-backup-beforehand)
- - [Securing the AIO interface from unauthorized ACME challenges](#securing-the-aio-interface-from-unauthorized-acme-challenges)
- - [How to migrate from an already existing Nextcloud installation to Nextcloud AIO?](#how-to-migrate-from-an-already-existing-nextcloud-installation-to-nextcloud-aio)
-- [Backup](#backup)
- - [What is getting backed up by AIO's backup solution?](#what-is-getting-backed-up-by-aios-backup-solution)
- - [How to adjust borgs retention policy?](#how-to-adjust-borgs-retention-policy)
- - [How to migrate from AIO to AIO?](#how-to-migrate-from-aio-to-aio)
- - [Are remote borg backups supported?](#are-remote-borg-backups-supported)
- - [Failure of the backup container in LXC containers](#failure-of-the-backup-container-in-lxc-containers)
- - [How to create the backup volume on Windows?](#how-to-create-the-backup-volume-on-windows)
- - [Pro-tip: Backup archives access](#pro-tip-backup-archives-access)
- - [Delete backup archives manually](#delete-backup-archives-manually)
- - [Sync local backups regularly to another drive](#sync-local-backups-regularly-to-another-drive)
- - [How to exclude Nextcloud's data directory or the preview folder from backup?](#how-to-exclude-nextclouds-data-directory-or-the-preview-folder-from-backup)
- - [How to stop/start/update containers or trigger the daily backup from a script externally?](#how-to-stopstartupdate-containers-or-trigger-the-daily-backup-from-a-script-externally)
- - [How to disable the backup section?](#how-to-disable-the-backup-section)
-- [Addons](#addons)
- - [Fail2ban](#fail2ban)
- - [LDAP](#ldap)
- - [Netdata](#netdata)
- - [USER_SQL](#user_sql)
- - [phpMyAdmin, Adminer or pgAdmin](#phpmyadmin-adminer-or-pgadmin)
- - [Mail server](#mail-server)
-- [Miscellaneous](#miscellaneous)
- - [Requirements for integrating new containers](#requirements-for-integrating-new-containers)
- - [Update policy](#update-policy)
- - [How often are update notifications sent?](#how-often-are-update-notifications-sent)
- - [Huge docker logs](#huge-docker-logs)
-
-### Where can I find additional documentation?
-Some of the documentation is available on [GitHub Discussions](https://github.com/nextcloud/all-in-one/discussions/categories/wiki).
+3. After the initial startup, you should be able to open the Nextcloud AIO Interface now on port 8080 of this server.
+E.g. `https://ip.address.of.this.server:8080`
+⚠️ **Important:** do always use an ip-address if you access this port and not a domain as HSTS might block access to it later! (It is also expected that this port uses a self-signed certificate due to security concerns which you need to accept in your browser)
+If your firewall/router has port 80 and 8443 open/forwarded and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
+`https://your-domain-that-points-to-this-server.tld:8443`
+4. Please do not forget to open port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk container!
+## FAQ
### How does it work?
Nextcloud AIO is inspired by projects like Portainer that manage the docker daemon by talking to it through the docker socket directly. This concept allows a user to install only one container with a single command that does the heavy lifting of creating and managing all containers that are needed in order to provide a Nextcloud installation with most features included. It also makes updating a breeze and is not bound to the host system (and its slow updates) anymore as everything is in containers. Additionally, it is very easy to handle from a user perspective because a simple interface for managing your Nextcloud AIO installation is provided.
-### How to contribute?
-See [this issue](https://github.com/nextcloud/all-in-one/issues/5251) for a list of feature requests that need help by contributors.
-
-### How many users are possible?
-Up to 100 users are free, more are possible with [Nextcloud Enterprise](https://nextcloud.com/all-in-one/)
-
-## Network
-
### Are reverse proxies supported?
Yes. Please refer to the following documentation on this: [reverse-proxy.md](https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md)
+### Which CPU architectures are supported?
+You can check this on Linux by running: `uname -m`
+- x86_64/x64/amd64
+- aarch64/arm64/armv8 (Note: ClamAV is currently not supported on this CPU architecture)
+
### Which ports are mandatory to be open in your firewall/router?
Only those (if you access the Mastercontainer Interface internally via port 8080):
- `443/TCP` for the Apache container
- `443/UDP` if you want to enable http3 for the Apache container
- `3478/TCP` and `3478/UDP` for the Talk container
-### Explanation of used ports
+### Explanation of used ports:
- `8080/TCP`: Mastercontainer Interface with self-signed certificate (works always, also if only access via IP-address is possible, e.g. `https://ip.address.of.this.server:8080/`) ⚠️ **Important:** do always use an ip-address if you access this port and not a domain as HSTS might block access to it later! (It is also expected that this port uses a self-signed certificate due to security concerns which you need to accept in your browser)
- `80/TCP`: redirects to Nextcloud (is used for getting the certificate via ACME http-challenge for the Mastercontainer)
- `8443/TCP`: Mastercontainer Interface with valid certificate (only works if port 80 and 8443 are open/forwarded in your firewall/router and you point a domain to your server. It generates a valid certificate then automatically and access via e.g. `https://public.domain.com:8443/` is possible.)
@@ -318,261 +151,8 @@ Only those (if you access the Mastercontainer Interface internally via port 8080
- `443/UDP`: will be used by the Apache container later on and needs to be open/forwarded in your firewall/router if you want to enable http3
- `3478/TCP` and `3478/UDP`: will be used by the Turnserver inside the Talk container and needs to be open/forwarded in your firewall/router
-### Notes on Cloudflare (proxy/tunnel)
-Since Cloudflare Proxy/Tunnel comes with a lot of limitations which are listed below, it is rather recommended to switch to [Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817) if possible.
-- Cloudflare Proxy and Cloudflare Tunnel both require Cloudflare to perform TLS termination on their side and thus decrypt all the traffic on their infrastructure. This is a privacy concern and you will need to look for other solutions if it's unacceptable for you.
-- Using Cloudflare Tunnel might potentially slow down Nextcloud since local access via the configured domain is not possible because TLS termination is in that case offloaded to Cloudflare's infrastructure. There is no way to disable this behavior in Cloudflare Tunnel.
-- It is known that the domain validation may not work correctly behind Cloudflare since Cloudflare might block the validation attempt. You can simply skip it in that case by following: https://github.com/nextcloud/all-in-one#how-to-skip-the-domain-validation
-- Make sure to [disable Cloudflares Rocket Loader feature](https://help.nextcloud.com/t/login-page-not-working-solved/149417/8) as otherwise Nextcloud's login prompt will not be shown.
-- Cloudflare only supports uploading files up to 100 MB in the free plan, if you try to upload bigger files you will get an error (413 - Payload Too Large) if no chunking is used (e.g. for public uploads in the web, or if chunks are configured to be bigger than 100 MB in the clients or the web). If you need to upload bigger files, you need to disable the proxy option in your DNS settings. Note that this will both disable Cloudflare DDoS protection and Cloudflare Tunnel as these services require the proxy option to be enabled.
-- If using Cloudflare Tunnel and the Nextcloud Desktop Client [Set Chunking on Nextcloud Desktop Client](https://github.com/nextcloud/desktop/issues/4271#issuecomment-1159578065)
-- Cloudflare only allows a max timeout of 100s for requests which is not configurable. This means that any server-side processing e.g. for assembling chunks for big files during upload that take longer than 100s will simply not work. See https://github.com/nextcloud/server/issues/19223. If you need to upload big files reliably, you need to disable the proxy option in your DNS settings. Note that this will both disable Cloudflare DDoS protection and Cloudflare Tunnel as these services require the proxy option to be enabled.
-- It is known that the in AIO included collabora (Nextcloud Office) does not work out of the box behind Cloudflare. To make it work, you need to add all [Cloudflare IP-ranges](https://www.cloudflare.com/ips/) to the wopi-allowlist in `https://yourdomain.com/settings/admin/richdocuments`
-- Cloudflare Proxy might block the Turnserver for Nextcloud Talk from working correctly. You might want to disable Cloudflare Proxy thus. See https://github.com/nextcloud/all-in-one/discussions/2463#discussioncomment-5779981
-- The built-in turn-server for Nextcloud Talk will not work behind Cloudflare Tunnel since it needs a separate port (by default 3478 or as chosen) available on the same domain. If you still want to use the feature, you will need to install your own turnserver or use a publicly available one and adjust and test your stun and turn settings in `https://yourdomain.com/settings/admin/talk`.
-- If you get an error in Nextcloud's admin overview that the HSTS header is not set correctly, you might need to enable it in Cloudflare manually.
-- If you are using AIO's built-in Reverse Proxy and don't use your own, then the certificate issuing may possibly not work out-of-the-box because Cloudflare might block the attempt. In that case you need to disable the Proxy feature at least temporarily in order to make it work. Note that this isn't an option if you need Cloudflare Tunnel as disabling the proxy would also disable Cloudflare Tunnel which would in turn make your server unreachable for the verification. See https://github.com/nextcloud/all-in-one/discussions/1101.
-
-### How to run Nextcloud behind a Cloudflare Tunnel?
-Although it does not seems like it is the case but from AIO perspective a Cloudflare Tunnel works like a reverse proxy. So please follow the [reverse proxy documentation](./reverse-proxy.md) where is documented how to make it run behind a Cloudflare Tunnel. However please see the [caveats](https://github.com/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel) before proceeding.
-
-### How to run Nextcloud via Tailscale?
-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 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.
-
-### Can I use an ip-address for Nextcloud instead of a domain?
-No and it will not be added. If you only want to run it locally, you may have a look at the following documentation: [local-instance.md](./local-instance.md). Recommended is to use [Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817).
-
-### Can I run AIO offline or in an airgapped system?
-No. This is not possible and will not be added due to multiple reasons: update checks, app installs via app-store, downloading additional docker images on demand and more.
-
-### Are self-signed certificates supported for Nextcloud?
-No and they will not be. If you want to run it locally, without opening Nextcloud to the public internet, please have a look at the [local instance documentation](./local-instance.md). Recommended is to use [Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817).
-
-### Can I use AIO with multiple domains?
-No and it will not be added. However you can use [this feature](https://github.com/nextcloud/all-in-one/blob/main/multiple-instances.md) in order to create multiple AIO instances, one for each domain.
-
-### Are other ports than the default 443 for Nextcloud supported?
-No and they will not be. If port 443 and/or 80 is blocked for you, you may use [Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817) if you want to publish it online. If you already run a different service on port 443, please use a dedicated domain for Nextcloud and set it up correctly by following the [reverse proxy documentation](./reverse-proxy.md). However in all cases the Nextcloud interface will redirect you to port 443.
-
-### Can I run Nextcloud in a subdirectory on my domain?
-No and it will not be added. Please use a dedicated (sub-)domain for Nextcloud and set it up correctly by following the [reverse proxy documentation](./reverse-proxy.md). Alternatively, you may use [Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817) if you want to publish it online.
-
-### How can I access Nextcloud locally?
-Please note that local access is not possible if you are running AIO behind Cloudflare Tunnel since TLS proxying is in that case offloaded to Cloudflares infrastructure. You can fix this by setting up your own reverse proxy that handles TLS proxying locally and will make the steps below work.
-
-Please make sure that if you are running AIO behind a reverse proxy, that the reverse proxy is configured to use port 443 on the server that runs it. Otherwise the steps below will not work.
-
-Now that this is out of the way, the recommended way how to access Nextcloud locally, is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. Below are some guides:
-- https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/
-- https://help.nextcloud.com/t/need-help-to-configure-internal-access/156075/6
-- https://howchoo.com/pi/pi-hole-setup together with https://web.archive.org/web/20221203223505/https://docs.callitkarma.me/posts/PiHole-Local-DNS/
-- https://dockerlabs.collabnix.com/intermediate/networking/Configuring_DNS.html
-Apart from that there is now a community container that can be added to the AIO stack: https://github.com/nextcloud/all-in-one/tree/main/community-containers/pi-hole
-
-### How to skip the domain validation?
-If you are completely sure that you've configured everything correctly and are not able to pass the domain validation, you may skip the domain validation by adding `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used).
-
-Alternatively, if the container is already running, reload the AIO interface with the param `skip_domain_validation` to skip the domain validation on the fly: e.g. `https://ip.address.of.the.server:8080/containers?skip_domain_validation`.
-
-### How to resolve firewall problems with Fedora Linux, RHEL OS, CentOS, SUSE Linux and others?
-It is known that Linux distros that use [firewalld](https://firewalld.org) as their firewall daemon have problems with docker networks. In case the containers are not able to communicate with each other, you may change your firewalld to use the iptables backend by running:
-```
-sudo sed -i 's/FirewallBackend=nftables/FirewallBackend=iptables/g' /etc/firewalld/firewalld.conf
-sudo systemctl restart firewalld docker
-```
-Afterwards it should work.
-
-See https://dev.to/ozorest/fedora-32-how-to-solve-docker-internal-network-issue-22me for more details on this. This limitation is even mentioned on the official firewalld website: https://firewalld.org/#who-is-using-it
-
-### What can I do to fix the internal or reserved ip-address error?
-If you get an error during the domain validation which states that your ip-address is an internal or reserved ip-address, you can fix this by first making sure that your domain indeed has the correct public ip-address that points to the server and then adding `--add-host yourdomain.com:` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) which will allow the domain validation to work correctly. And so that you know: even if the `A` record of your domain should change over time, this is no problem since the mastercontainer will not make any attempt to access the chosen domain after the initial domain validation.
-
-### How to adjust the MTU size of the docker network
-You can adjust the MTU size of the docker network by creating it beforehand with the custom MTU:
-```
-docker network create --driver bridge --opt com.docker.network.driver.mtu=1440 nextcloud-aio
-```
-When you open the AIO interface for the first time after you execute the `docker run` command, it will automatically connect to the `nextcloud-aio` network with the custom MTU. Keep in mind that if you previously started the mastercontainer without creating the network with the extra options, you will need to remove the old `nextcloud-aio` network and recreate it with the new configuration.
-
-If you want to use docker compose, you can check out the comments in the `compose.yaml` file for more details.
-
-## Infrastructure
-
-### Which CPU architectures are supported?
-You can check this on Linux by running: `uname -m`
-- x86_64/x64/amd64
-- aarch64/arm64/armv8
-
-### Disrecommended VPS providers
-- *Older* Strato VPS using Virtuozzo caused problems though ones from Q3 2023 and later should work.
- If your VPS has a `/proc/user_beancounters` file and a low `numproc` limit set in it
- your server will likely misbehave once it reaches this limit
- which is very quickly reached by AIO, see [here](https://github.com/nextcloud/all-in-one/discussions/1747#discussioncomment-4716164).
-- Hostingers VPS seem to miss a specific Kernel feature which is required for AIO to run correctly. See [here](https://help.nextcloud.com/t/help-installing-nc-via-aio-on-vps/153956).
-
-### Recommended VPS
-In general recommended VPS are those that are KVM/non-virtualized as Docker should work best on them.
-
-### Note on storage options
-- SD-cards are disrecommended for AIO since they cripple the performance and they are not meant for many write operations which is needed for the database and other parts
-- SSD storage is recommended
-- HDD storage should work as well but is of course much slower than SSD storage
-
-### Are there known problems when SELinux is enabled?
-Yes. If SELinux is enabled, you might need to add the `--security-opt label:disable` option to the docker run command of the mastercontainer in order to allow it to access the docker socket (or `security_opt: ["label:disable"]` in compose.yaml). See https://github.com/nextcloud/all-in-one/discussions/485
-
-## Customization
-
-### How to adjust the internally used docker api version?
-If you run an outdated or too new docker version, you might run into problems with the by AIO internally used docker api version. To fix this, you can specify the api version manually. You can do so by adding `--env DOCKER_API_VERSION=1.44` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). This variable excepts a string based on the pattern `[0-9].[0-9]+`, so e.g. `1.44`. ⚠️ However please note that only the default api version (unset this variable) is supported and tested by the maintainers of Nextcloud AIO. So use this on your own risk and things might break without warning.
-
-### How to change the default location of Nextcloud's Datadir?
-> [!WARNING]
-> Do not set or adjust this value after the initial Nextcloud installation is done! If you still want to do it afterwards, see [this](https://github.com/nextcloud/all-in-one/discussions/890#discussioncomment-3089903) on how to do it.
-
-You can configure the Nextcloud container to use a specific directory on your host as data directory. You can do so by adding the environmental variable `NEXTCLOUD_DATADIR` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). Allowed values for that variable are strings that start with `/` and are not equal to `/`. The chosen directory or volume will then be mounted to `/mnt/ncdata` inside the container.
-
-- An example for Linux is `--env NEXTCLOUD_DATADIR="/mnt/ncdata"`. ⚠️ Please note: If you should be using an external BTRFS drive that is mounted to `/mnt/ncdata`, make sure to choose a subfolder like e.g. `/mnt/ncdata/nextcloud` as datadir, since the root folder is not suited as datadir in that case. See https://github.com/nextcloud/all-in-one/discussions/2696.
-- On macOS it might be `--env NEXTCLOUD_DATADIR="/var/nextcloud-data"`
-- For Synology it may be `--env NEXTCLOUD_DATADIR="/volume1/docker/nextcloud/data"`.
-- On Windows it might be `--env NEXTCLOUD_DATADIR="/run/desktop/mnt/host/c/ncdata"`. (This path is equivalent to `C:\ncdata` on your Windows host so you need to translate the path accordingly. Hint: the path that you enter needs to start with `/run/desktop/mnt/host/`. Append to that the exact location on your windows host, e.g. `c/ncdata` which is equivalent to `C:\ncdata`.) ⚠️ **Please note**: This does not work with external drives like USB or network drives and only with internal drives like SATA or NVME drives.
-- Another option is to provide a specific volume name here with: `--env NEXTCLOUD_DATADIR="nextcloud_aio_nextcloud_datadir"`. This volume needs to be created beforehand manually by you in order to be able to use it. e.g. on Windows with:
- ```
- docker volume create ^
- --driver local ^
- --name nextcloud_aio_nextcloud_datadir ^
- -o device="/host_mnt/e/your/data/path" ^
- -o type="none" ^
- -o o="bind"
- ```
- In this example, it would mount `E:\your\data\path` into the volume so for a different location you need to adjust `/host_mnt/e/your/data/path` accordingly.
-
-### How to store the files/installation on a separate drive?
-You can move the whole docker library and all its files including all Nextcloud AIO files and folders to a separate drive by first mounting the drive in the host OS (NTFS is not supported and ext4 is recommended as FS) and then following this tutorial: https://www.guguweb.com/2019/02/07/how-to-move-docker-data-directory-to-another-location-on-ubuntu/
-(Of course docker needs to be installed first for this to work.)
-
-⚠️ If you encounter errors from richdocuments in your Nextcloud logs, check in your Collabora container if the message "Capabilities are not set for the coolforkit program." appears. If so, follow these steps:
-
-1. Stop all the containers from the AIO Interface.
-2. Go to your terminal and delete the Collabora container (`docker rm nextcloud-aio-collabora`) AND the Collabora image (`docker image rm nextcloud/aio-collabora`).
-3. You might also want to prune your Docker (`docker system prune -a`) (no data will be lost).
-4. Restart your containers from the AIO Interface.
-
-This should solve the problem.
-
-### How to limit the resource usage of AIO?
-In some cases, you might want to limit the overall resource usage of AIO. You can do so by following [this documentation](https://github.com/nextcloud/all-in-one/discussions/7273). Another possibility is to use the [manual installation](./manual-install/).
-
-### How to allow the Nextcloud container to access directories on the host?
-By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable `NEXTCLOUD_MOUNT` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). Allowed values for that variable are strings that start with `/` and are not equal to `/`.
-
-- Two examples for Linux are `--env NEXTCLOUD_MOUNT="/mnt/"` and `--env NEXTCLOUD_MOUNT="/media/"`.
-- On macOS it might be `--env NEXTCLOUD_MOUNT="/Volumes/your_drive/"`
-- For Synology it may be `--env NEXTCLOUD_MOUNT="/volume1/"`.
-- On Windows it might be `--env NEXTCLOUD_MOUNT="/run/desktop/mnt/host/d/your-folder/"`. (This path is equivalent to `D:\your-folder` on your Windows host so you need to translate the path accordingly. Hint: the path that you enter needs to start with `/run/desktop/mnt/host/`. Append to that the exact location on your windows host, e.g. `d/your-folder/` which is equivalent to `D:\your-folder`.) ⚠️ **Please note**: This does not work with external drives like USB or network drives and only with internal drives like SATA or NVME drives.
-
-After using this option, please make sure to apply the correct permissions to the directories that you want to use in Nextcloud. E.g. `sudo chown -R 33:0 /mnt/your-drive-mountpoint` and `sudo chmod -R 750 /mnt/your-drive-mountpoint` should make it work on Linux when you have used `--env NEXTCLOUD_MOUNT="/mnt/"`. On Windows you could do this e.g. with `docker exec -it nextcloud-aio-nextcloud chown -R 33:0 /run/desktop/mnt/host/d/your-folder/` and `docker exec -it nextcloud-aio-nextcloud chmod -R 750 /run/desktop/mnt/host/d/your-folder/`.
-
-You can then navigate to `https://your-nc-domain.com/settings/apps/disabled`, activate the external storage app, navigate to `https://your-nc-domain.com/settings/admin/externalstorages` and add a local external storage directory that will be accessible inside the container at the same place that you've entered. E.g. `/mnt/your-drive-mountpoint` will be mounted to `/mnt/your-drive-mountpoint` inside the container, etc.
-
-Be aware though that these locations will not be covered by the built-in backup solution - but you can add further Docker volumes and host paths that you want to back up after the initial backup is done.
-
-> [!NOTE]
-> If you can't see the type "local storage" in the external storage admin options, a restart of the containers from the AIO interface may be required.
-
-### How to adjust the Talk port?
-By default will the talk container use port `3478/UDP` and `3478/TCP` for connections. This should be set to something higher than 1024! You can adjust the port by adding e.g. `--env TALK_PORT=3478` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and adjusting the port to your desired value. Best is to use a port over 1024, so e.g. 3479 to not run into this: https://github.com/nextcloud/all-in-one/discussions/2517
-
-### How to adjust the upload limit for Nextcloud?
-By default, public uploads to Nextcloud are limited to a max of 16G (logged in users can upload much bigger files using the webinterface or the mobile/desktop clients, since chunking is used in that case). You can adjust the upload limit by providing `--env NEXTCLOUD_UPLOAD_LIMIT=16G` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must start with a number and end with `G` e.g. `16G`.
-
-### How to adjust the max execution time for Nextcloud?
-By default, uploads to Nextcloud are limited to a max of 3600s. You can adjust the upload time limit by providing `--env NEXTCLOUD_MAX_TIME=3600` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a number e.g. `3600`.
-
-### How to adjust the PHP memory limit for Nextcloud?
-By default, each PHP process in the Nextcloud container is limited to a max of 512 MB. You can adjust the memory limit by providing `--env NEXTCLOUD_MEMORY_LIMIT=512M` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must start with a number and end with `M` e.g. `1024M`.
-
-### How to change the Nextcloud apps that are installed on the first startup?
-You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `--env NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes"` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a string with small letters a-z, 0-9, spaces and hyphens or '_'. You can disable shipped and by default enabled apps by adding a hyphen in front of the appid. E.g. `-contactsinteraction`.
-
-### How to add OS packages permanently to the Nextcloud container?
-Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project quickly unmaintainable - there is an official way in which you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies.
-
-You can do so by adding `--env NEXTCLOUD_ADDITIONAL_APKS="imagemagick dependency2 dependency3"` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?branch=v3.23. By default `imagemagick` is added. If you want to keep it, you need to specify it as well.
-
-### How to add PHP extensions permanently to the Nextcloud container?
-Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project quickly unmaintainable - there is an official way in which you can add additional php extensions into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require additional php extensions.
-
-You can do so by adding `--env NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default `imagick` is added. If you want to keep it, you need to specify it as well.
-
-### What about the pdlib PHP extension for the facerecognition app?
-The [facerecognition app](https://apps.nextcloud.com/apps/facerecognition) requires the pdlib PHP extension to be installed. Unfortunately, it is not available on PECL nor via PHP core, so there is no way to add this into AIO currently. However you can use [this community container](https://github.com/nextcloud/all-in-one/tree/main/community-containers/facerecognition) in order to run facerecognition.
-
-### How to enable hardware acceleration for Nextcloud?
-Some container can use GPU acceleration to increase performance like [memories app](https://apps.nextcloud.com/apps/memories) allows to enable hardware transcoding for videos.
-
-#### With open source drivers MESA for AMD, Intel and **new** drivers `Nouveau` for Nvidia
-
-> [!WARNING]
-> This only works if the `/dev/dri` device is present on the host! If it does not exist on your host, don't proceed as otherwise the Nextcloud container will fail to start! If you are unsure about this, better do not proceed with the instructions below. Make sure that your driver is correctly configured on the host.
-
-A list of supported device can be fond in [MESA 3D documentation](https://docs.mesa3d.org/systems.html).
-
-This method use the [Direct Rendering Infrastructure](https://dri.freedesktop.org/wiki/) with the access to the `/dev/dri` device.
-
-In order to use that, you need to add `--env NEXTCLOUD_ENABLE_DRI_DEVICE=true` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) which will mount the `/dev/dri` device into the container.
-
-
-#### With proprietary drivers for Nvidia :warning: BETA
-
-> [!WARNING]
-> This only works if the Nvidia Toolkit is installed on the host and an NVIDIA GPU is enabled! Make sure that it is correctly configured on the host. If it does not exist on your host, don't proceed as otherwise the Nextcloud container will fail to start! If you are unsure about this, better do not proceed with the instructions below.
->
-> This feature is in beta. Since the proprietary, we haven't a lot of user using proprietary drivers, we can't guarantee the stability of this feature. Your feedback is welcome.
-
-This method use the [Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html) with the nvidia runtime.
-
-In order to use that, you need to add `--env NEXTCLOUD_ENABLE_NVIDIA_GPU=true` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) which will enable the nvidia runtime.
-
-If you're using WSL2 and want to use the NVIDIA runtime, please follow the instructions to [install the NVIDIA Container Toolkit meta-version in WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html#cuda-support-for-wsl-2).
-
-### How to keep disabled apps?
-In certain situations you might want to keep Nextcloud apps that are disabled in the AIO interface and not uninstall them if they should be installed in Nextcloud. You can do so by adding `--env NEXTCLOUD_KEEP_DISABLED_APPS=true` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used).
-> [!WARNING]
-> Doing this might cause unintended problems in Nextcloud if an app that requires an external dependency is still installed but the external dependency not for example.
-
-### How to trust user-defined Certification Authorities (CA)?
-> [!NOTE]
-> Please note, that this feature is only intended to make LDAPS connections with self-signed certificates work. It will not make other interconnectivity between the different containers work, as they expect a valid publicly trusted certificate like one from Let's Encrypt.
-
-For some applications it might be necessary to establish a secure connection to another host/server which is using a certificate issued by a Certification Authority that is not trusted out of the box. An example could be configuring LDAPS against a domain controller (Active Directory or Samba-based) of an organization.
-
-You can make the Nextcloud container trust any Certification Authority by providing the environmental variable `NEXTCLOUD_TRUSTED_CACERTS_DIR` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). The value of the variables should be set to the absolute paths of the directory on the host, which contains one or more Certification Authorities certificates. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted.
-
-When using `docker run`, the environmental variable can be set with `--env NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`.
-
-In order for the value to be valid, the path should start with `/` and not end with `/` and point to an existing **directory**. Pointing the variable directly to a certificate **file** will not work and may also break things.
-
-### How to disable Collabora's Seccomp feature?
-The Collabora container enables Seccomp by default, which is a security feature of the Linux kernel. On systems without this kernel feature enabled, you need to provide `--env COLLABORA_SECCOMP_DISABLED=true` to the initial docker run command in order to make it work. If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used.
-
-### How to adjust the Fulltextsearch Java options?
-The Fulltextsearch Java options are by default set to `-Xms512M -Xmx512M` which might not be enough on some systems. You can adjust this by adding e.g. `--env FULLTEXTSEARCH_JAVA_OPTIONS="-Xms1024M -Xmx1024M"` to the initial docker run command. If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used.
-
-## Guides
-
### How to run AIO on macOS?
-
-> [!NOTE]
-> On macOS, it is recommended to use OrbStack instead of Docker Desktop which has much better compatibility with docker for Linux compared to Docker Desktop. See https://orbstack.dev/
-
-Generally, on macOS, there is only one thing different for the docker run command in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /var/run/docker.sock.raw:/var/run/docker.sock:ro` to run it after you installed [Docker Desktop](https://www.docker.com/products/docker-desktop/) (and don't forget to [enable ipv6](https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md) if you should need that). Apart from that it should work and behave the same like on Linux.
+On macOS, there is only one thing different in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /var/run/docker.sock.raw:/var/run/docker.sock:ro` to run it after you installed [Docker Desktop](https://www.docker.com/products/docker-desktop/) (and don't forget to [enable ipv6](https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md) if you should need that). Apart from that it should work and behave the same like on Linux.
Also, you may be interested in adjusting Nextcloud's Datadir to store the files on the host system. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
@@ -590,19 +170,17 @@ docker run ^
--publish 8443:8443 ^
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
--volume //var/run/docker.sock:/var/run/docker.sock:ro ^
-ghcr.io/nextcloud-releases/all-in-one:latest
+nextcloud/all-in-one:latest
```
Also, you may be interested in adjusting Nextcloud's Datadir to store the files on the host system. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
-> [!NOTE]
-> Almost all commands in this project's documentation use `sudo docker ...`. Since `sudo` is not available on Windows, you simply remove `sudo` from the commands and they should work.
+⚠️ **Please note:** Almost all commands in this project's documentation use `sudo docker ...`. Since `sudo` is not available on Windows, you simply remove `sudo` from the commands and they should work.
### How to run AIO on Synology DSM
-On Synology, there are two things different in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /volume1/docker/docker.sock:/var/run/docker.sock:ro` to run it. You also need to add `--env WATCHTOWER_DOCKER_SOCKET_PATH="/volume1/docker/docker.sock"`to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`). Additionally, you likely need to adjust the internally used api version. See [this documentation](#how-to-adjust-the-internally-used-docker-api-version). Apart from that it should work and behave the same like on Linux. Obviously the Synology Docker GUI will not work with that so you will need to either use SSH or create a user-defined script task in the task scheduler as the user 'root' in order to run the command.
+On Synology, there are two things different in comparison to Linux: instead of using `--volume /var/run/docker.sock:/var/run/docker.sock:ro`, you need to use `--volume /volume1/docker/docker.sock:/var/run/docker.sock:ro` to run it. You also need to add `--env WATCHTOWER_DOCKER_SOCKET_PATH="/volume1/docker/docker.sock"`to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`). Apart from that it should work and behave the same like on Linux. Obviously the Synology Docker GUI will not work with that so you will need to either use SSH or create a user-defined script task in the task scheduler as the user 'root' in order to run the command.
-> [!NOTE]
-> It is possible that the docker socket on your Synology is located in `/var/run/docker.sock` like the default on Linux. Then you can just use the Linux command without having to change anything - you will notice this when you try to start the container and it says that the bind mount failed. E.g. `docker: Error response from daemon: Bind mount failed: '/volume1/docker/docker.sock' does not exists.`
+⚠️ **Please note**: it is possible that the docker socket on your Synology is located in `/var/run/docker.sock` like the default on Linux. Then you can just use the Linux command without having to change anything - you will notice this when you try to start the container and it says that the bind mount failed. E.g. `docker: Error response from daemon: Bind mount failed: '/volume1/docker/docker.sock' does not exists.`
Also, you may be interested in adjusting Nextcloud's Datadir to store the files on the host system. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
@@ -624,28 +202,111 @@ If you have the NAS setup on your local network (which is most often the case) y
The easiest way to run it with Portainer on Linux is to use Portainer's stacks feature and use [this docker-compose file](./compose.yaml) in order to start AIO correctly.
### Can I run AIO on TrueNAS SCALE?
-With the Truenas Scale Release 24.10.0 (which was officially released on October 29th 2024 as a stable release) IX Systems ditched the Kubernetes integration and implemented a fully working docker environment.
-
-For a more complete guide, see this guide by @zybster: https://github.com/nextcloud/all-in-one/discussions/5506
-
-On older TrueNAS SCALE releases with Kubernetes environment, there are two ways to run AIO. The preferred one is to run AIO inside a VM. This is necessary since they do not expose the docker socket for containers on the host, you also cannot use docker-compose on it thus and it is also not possible to run custom helm-charts that are not explicitly written for TrueNAS SCALE.
+On TrueNAS SCALE, there are two ways to run AIO. The preferred one is to run AIO inside a VM. This is necessary since they do not expose the docker socket for containers on the host, you also cannot use docker-compose on it thus and it is also not possible to run custom helm-charts that are not explicitly written for TrueNAS SCALE.
Another but untested way is to install Portainer on your TrueNAS SCALE from here https://truecharts.org/charts/stable/portainer/installation-notes and add the Helm-chart repository https://nextcloud.github.io/all-in-one/ into Portainer by following https://docs.portainer.io/user/kubernetes/helm. More docs on AIOs Helm Chart are available here: https://github.com/nextcloud/all-in-one/tree/main/nextcloud-aio-helm-chart#nextcloud-aio-helm-chart.
+### Notes on Cloudflare (proxy/tunnel)
+- Cloudflare Proxy and Cloudflare Tunnel both require Cloudflare to perform TLS termination on their side and thus decrypt all the traffic on their infrastructure. This is a privacy concern and you will need to look for other solutions if it's unacceptable for you.
+- Using Cloudflare Tunnel might potentially slow down Nextcloud since local access via the configured domain is not possible because TLS termination is in that case offloaded to Cloudflare's infrastructure. There is no way to disable this behavior in Cloudflare Tunnel.
+- It is known that the domain validation may not work correctly behind Cloudflare since Cloudflare might block the validation attempt. You can simply skip it in that case by following: https://github.com/nextcloud/all-in-one#how-to-skip-the-domain-validation
+- Make sure to [disable Cloudflares Rocket Loader feature](https://help.nextcloud.com/t/login-page-not-working-solved/149417/8) as otherwise Nextcloud's login prompt will not be shown.
+- Cloudflare only supports uploading files up to 100 MB in the free plan, if you try to upload bigger files you will get an error (413 - Payload Too Large) if no chunking is used (e.g. for public uploads in the web, or if chunks are configured to be bigger than 100 MB in the clients or the web). If you need to upload bigger files, you need to disable the proxy option in your DNS settings. Note that this will both disable Cloudflare DDoS protection and Cloudflare Tunnel as these services require the proxy option to be enabled.
+- If using Cloudflare Tunnel and the Nextcloud Desktop Client [Set Chunking on Nextcloud Desktop Client](https://github.com/nextcloud/desktop/issues/4271#issuecomment-1159578065)
+- Cloudflare only allows a max timeout of 100s for requests which is not configurable. This means that any server-side processing e.g. for assembling chunks for big files during upload that take longer than 100s will simply not work. See https://github.com/nextcloud/server/issues/19223. If you need to upload big files reliably, you need to disable the proxy option in your DNS settings. Note that this will both disable Cloudflare DDoS protection and Cloudflare Tunnel as these services require the proxy option to be enabled.
+- It is known that the in AIO included collabora (Nextcloud Office) does not work out of the box behind Cloudflare. To make it work, you need to add all [Cloudflare IP-ranges](https://www.cloudflare.com/ips/) to the wopi-allowlist in `https://yourdomain.com/settings/admin/richdocuments`
+- Cloudflare Proxy might block the Turnserver for Nextcloud Talk from working correctly. You might want to disable Cloudflare Proxy thus. See https://github.com/nextcloud/all-in-one/discussions/2463#discussioncomment-5779981
+- The built-in turn-server for Nextcloud Talk will not work behind Cloudflare Tunnel since it needs a separate port (by default 3478 or as chosen) available on the same domain. If you still want to use the feature, you will need to install your own turnserver or use a publicly available one and adjust and test your stun and turn settings in `https://yourdomain.com/settings/admin/talk`.
+- If you get an error in Nextcloud's admin overview that the HSTS header is not set correctly, you might need to enable it in Cloudflare manually.
+- If you are using AIO's built-in Reverse Proxy and don't use your own, then the certificate issuing may possibly not work out-of-the-box because Cloudflare might block the attempt. In that case you need to disable the Proxy feature at least temporarily in order to make it work. Note that this isn't an option if you need Cloudflare Tunnel as disabling the proxy would also disable Cloudflare Tunnel which would in turn make your server unreachable for the verification. See https://github.com/nextcloud/all-in-one/discussions/1101.
+
+### How to run Nextcloud behind a Cloudflare Tunnel?
+Although it does not seems like it is the case but from AIO perspective a Cloudflare Tunnel works like a reverse proxy. So please follow the [reverse proxy documentation](./reverse-proxy.md) where is documented how to make it run behind a Cloudflare Tunnel. However please see the [caveats](https://github.com/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel) before proceeding.
+
+### Disrecommended VPS providers
+- *Older* Strato VPS using Virtuozzo caused problems though ones from Q3 2023 and later should work.
+ If your VPS has a `/proc/user_beancounters` file and a low `numproc` limit set in it
+ your server will likely misbehave once it reaches this limit
+ which is very quickly reached by AIO, see [here](https://github.com/nextcloud/all-in-one/discussions/1747#discussioncomment-4716164).
+- Hostingers VPS seem to miss a specific Kernel feature which is required for AIO to run correctly. See [here](https://help.nextcloud.com/t/help-installing-nc-via-aio-on-vps/153956).
+
+### Recommended VPS
+In general recommended VPS are those that are KVM/non-virtualized as Docker should work best on them.
+
+### Note on storage options
+- SD-cards are disrecommended for AIO since they cripple the performance and they are not meant for many write operations which is needed for the database and other parts
+- SSD storage is recommended
+- HDD storage should work as well but is of course much slower than SSD storage
+
+### 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.
+
+### How to run Nextcloud locally?
+If you do not want to open Nextcloud to the public internet, you may have a look at the following documentation how to set it up locally: [local-instance.md](./local-instance.md)
+
+### Can I run AIO offline or in an airgapped system?
+No. This is not possible and will not be added due to multiple reasons: update checks, app installs via app-store, downloading additional docker images on demand and more.
+
+### Are self-signed certificates supported for Nextcloud?
+No and they will not be. If you want to run it locally, without opening Nextcloud to the public internet, please have a look at the [local instance documentation](./local-instance.md).
+
+### Can I use an ip-address for Nextcloud instead of a domain?
+No and it will not be added. If you only want to run it locally, you may have a look at the following documentation: [local-instance.md](./local-instance.md)
+
+### Can I use AIO with multiple domains?
+No and it will not be added. However you can use [this feature](https://github.com/nextcloud/all-in-one/blob/main/multiple-instances.md) in order to create multiple AIO instances, one for each domain.
+
+### Are other ports than the default 443 for Nextcloud supported?
+No and they will not be. Please use a dedicated domain for Nextcloud and set it up correctly by following the [reverse proxy documentation](./reverse-proxy.md). If port 443 and/or 80 is blocked for you, you may use the a Cloudflare Tunnel if you want to publish it online. You could also use the ACME DNS-challenge to get a valid certificate. However in all cases the Nextcloud interface will redirect you to port 443.
+
+### Can I run Nextcloud in a subdirectory on my domain?
+No and it will not be added. Please use a dedicated domain for Nextcloud and set it up correctly by following the [reverse proxy documentation](./reverse-proxy.md).
+
+### How can I access Nextcloud locally?
+Please note that local access is not possible if you are running AIO behind Cloudflare Tunnel since TLS proxying is in that case offloaded to Cloudflares infrastructure. You can fix this by setting up your own reverse proxy that handles TLS proxying locally and will make the steps below work.
+
+Please make sure that if you are running AIO behind a reverse proxy, that the reverse proxy is configured to use port 443 on the server that runs it. Otherwise the steps below will not work.
+
+Now that this is out of the way, the recommended way how to access Nextcloud locally, is to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your server that runs Nextcloud AIO. Below are some guides:
+- https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/
+- https://help.nextcloud.com/t/need-help-to-configure-internal-access/156075/6
+- https://howchoo.com/pi/pi-hole-setup together with https://web.archive.org/web/20221203223505/https://docs.callitkarma.me/posts/PiHole-Local-DNS/
+- https://dockerlabs.collabnix.com/intermediate/networking/Configuring_DNS.html
+Apart from that there is now a community container that can be added to the AIO stack: https://github.com/nextcloud/all-in-one/tree/main/community-containers/pi-hole
+
+### How to skip the domain validation?
+If you are completely sure that you've configured everything correctly and are not able to pass the domain validation, you may skip the domain validation by adding `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used).
+
+### How to resolve firewall problems with Fedora Linux, RHEL OS, CentOS, SUSE Linux and others?
+It is known that Linux distros that use [firewalld](https://firewalld.org) as their firewall daemon have problems with docker networks. In case the containers are not able to communicate with each other, you may change your firewalld to use the iptables backend by running:
+```
+sudo sed -i 's/FirewallBackend=nftables/FirewallBackend=iptables/g' /etc/firewalld/firewalld.conf
+sudo systemctl restart firewalld docker
+```
+Afterwards it should work.
+
+See https://dev.to/ozorest/fedora-32-how-to-solve-docker-internal-network-issue-22me for more details on this. This limitation is even mentioned on the official firewalld website: https://firewalld.org/#who-is-using-it
+
+### Are there known problems when SELinux is enabled?
+Yes. If SELinux is enabled, you might need to add the `--security-opt label:disable` option to the docker run command of the mastercontainer in order to allow it to access the docker socket (or `security_opt: ["label:disable"]` in compose.yaml). See https://github.com/nextcloud/all-in-one/discussions/485
+
### How to run `occ` commands?
-Simply run the following: `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ your-command`. Of course `your-command` needs to be exchanged with the command that you want to run. **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
+Simply run the following: `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ your-command`. Of course `your-command` needs to be exchanged with the command that you want to run.
### How to resolve `Security & setup warnings displays the "missing default phone region" after initial install`?
-Simply run the following command: `sudo docker exec --user www-data nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `US` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements **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
+Simply run the following command: `sudo docker exec --user www-data nextcloud-aio-nextcloud php occ config:system:set default_phone_region --value="yourvalue"`. Of course you need to modify `yourvalue` based on your location. Examples are `DE`, `US` and `GB`. See this list for more codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
### How to run multiple AIO instances on one server?
See [multiple-instances.md](./multiple-instances.md) for some documentation on this.
### Bruteforce protection FAQ
-Nextcloud features a built-in bruteforce protection which may get triggered and will block an ip-address or disable a user. You can unblock an ip-address by running `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ security:bruteforce:reset ` and enable a disabled user by running `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ user:enable `. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#security for further information. **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
+Nextcloud features a built-in bruteforce protection which may get triggered and will block an ip-address or disable a user. You can unblock an ip-address by running `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ security:bruteforce:reset ` and enable a disabled user by running `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ user:enable `. See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#security for further information.
+
+### Update policy
+This project values stability over new features. That means that when a new major Nextcloud update gets introduced, we will wait at least until the first patch release, e.g. `24.0.1` is out before upgrading to it. Also we will wait with the upgrade until all important apps are compatible with the new major version. Minor or patch releases for Nextcloud and all dependencies as well as all containers will be updated to new versions as soon as possible but we try to give all updates first a good test round before pushing them. That means that it can take around 2 weeks before new updates reach the `latest` channel. If you want to help testing, you can switch to the `beta` channel by following [this documentation](#how-to-switch-the-channel) which will also give you the updates earlier.
### How to switch the channel?
-You can switch to a different channel like e.g. the beta channel or from the beta channel back to the latest channel by stopping the mastercontainer, removing it (no data will be lost) and recreating the container using the same command that you used initially to create the mastercontainer. You simply need to change the last line `ghcr.io/nextcloud-releases/all-in-one:latest` to `ghcr.io/nextcloud-releases/all-in-one:beta` and vice versa. ⚠️ In some rare occurrences, you might need to run `docker pull ghcr.io/nextcloud-releases/all-in-one:latest` or `docker pull ghcr.io/nextcloud-releases/all-in-one:beta` first before being able to use the image.
+You can switch to a different channel like e.g. the beta channel or from the beta channel back to the latest channel by stopping the mastercontainer, removing it (no data will be lost) and recreating the container using the same command that you used initially to create the mastercontainer. You simply need to change the last line `nextcloud/all-in-one:latest` to `nextcloud/all-in-one:beta` and vice versa.
### How to update the containers?
If we push new containers to `latest`, you will see in the AIO interface below the `containers` section that new container updates were found. In this case, just press `Stop containers` and `Start and update containers` in order to update the containers. The mastercontainer has its own update procedure though. See below. And don't forget to back up the current state of your instance using the built-in backup solution before starting the containers again! Otherwise you won't be able to restore your instance easily if something should break during the update.
@@ -654,15 +315,14 @@ If a new `mastercontainer` update was found, you'll see a note below the `Stop c
Additionally, there is a cronjob that runs once a day that checks for container and mastercontainer updates and sends a notification to all Nextcloud admins if a new update was found.
-### How to easily log in to the AIO interface?
-If your Nextcloud is running and you are logged in as admin in your Nextcloud, you can easily log in to the AIO interface by opening `https://yourdomain.tld/settings/admin/overview` which will show a button on top that enables you to log in to the AIO interface by just clicking on this button.
+#### How often are update notifications sent?
+AIO ships its own update notifications implementation. It checks if container updates are available. If so, it sends a notification with the title `Container updates available!` on saturdays to Nextcloud users that are part of the `admin` group. If the Nextcloud container image should be older than 90 days (~3 months) and thus badly outdated, AIO sends a notification to all Nextcloud users with the title `AIO is outdated!`. Thus admins should make sure to update the container images at least once every 3 months in order to make sure that the instance gets all security bugfixes as soon as possible.
-> [!Note]
-> You can change the domain/ip-address/port of the button by simply stopping the containers, visiting the AIO interface from the correct and desired domain/ip-address/port and clicking once on `Start containers`.
+### How to easily log in to the AIO interface?
+If your Nextcloud is running and you are logged in as admin in your Nextcloud, you can easily log in to the AIO interface by opening `https://yourdomain.tld/settings/admin/overview` which will show a button on top that enables you to log in to the AIO interface by just clicking on this button. **Note:** You can change the domain/ip-address/port of the button by simply stopping the containers, visiting the AIO interface from the correct and desired domain/ip-address/port and clicking once on `Start containers`.
### How to change the domain?
-> [!NOTE]
-> Editing the configuration.json manually and making a mistake may break your instance so please create a backup first!
+**⚠️ Please note:** Editing the configuration.json manually and making a mistake may break your instance so please create a backup first!
If you set up a new AIO instance, you need to enter a domain. Currently there is no way to change this domain afterwards from the AIO interface. So in order to change it, you need to edit the configuration.json manually using `sudo docker run -it --rm --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config:rw alpine sh -c "apk add --no-cache nano && nano /mnt/docker-aio-config/data/configuration.json"`, substitute each occurrence of your old domain with your new domain and save and write out the file. Afterwards restart your containers from the AIO interface and everything should work as expected if the new domain is correctly configured.
If you are running AIO behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else), you need to obviously also change the domain in your reverse proxy config.
@@ -675,8 +335,7 @@ Additionally, after restarting the containers, you need to open the admin settin
### How to properly reset the instance?
If something goes unexpected routes during the initial installation, you might want to reset the AIO installation to be able to start from scratch.
-> [!NOTE]
-> If you already have it running and have data on your instance, you should not follow these instructions as it will delete all data that is coupled to your AIO instance.
+**Please note**: if you already have it running and have data on your instance, you should not follow these instructions as it will delete all data that is coupled to your AIO instance.
Here is how to reset the AIO instance properly:
1. Stop all containers if they are running from the AIO interface
@@ -689,136 +348,24 @@ Here is how to reset the AIO instance properly:
1. Check which volumes are dangling with `sudo docker volume ls --filter "dangling=true"`
1. Now remove all these dangling volumes: `sudo docker volume prune --filter all=1` (on Windows you might need to remove some volumes afterwards manually with `docker volume rm nextcloud_aio_backupdir`, `docker volume rm nextcloud_aio_nextcloud_datadir`).
1. If you've configured `NEXTCLOUD_DATADIR` to a path on your host instead of the default volume, you need to clean that up as well. (E.g. by simply deleting the directory).
-1. Make sure that no volumes are remaining with `sudo docker volume ls --format {{.Name}}`. If no `nextcloud-aio` volumes are listed, you can proceed with the steps below. If there should be some, you will need to remove them with `sudo docker volume rm ` until no one is listed anymore.
+1. Make sure that no volumes are remaining with `sudo docker volume ls --format {{.Name}}`. If no `nextcloud-aio` volumes are listed, you can proceed with the steps below. If there should be some, you will need to stop them with `sudo docker volume rm ` until no one is listed anymore.
1. Optional: You can remove all docker images with `sudo docker image prune -a`.
1. And you are done! Now feel free to start over with the recommended docker run command!
-### Can I use a CIFS/SMB share as Nextcloud's datadir?
-Sure. Add this to the `/etc/fstab` file on the host system:
-` cifs rw,mfsymlinks,seal,credentials=,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0`
-(Of course you need to modify ``, `` and `` for your specific case.)
-
-One example could look like this:
-`//your-storage-host/subpath /mnt/storagebox cifs rw,mfsymlinks,seal,credentials=/etc/storage-credentials,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0`
-and add into `/etc/storage-credentials`:
-```
-username=
-password=
-```
-(Of course you need to modify `` and `` for your specific case.)
-
-Now you can use `/mnt/storagebox` as Nextcloud's datadir like described in the section above this one.
-
-### Can I run this with Docker swarm?
-Yes. For that to work, you need to use and follow the [manual-install documentation](./manual-install/).
-
-### Can I run this with Kubernetes?
-Yes. For that to work, you need to use and follow the [helm-chart documentation](./nextcloud-aio-helm-chart/).
-
-### How to run this with Docker rootless?
-You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md)
-
-### Can I run this with Podman instead of Docker?
-Since Podman is not 100% compatible with the Docker API, Podman is not supported (since that would add yet another platform where the maintainer would need to test on). However you can use and follow the [manual-install documentation](./manual-install/) to get AIO's containers running with Podman or use Docker rootless, as described in the above section. Also there is this now: https://github.com/nextcloud/all-in-one/discussions/3487
-
-### Access/Edit Nextcloud files/folders manually
-The files and folders that you add to Nextcloud are by default stored in the following docker directory: `nextcloud_aio_nextcloud:/mnt/ncdata/` (usually `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/` on linux host systems). If needed, you can modify/add/delete files/folders there but **ATTENTION**: be very careful when doing so because you might corrupt your AIO installation! Best is to create a backup using the built-in backup solution before editing/changing files/folders in there because you will then be able to restore your instance to the backed up state.
-
-After you are done modifying/adding/deleting files/folders, don't forget to apply the correct permissions by running: `sudo docker exec nextcloud-aio-nextcloud chown -R 33:0 /mnt/ncdata/` and `sudo docker exec nextcloud-aio-nextcloud chmod -R 750 /mnt/ncdata/` and rescan the files with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all`. **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
-
-### How to edit Nextclouds config.php file with a texteditor?
-You can edit Nextclouds config.php file directly from the host with your favorite text editor. E.g. like this: `sudo docker run -it --rm --volume nextcloud_aio_nextcloud:/var/www/html:rw alpine sh -c "apk add --no-cache nano && nano /var/www/html/config/config.php"`. Make sure to not break the file though which might corrupt your Nextcloud instance otherwise. In best case, create a backup using the built-in backup solution before editing the file. **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
-
-### How to change default files by creating a custom skeleton directory?
-All users see a set of [default files and folders](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/default_files_configuration.html) as dictated by Nextcloud's configuration. To change these default files and folders a custom skeleton directory must first be created; this can be accomplished by copying your skeleton files `sudo docker cp --follow-link /path/to/nextcloud/skeleton/ nextcloud-aio-nextcloud:/mnt/ncdata/skeleton/`, applying the correct permissions with `sudo docker exec nextcloud-aio-nextcloud chown -R 33:0 /mnt/ncdata/skeleton/` and `sudo docker exec nextcloud-aio-nextcloud chmod -R 750 /mnt/ncdata/skeleton/` and setting the skeleton directory option with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set skeletondirectory --value="/mnt/ncdata/skeleton"`. Further information is available in the Nextcloud documentation on [configuration parameters for the skeleton directory](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html#skeletondirectory).
-
-### How to adjust the version retention policy and trashbin retention policy?
-By default, AIO sets the `versions_retention_obligation` and `trashbin_retention_obligation` both to `auto, 30` which means that versions and items in the trashbin get deleted after 30 days. If you want to change this, see https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/file_versioning.html.
-
-### How to enable automatic updates without creating a backup beforehand?
-If you have an external backup solution, you might want to enable automatic updates without creating a backup first. However note that doing this is disrecommended since you will not be able to easily create and restore a backup from the AIO interface anymore and you need to make sure to shut down all the containers properly before creating the backup, e.g. by stopping them from the AIO interface first.
-
-But anyhow, is here a guide that helps you automate the whole procedure:
-
-
-Click here to expand
-
-```bash
-#!/bin/bash
-
-# Stop the containers
-docker exec --env STOP_CONTAINERS=1 nextcloud-aio-mastercontainer /daily-backup.sh
-
-# Below is optional if you run AIO in a VM which will shut down the VM afterwards
-# poweroff
-
-```
-
-
-
-You can simply copy and paste the script into a file e.g. named `shutdown-script.sh` e.g. here: `/root/shutdown-script.sh`.
-
-Afterwards apply the correct permissions with `sudo chown root:root /root/shutdown-script.sh` and `sudo chmod 700 /root/shutdown-script.sh`. Then you can create a cronjob that runs it on a schedule e.g. runs the script at `04:00` each day like this:
-1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano).
-1. Add the following new line to the crontab if not already present: `0 4 * * * /root/shutdown-script.sh` which will run the script at 04:00 each day.
-1. save and close the crontab (when using nano the shortcuts for this are `Ctrl + o` and then `Enter` to save, and close the editor with `Ctrl + x`).
-
-
-**After that is in place, you should schedule a backup from your backup solution that creates a backup after AIO is shut down properly. Hint: If your backup runs on the same host, make sure to at least back up all docker volumes and additionally Nextcloud's datadir if it is not stored in a docker volume.**
-
-**Afterwards, you can create a second script that automatically updates the containers:**
-
-
-Click here to expand
-
-```bash
-#!/bin/bash
-
-# Run container update once
-if ! docker exec --env AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh; then
- while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do
- echo "Waiting for watchtower to stop"
- sleep 30
- done
-
- while ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-mastercontainer$"; do
- echo "Waiting for Mastercontainer to start"
- sleep 30
- done
-
- # Run container update another time to make sure that all containers are updated correctly.
- docker exec --env AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh
-fi
-
-```
-
-
-
-You can simply copy and paste the script into a file e.g. named `automatic-updates.sh` e.g. here: `/root/automatic-updates.sh`.
-
-Afterwards apply the correct permissions with `sudo chown root:root /root/automatic-updates.sh` and `sudo chmod 700 /root/automatic-updates.sh`. Then you can create a cronjob that runs e.g. at `05:00` each day like this:
-1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano).
-1. Add the following new line to the crontab if not already present: `0 5 * * * /root/automatic-updates.sh` which will run the script at 05:00 each day.
-1. save and close the crontab (when using nano the shortcuts for this are `Ctrl + o` then `Enter` to save, and close the editor with `Ctrl + x`).
-
-### Securing the AIO interface from unauthorized ACME challenges
-[By design](https://github.com/nextcloud/all-in-one/discussions/4882#discussioncomment-9858384), Caddy that runs inside the mastercontainer, which handles automatic TLS certificate generation for the AIO interface on port 8443, is configured to accept traffic on any valid domain in order to make the AIO interface as convenient to use as possible. However due to this, it is vulnerable to receiving DNS challenges for arbitrary hostnames from anyone on the internet. While this does not compromise your server's security, it can result in cluttered logs and rejected certificate renewal attempts due to rate limit abuse. To mitigate this issue, it is recommended to place the AIO interface behind a VPN and/or limit its public exposure.
-
-### How to migrate from an already existing Nextcloud installation to Nextcloud AIO?
-Please see the following documentation on this: [migration.md](https://github.com/nextcloud/all-in-one/blob/main/migration.md)
-
-## Backup
-Nextcloud AIO provides a backup solution based on [BorgBackup](https://github.com/borgbackup/borg#what-is-borgbackup). These backups act as a restore point in case the installation gets corrupted. By using this tool, backups are incremental, differential, compressed and encrypted – so only the first backup will take a while. Further backups should be fast as only changes are taken into account.
+### Backup solution
+Nextcloud AIO provides a local backup solution based on [BorgBackup](https://github.com/borgbackup/borg#what-is-borgbackup). These backups act as a local restore point in case the installation gets corrupted. By using this tool, backups are incremental, differential, compressed and encrypted – so only the first backup will take a while. Further backups should be fast as only changes are taken into account.
It is recommended to create a backup before any container update. By doing this, you will be safe regarding any possible complication during updates because you will be able to restore the whole instance with basically one click.
-For local backups, the restore process should be pretty fast as rsync is used to restore the chosen backup which only transfers changed files and deletes additional ones. For remote borg backups, the whole backup archive is extracted from the remote, which depending on how clever `borg extract` is, may require downloading the whole archive.
+The restore process should be pretty fast as rsync is used to restore the chosen backup which only transfers changed files and deletes additional ones.
If you connect an external drive to your host, and choose the backup directory to be on that drive, you are also kind of safe against drive failures of the drive where the docker volumes are stored on.
How to do the above step for step
+
+
1. Mount an external/backup HDD to the host OS using the built-in functionality or udev rules or whatever way you prefer. (E.g. follow this video: https://www.youtube.com/watch?v=2lSyX4D3v_s) and mount the drive in best case in `/mnt/backup`.
2. If not already done, fire up the docker container and set up Nextcloud as per the guide.
3. Now open the AIO interface.
@@ -827,19 +374,6 @@ If you connect an external drive to your host, and choose the backup directory t
-If you want to back up directly to a remote borg repository:
-
-
-How to do the above step for step
-
-1. Create your borg repository at the remote. Note down the repository URL for later.
-2. Open the AIO interface
-3. Under backup section, leave the local path blank and fill in the url to your borg repository that you noted down earlier.
-4. Click on `Create backup`, this will create an ssh key pair and fail because the remote doesn't trust this key yet. Copy the public key shown in AIO and add it to your authorized keys on the remote.
-5. Try again to create a backup, this time it should succeed.
-
-
-
Backups can be created and restored in the AIO interface using the buttons `Create Backup` and `Restore selected backup`. Additionally, a backup check is provided that checks the integrity of your backups but it shouldn't be needed in most situations.
The backups themselves get encrypted with an encryption key that gets shown to you in the AIO interface. Please save that at a safe place as you will not be able to restore from backup without this key.
@@ -850,55 +384,29 @@ Be aware that this solution does not back up files and folders that are mounted
---
-### What is getting backed up by AIO's backup solution?
-Backed up will get all important data of your Nextcloud AIO instance required to restore the instance, like the database, your files and configuration files of the mastercontainer and else. Files and folders that are mounted into Nextcloud using the external storage app are not getting backed up. There is currently no way to exclude the data directory because it would require hacks like running files:scan and would make the backup solution much more unreliable (since the database and your files/folders need to stay in sync). If you still don't want your datadirectory to be backed up, see https://github.com/nextcloud/all-in-one#how-to-enable-automatic-updates-without-creating-a-backup-beforehand for options (there is a hint what needs to be backed up in which order).
+#### What is getting backed up by AIO's backup solution?
+Backed up will get all important data of your Nextcloud AIO instance like the database, your files and configuration files of the mastercontainer and else. Files and folders that are mounted into Nextcloud using the external storage app are not getting backed up. There is currently no way to exclude the data directory because it would require hacks like running files:scan and would make the backup solution much more unreliable (since the database and your files/folders need to stay in sync). If you still don't want your datadirectory to be backed up, see https://github.com/nextcloud/all-in-one#how-to-enable-automatic-updates-without-creating-a-backup-beforehand for options (there is a hint what needs to be backed up in which order).
-### How to adjust borgs retention policy?
-The built-in borg-based backup solution has by default a retention policy of `--keep-within=7d --keep-weekly=4 --keep-monthly=6`. See https://borgbackup.readthedocs.io/en/stable/usage/prune.html for what these values mean. You can adjust the retention policy by providing `--env BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. ⚠️ Please make sure that this value is valid, otherwise backup pruning will bug out!
+#### How to adjust borgs retention policy?
+The built-in borg-based backup solution has by default a retention policy of `--keep-within=7d --keep-weekly=4 --keep-monthly=6`. See https://borgbackup.readthedocs.io/en/stable/usage/prune.html for what these values mean. You can adjust the retention policy by providing `--env BORG_RETENTION_POLICY="--keep-within=7d --keep-weekly=4 --keep-monthly=6"` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. ⚠️ Please make sure that this value is valid, otherwise backup pruning will bug out!
-### How to migrate from AIO to AIO?
-If you have the borg backup feature enabled, you can copy it over to the new host and restore from the backup. This guide assumes the new installation data dir will be on `/mnt/datadir`, you can adjust the steps if it's elsewhere.
-
-1. Set the DNS entry to 60 seconds TTL if applicable
-1. On your current installation, use the AIO interface to:
- 1. Update AIO and all containers
- 1. Stop all containers (from now on, your cloud is down)
- 1. Create a current borg backup
- 1. Note the path where the backups are stored and the encryption password
-1. Navigate to the backup folder
-1. Create archive of the backup so it's easier to copy: `tar -czvf borg.tar.gz borg`
-1. Copy the archive over to the new host: `scp borg.tar.gz user@new.host:/mnt`. Make sure to replace `user` with your actual user and `new.host` with the IP or domain of the actual host. You can also use another way to copy the archive.
-1. Switch to the new host
-1. Go to the folder you put the backup archive and extract it with `tar -xf borg.tar.gz`
-1. Follow the installation guide to create a new aio instance, but do not start the containers yet (the `docker run` or `docker compose up -d` command)
-1. Change the DNS entry to the new host's IP
-1. Configure your reverse proxy if you use one
-1. Start the AIO container and open the new AIO interface in your browser
-1. Make sure to save the newly generated passphrase and enter it in the next step
-1. Select the "Restore former AIO instance from backup" option and enter the encryption password from the old backup and the path in which the extracted `borg` folder lies in (without the borg part) and hit `Submit location and password`
-1. Choose the latest backup in the dropdown and hit `Restore selected backup`
-1. Wait until the backup is restored
-1. Start the containers in the AIO interface
-
-### Are remote borg backups supported?
-Backing up directly to a remote borg repository is supported. This avoids having to store a local copy of your backups, supports append-only borg keys to counter ransomware and allows using the AIO interface to manage your backups.
-
-Some alternatives, which do not have all the above benefits:
+#### Are remote borg backups supported?
+Not directly but you have multiple options to achieve this:
- Mount a network FS like SSHFS, SMB or NFS in the directory that you enter in AIO as backup directory
-- Use rsync or rclone for syncing the borg backup archive that AIO creates locally to a remote target (make sure to lock the backup archive correctly before starting the sync; search for "aio-lockfile"; you can find a local example script here: https://github.com/nextcloud/all-in-one#sync-local-backups-regularly-to-another-drive)
+- Use rsync or rclone for syncing the borg backup archive that AIO creates locally to a remote target (make sure to lock the backup archive correctly before starting the sync; search for "aio-lockfile"; you can find a local example script here: https://github.com/nextcloud/all-in-one#sync-the-backup-regularly-to-another-drive)
- You can find a well written guide that uses rclone and e.g. BorgBase for remote backups here: https://github.com/nextcloud/all-in-one/discussions/2247
- Here is another one that utilizes borgmatic and BorgBase for remote backups: https://github.com/nextcloud/all-in-one/discussions/4391
- create your own backup solution using a script and borg, borgmatic or any other to backup tool for backing up to a remote target (make sure to stop and start the AIO containers correctly following https://github.com/nextcloud/all-in-one#how-to-enable-automatic-updates-without-creating-a-backup-beforehand)
---
-### Failure of the backup container in LXC containers
+#### Failure of the backup container in LXC containers
If you are running AIO in a LXC container, you need to make sure that FUSE is enabled in the LXC container settings. Also, if using Alpine Linux as host OS, make sure to add fuse via `apk add fuse`. Otherwise the backup container will not be able to start as FUSE is required for it to work.
---
-### How to create the backup volume on Windows?
+#### How to create the backup volume on Windows?
As stated in the AIO interface, it is possible to use a docker volume as backup target. Before you can use that, you need to create it first. Here is an example how to create one on Windows:
```
docker volume create ^
@@ -912,24 +420,15 @@ In this example, it would mount `E:\your\backup\path` into the volume so for a d
---
-### Pro-tip: Backup archives access
+#### Pro-tip: Backup archives access
You can open the BorgBackup archives on your host by following these steps:
(instructions for Ubuntu Desktop)
-
-Alternatively, there is now a community container that allows to access your backups in a web session: https://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer.
-
```bash
# Install borgbackup on the host
sudo apt update && sudo apt install borgbackup
-# In any shell where you use borg, you must first export this variable
-# If you are using the default backup location /mnt/backup/borg
-export BORG_REPO='/mnt/backup/borg'
-# or if you are using a remote repository
-export BORG_REPO='user@host:/path/to/repo'
-
-# Mount the archives to /tmp/borg
-sudo mkdir -p /tmp/borg && sudo borg mount "$BORG_REPO" /tmp/borg
+# Mount the archives to /tmp/borg (if you are using the default backup location /mnt/backup/borg)
+sudo mkdir -p /tmp/borg && sudo borg mount "/mnt/backup/borg" /tmp/borg
# After entering your repository key successfully, you should be able to access all archives in /tmp/borg
# You can now do whatever you want by syncing them to a different place using rsync or doing other things
@@ -942,44 +441,35 @@ sudo umount /tmp/borg
---
-### Delete backup archives manually
+#### Delete backup archives manually
You can delete BorgBackup archives on your host manually by following these steps:
(instructions for Debian based OS' like Ubuntu)
-
-Alternatively, there is now a community container that allows to access your backups in a web session: https://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer.
-
```bash
# Install borgbackup on the host
sudo apt update && sudo apt install borgbackup
-# In any shell where you use borg, you must first export this variable
-# If you are using the default backup location /mnt/backup/borg
-export BORG_REPO='/mnt/backup/borg'
-# or if you are using a remote repository
-export BORG_REPO='user@host:/path/to/repo'
-
# List all archives (if you are using the default backup location /mnt/backup/borg)
-sudo borg list
+sudo borg list "/mnt/backup/borg"
# After entering your repository key successfully, you should now see a list of all backup archives
# An example backup archive might be called 20220223_174237-nextcloud-aio
# Then you can simply delete the archive with:
-sudo borg delete --stats --progress "::20220223_174237-nextcloud-aio"
+sudo borg delete --stats --progress "/mnt/backup/borg::20220223_174237-nextcloud-aio"
# If borg 1.2.0 or higher is installed, you then need to run borg compact in order to clean up the freed space
sudo borg --version
# If version number of the command above is higher than 1.2.0 you need to run the command below:
-sudo borg compact
+sudo borg compact "/mnt/backup/borg"
```
After doing so, make sure to update the backup archives list in the AIO interface!
-You can do so by clicking on the `Update backup list` button in the `Update backup list` section inside the `Backup and restore` section.
+You can do so by clicking on the `Check backup integrity` button or `Create backup` button.
---
-### Sync local backups regularly to another drive
-For increased backup security, you might consider syncing the local backup repository regularly to another drive.
+#### Sync the backup regularly to another drive
+For increased backup security, you might consider syncing the backup repository regularly to another drive.
To do that, first add the drive to `/etc/fstab` so that it is able to get automatically mounted and then create a script that does all the things automatically. Here is an example for such a script:
@@ -1060,7 +550,7 @@ rm "$TARGET_DIRECTORY/aio-lockfile"
umount "$DRIVE_MOUNTPOINT"
if docker ps --format "{{.Names}}" | grep "^nextcloud-aio-nextcloud$"; then
- docker exec nextcloud-aio-nextcloud bash /notify.sh "Rsync backup successful!" "Synced the backup repository successfully."
+ docker exec -it nextcloud-aio-nextcloud bash /notify.sh "Rsync backup successful!" "Synced the backup repository successfully."
else
echo "Synced the backup repository successfully."
fi
@@ -1076,41 +566,153 @@ Afterwards apply the correct permissions with `sudo chown root:root /root/backup
1. Add the following new line to the crontab if not already present: `0 20 * * 7 /root/backup-script.sh` which will run the script at 20:00 on Sundays each week.
1. save and close the crontab (when using nano are the shortcuts for this `Ctrl + o` -> `Enter` and close the editor with `Ctrl + x`).
-### How to exclude Nextcloud's data directory or the preview folder from backup?
-In order to speed up the backups and to keep the backup archives small, you might want to exclude Nextcloud's data directory or its preview folder from backup.
-
-> [!WARNING]
-> However please note that you will run into problems if the database and the data directory or preview folder get out of sync. **So please only read further, if you have an additional external backup of the data directory!** See [this guide](#how-to-enable-automatic-updates-without-creating-a-backup-beforehand) for example.
-
-> [!TIP]
-> A better option is to use the external storage app inside Nextcloud as the data connected via the external storage app is not backed up by AIO's backup solution. See [this documentation](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage_configuration_gui.html) on how to configure the app.
-
-If you still want to proceed, you can exclude the data directory by simply creating a `.noaiobackup` file in the root directory of the specified `NEXTCLOUD_DATADIR` target. The same logic is implemented for the preview folder that is located inside the data directory, inside the `appdata_*/preview` folder. So simply create a `.noaiobackup` file in there if you want to exclude the preview folder.
-
-After doing a restore via the AIO interface, you might run into problems due to the data directory and database being out of sync. You might be able to fix this by running `occ files:scan --all` and `occ maintenance:repair` and `occ files:scan-app-data`. See https://github.com/nextcloud/all-in-one#how-to-run-occ-commands. If only the preview folder is excluded, the command `occ files:scan-app-data preview` should be used.
-
### How to stop/start/update containers or trigger the daily backup from a script externally?
-> [!WARNING]
-> The below script will only work after the initial setup of AIO. So you will always need to first visit the AIO interface, type in your domain and start the containers the first time or restore an older AIO instance from its borg backup before you can use the script.
+⚠️⚠️⚠️ **Warning**: The below script will only work after the initial setup of AIO. So you will always need to first visit the AIO interface, type in your domain and start the containers the first time or restore an older AIO instance from its borg backup before you can use the script.
-You can do so by running the `/daily-backup.sh` script that is stored in the mastercontainer. It accepts the following environment variables:
+You can do so by running the `/daily-backup.sh` script that is stored in the mastercontainer. It accepts the following environmental varilables:
- `AUTOMATIC_UPDATES` if set to `1`, it will automatically stop the containers, update them and start them including the mastercontainer. If the mastercontainer gets updated, this script's execution will stop as soon as the mastercontainer gets stopped. You can then wait until it is started again and run the script with this flag again in order to update all containers correctly afterwards.
- `DAILY_BACKUP` if set to `1`, it will automatically stop the containers and create a backup. If you want to start them again afterwards, you may have a look at the `START_CONTAINERS` option.
-- `STOP_CONTAINERS` if set to `1`, it will automatically stop the containers at the start of the script. Implied by `DAILY_BACKUP=1`.
-- `START_CONTAINERS` if set to `1`, it will automatically start the containers at the end of the script, without updating them. Implied by `AUTOMATIC_UPDATES=1`.
-- `CHECK_BACKUP` if set to `1`, it will start the integrity check of all borg backups made by AIO. Note that the backup check is non blocking so containers can be kept running while the check lasts. That means you can't pass `DAILY_BACKUP=1` at the same time. The output of the check can be found in the logs of the container `nextcloud-aio-borgbackup`.
+- `START_CONTAINERS` if set to `1`, it will automatically start the containers without updating them.
+- `STOP_CONTAINERS` if set to `1`, it will automatically stop the containers.
+- `CHECK_BACKUP` if set to `1`, it will start the backup check. This is not allowed to be enabled at the same time like `DAILY_BACKUP`. Please be aware that this option is non-blocking which means that the backup check is not done when the process is finished since it only start the borgbackup container with the correct configuration.
-One example to do a backup would be `sudo docker exec -it --env DAILY_BACKUP=1 nextcloud-aio-mastercontainer /daily-backup.sh`, which you can run via a cronjob or put it in a script.
+One example for this would be `sudo docker exec -it --env DAILY_BACKUP=1 nextcloud-aio-mastercontainer /daily-backup.sh`, which you can run via a cronjob or put it in a script.
-Likewise to do a backup check would be `sudo docker exec --env DAILY_BACKUP=0 --env CHECK_BACKUP=1 --env STOP_CONTAINERS=0 nextcloud-aio-mastercontainer /daily-backup.sh`.
-
-> [!NOTE]
-> None of the option returns error codes. So you need to check for the correct result yourself.
+⚠️ Please note that none of the option returns error codes. So you need to check for the correct result yourself.
### How to disable the backup section?
-If you already have a backup solution in place, you may want to hide the backup section. You can do so by adding `--env AIO_DISABLE_BACKUP_SECTION=true` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used).
+If you already have a backup solution in place, you may want to hide the backup section. You can do so by adding `--env AIO_DISABLE_BACKUP_SECTION=true` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used).
-## Addons
+### How to change the default location of Nextcloud's Datadir?
+⚠️⚠️⚠️ **Warning:** Do not set or adjust this value after the initial Nextcloud installation is done! If you still want to do it afterwards, see [this](https://github.com/nextcloud/all-in-one/discussions/890#discussioncomment-3089903) on how to do it.
+
+You can configure the Nextcloud container to use a specific directory on your host as data directory. You can do so by adding the environmental variable `NEXTCLOUD_DATADIR` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). Allowed values for that variable are strings that start with `/` and are not equal to `/`. The chosen directory or volume will then be mounted to `/mnt/ncdata` inside the container.
+
+- An example for Linux is `--env NEXTCLOUD_DATADIR="/mnt/ncdata"`. ⚠️ Please note: If you should be using an external BTRFS drive that is mounted to `/mnt/ncdata`, make sure to choose a subfolder like e.g. `/mnt/ncdata/nextcloud` as datadir, since the root folder is not suited as datadir in that case. See https://github.com/nextcloud/all-in-one/discussions/2696.
+- On macOS it might be `--env NEXTCLOUD_DATADIR="/var/nextcloud-data"`
+- For Synology it may be `--env NEXTCLOUD_DATADIR="/volume1/docker/nextcloud/data"`.
+- On Windows it might be `--env NEXTCLOUD_DATADIR="/run/desktop/mnt/host/c/ncdata"`. (This path is equivalent to `C:\ncdata` on your Windows host so you need to translate the path accordingly. Hint: the path that you enter needs to start with `/run/desktop/mnt/host/`. Append to that the exact location on your windows host, e.g. `c/ncdata` which is equivalent to `C:\ncdata`.) ⚠️ **Please note**: This does not work with external drives like USB or network drives and only with internal drives like SATA or NVME drives.
+- Another option is to provide a specific volume name here with: `--env NEXTCLOUD_DATADIR="nextcloud_aio_nextcloud_datadir"`. This volume needs to be created beforehand manually by you in order to be able to use it. e.g. on Windows with:
+ ```
+ docker volume create ^
+ --driver local ^
+ --name nextcloud_aio_nextcloud_datadir ^
+ -o device="/host_mnt/e/your/data/path" ^
+ -o type="none" ^
+ -o o="bind"
+ ```
+ In this example, it would mount `E:\your\data\path` into the volume so for a different location you need to adjust `/host_mnt/e/your/data/path` accordingly.
+
+### Can I use a CIFS/SMB share as Nextcloud's datadir?
+
+Sure. Add this to the `/etc/fstab` file:
+` cifs rw,mfsymlinks,seal,credentials=,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0`
+(Of course you need to modify ``, `` and `` for your specific case.)
+
+One example could look like this:
+`//your-storage-host/subpath /mnt/storagebox cifs rw,mfsymlinks,seal,credentials=/etc/storage-credentials,uid=33,gid=0,file_mode=0770,dir_mode=0770 0 0`
+and add into `/etc/storage-credentials`:
+```
+username=
+password=
+```
+(Of course you need to modify `` and `` for your specific case.)
+
+Now you can use `/mnt/storagebox` as Nextcloud's datadir like described in the section above above this one.
+
+### How to allow the Nextcloud container to access directories on the host?
+By default, the Nextcloud container is confined and cannot access directories on the host OS. You might want to change this when you are planning to use local external storage in Nextcloud to store some files outside the data directory and can do so by adding the environmental variable `NEXTCLOUD_MOUNT` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). Allowed values for that variable are strings that start with `/` and are not equal to `/`.
+
+- Two examples for Linux are `--env NEXTCLOUD_MOUNT="/mnt/"` and `--env NEXTCLOUD_MOUNT="/media/"`.
+- On macOS it might be `--env NEXTCLOUD_MOUNT="/Volumes/your_drive/"`
+- For Synology it may be `--env NEXTCLOUD_MOUNT="/volume1/"`.
+- On Windows it might be `--env NEXTCLOUD_MOUNT="/run/desktop/mnt/host/d/your-folder/"`. (This path is equivalent to `D:\your-folder` on your Windows host so you need to translate the path accordingly. Hint: the path that you enter needs to start with `/run/desktop/mnt/host/`. Append to that the exact location on your windows host, e.g. `d/your-folder/` which is equivalent to `D:\your-folder`.) ⚠️ **Please note**: This does not work with external drives like USB or network drives and only with internal drives like SATA or NVME drives.
+
+After using this option, please make sure to apply the correct permissions to the directories that you want to use in Nextcloud. E.g. `sudo chown -R 33:0 /mnt/your-drive-mountpoint` and `sudo chmod -R 750 /mnt/your-drive-mountpoint` should make it work on Linux when you have used `--env NEXTCLOUD_MOUNT="/mnt/"`. On Windows you could do this e.g. with `docker exec -it nextcloud-aio-nextcloud chown -R 33:0 /run/desktop/mnt/host/d/your-folder/` and `docker exec -it nextcloud-aio-nextcloud chmod -R 750 /run/desktop/mnt/host/d/your-folder/`.
+
+You can then navigate to `https://your-nc-domain.com/settings/apps/disabled`, activate the external storage app, navigate to `https://your-nc-domain.com/settings/admin/externalstorages` and add a local external storage directory that will be accessible inside the container at the same place that you've entered. E.g. `/mnt/your-drive-mountpoint` will be mounted to `/mnt/your-drive-mountpoint` inside the container, etc.
+
+Be aware though that these locations will not be covered by the built-in backup solution - but you can add further Docker volumes and host paths that you want to back up after the initial backup is done.
+
+**Please note:** If you can't see the type "local storage" in the external storage admin options, a restart of the containers from the AIO interface may be required.
+
+### How to adjust the Talk port?
+By default will the talk container use port `3478/UDP` and `3478/TCP` for connections. You can adjust the port by adding e.g. `--env TALK_PORT=3478` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and adjusting the port to your desired value. Best is to use a port over 1024, so e.g. 3479 to not run into this: https://github.com/nextcloud/all-in-one/discussions/2517
+
+### How to adjust the upload limit for Nextcloud?
+By default, public uploads to Nextcloud are limited to a max of 10G (logged in users can upload much bigger files using the webinterface or the mobile/desktop clients, since chunking is used in that case). You can adjust the upload limit by providing `--env NEXTCLOUD_UPLOAD_LIMIT=10G` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must start with a number and end with `G` e.g. `10G`.
+
+### How to adjust the max execution time for Nextcloud?
+By default, uploads to Nextcloud are limited to a max of 3600s. You can adjust the upload time limit by providing `--env NEXTCLOUD_MAX_TIME=3600` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a number e.g. `3600`.
+
+### How to adjust the PHP memory limit for Nextcloud?
+By default, each PHP process in the Nextcloud container is limited to a max of 512 MB. You can adjust the memory limit by providing `--env NEXTCLOUD_MEMORY_LIMIT=512M` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must start with a number and end with `M` e.g. `1024M`.
+
+### What can I do to fix the internal or reserved ip-address error?
+If you get an error during the domain validation which states that your ip-address is an internal or reserved ip-address, you can fix this by first making sure that your domain indeed has the correct public ip-address that points to the server and then adding `--add-host yourdomain.com:` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) which will allow the domain validation to work correctly. And so that you know: even if the `A` record of your domain should change over time, this is no problem since the mastercontainer will not make any attempt to access the chosen domain after the initial domain validation.
+
+### Can I run this with Docker swarm?
+Yes. For that to work, you need to use and follow the [manual-install documentation](./manual-install/).
+
+### Can I run this with Kubernetes?
+Yes. For that to work, you need to use and follow the [helm-chart documentation](./nextcloud-aio-helm-chart/).
+
+### How to run this with Docker rootless?
+You can run AIO also with docker rootless. How to do this is documented here: [docker-rootless.md](https://github.com/nextcloud/all-in-one/blob/main/docker-rootless.md)
+
+### Can I run this with Podman instead of Docker?
+Since Podman is not 100% compatible with the Docker API, Podman is not supported (since that would add yet another platform where the maintainer would need to test on). However you can use and follow the [manual-install documentation](./manual-install/) to get AIO's containers running with Podman or use Docker rootless, as described in the above section. Also there is this now: https://github.com/nextcloud/all-in-one/discussions/3487
+
+### How to change the Nextcloud apps that are installed on the first startup?
+You might want to adjust the Nextcloud apps that are installed upon the first startup of the Nextcloud container. You can do so by adding `--env NEXTCLOUD_STARTUP_APPS="deck twofactor_totp tasks calendar contacts notes"` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a string with small letters a-z, 0-9, spaces and hyphens or '_'. You can disable shipped and by default enabled apps by adding a hyphen in front of the appid. E.g. `-contactsinteraction`.
+
+### How to add OS packages permanently to the Nextcloud container?
+Some Nextcloud apps require additional external dependencies that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project quickly unmaintainable - there is an official way in which you can add additional dependencies into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require external dependencies.
+
+You can do so by adding `--env NEXTCLOUD_ADDITIONAL_APKS="imagemagick dependency2 dependency3"` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available packages here: https://pkgs.alpinelinux.org/packages?branch=v3.20. By default `imagemagick` is added. If you want to keep it, you need to specify it as well.
+
+### How to add PHP extensions permanently to the Nextcloud container?
+Some Nextcloud apps require additional php extensions that must be bundled within Nextcloud container in order to work correctly. As we cannot put each and every dependency for all apps into the container - as this would make the project quickly unmaintainable - there is an official way in which you can add additional php extensions into the Nextcloud container. However note that doing this is disrecommended since we do not test Nextcloud apps that require additional php extensions.
+
+You can do so by adding `--env NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS="imagick extension1 extension2"` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must be a string with small letters a-z, digits 0-9, spaces, dots and hyphens or '_'. You can find available extensions here: https://pecl.php.net/packages.php. By default `imagick` is added. If you want to keep it, you need to specify it as well.
+
+### What about the pdlib PHP extension for the facerecognition app?
+The [facerecognition app](https://apps.nextcloud.com/apps/facerecognition) requires the pdlib PHP extension to be installed. Unfortunately, it is not available on PECL nor via PHP core, so there is no way to add this into AIO currently. However you can use [this community container](https://github.com/nextcloud/all-in-one/tree/main/community-containers/facerecognition) in order to run facerecognition.
+
+### How to enable hardware-transcoding for Nextcloud?
+⚠️⚠️⚠️ Warning: this only works if the `/dev/dri` device is present on the host! If it does not exists on your host, don't proceed as otherwise the Nextcloud container will fail to start! If you are unsure about this, better do not proceed with the instructions below.
+
+The [memories app](https://apps.nextcloud.com/apps/memories) allows to enable hardware transcoding for videos. In order to use that, you need to add `--env NEXTCLOUD_ENABLE_DRI_DEVICE=true` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) which will mount the `/dev/dri` device into the container. There is now a community container which allows to easily add the transcoding container of Memories to AIO: https://github.com/nextcloud/all-in-one/tree/main/community-containers/memories
+
+### How to keep disabled apps?
+In certain situations you might want to keep Nextcloud apps that are disabled in the AIO interface and not uninstall them if they should be installed in Nextcloud. You can do so by adding `--env NEXTCLOUD_KEEP_DISABLED_APPS=true` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). ⚠️⚠️⚠️ **Warning** doing this might cause unintended problems in Nextcloud if an app that requires an external dependency is still installed but the external dependency not for example.
+
+### Huge docker logs
+If you should run into issues with huge docker logs, you can adjust the log size by following https://docs.docker.com/config/containers/logging/local/#usage. However for the included AIO containers, this should usually not be needed because almost all of them have the log level set to warn so they should not produce many logs.
+
+### Access/Edit Nextcloud files/folders manually
+The files and folders that you add to Nextcloud are by default stored in the following docker directory: `nextcloud_aio_nextcloud:/mnt/ncdata/` (usually `/var/lib/docker/volumes/nextcloud_aio_nextcloud_data/_data/` on linux host systems). If needed, you can modify/add/delete files/folders there but **ATTENTION**: be very careful when doing so because you might corrupt your AIO installation! Best is to create a backup using the built-in backup solution before editing/changing files/folders in there because you will then be able to restore your instance to the backed up state.
+
+After you are done modifying/adding/deleting files/folders, don't forget to apply the correct permissions by running: `sudo docker exec nextcloud-aio-nextcloud chown -R 33:0 /mnt/ncdata/` and `sudo docker exec nextcloud-aio-nextcloud chmod -R 750 /mnt/ncdata/` and rescan the files with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all`.
+
+### How to store the files/installation on a separate drive?
+You can move the whole docker library and all its files including all Nextcloud AIO files and folders to a separate drive by first mounting the drive in the host OS (NTFS is not supported and ext4 is recommended as FS) and then following this tutorial: https://www.guguweb.com/2019/02/07/how-to-move-docker-data-directory-to-another-location-on-ubuntu/
+(Of course docker needs to be installed first for this to work.)
+
+⚠️ If you encounter errors from richdocuments in your Nextcloud logs, check in your Collabora container if the message "Capabilities are not set for the coolforkit program." appears. If so, follow these steps:
+
+1. Stop all the containers from the AIO Interface.
+2. Go to your terminal and delete the Collabora container (`docker rm nextcloud-aio-collabora`) AND the Collabora image (`docker image rm nextcloud/aio-collabora`).
+3. You might also want to prune your Docker (`docker system prune`) (no data will be lost).
+4. Restart your containers from the AIO Interface.
+
+This should solve the problem.
+
+### How to edit Nextclouds config.php file with a texteditor?
+You can edit Nextclouds config.php file directly from the host with your favorite text editor. E.g. like this: `sudo docker run -it --rm --volume nextcloud_aio_nextcloud:/var/www/html:rw alpine sh -c "apk add --no-cache nano && nano /var/www/html/config/config.php"`. Make sure to not break the file though which might corrupt your Nextcloud instance otherwise. In best case, create a backup using the built-in backup solution before editing the file.
+
+### How to change default files by creating a custom skeleton directory?
+All users see a set of [default files and folders](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/default_files_configuration.html) as dictated by Nextcloud's configuration. To change these default files and folders a custom skeleton directory must first be created; this can be accomplished by copying your skeleton files `sudo docker cp --follow-link /path/to/nextcloud/skeleton/ nextcloud-aio-nextcloud:/mnt/ncdata/skeleton/`, applying the correct permissions with `sudo docker exec nextcloud-aio-nextcloud chown -R 33:0 /mnt/ncdata/skeleton/` and `sudo docker exec nextcloud-aio-nextcloud chmod -R 750 /mnt/ncdata/skeleton/` and setting the skeleton directory option with `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set skeletondirectory --value="/mnt/ncdata/skeleton"`. Further information is available in the Nextcloud documentation on [configuration parameters for the skeleton directory](https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/config_sample_php_parameters.html#skeletondirectory).
### Fail2ban
You can configure your server to block certain ip-addresses using fail2ban as bruteforce protection. Here is how to set it up: https://docs.nextcloud.com/server/stable/admin_manual/installation/harden_server.html#setup-fail2ban. The logpath of AIO is by default `/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/data/nextcloud.log`. Do not forget to add `chain=DOCKER-USER` to your nextcloud jail config (`nextcloud.local`) otherwise the nextcloud service running on docker will still be accessible even if the IP is banned. Also, you may change the blocked ports to cover all AIO ports: by default `80,443,8080,8443,3478` (see [this](https://github.com/nextcloud/all-in-one#explanation-of-used-ports)). Apart from that there is now a community container that can be added to the AIO stack: https://github.com/nextcloud/all-in-one/tree/main/community-containers/fail2ban
@@ -1125,12 +727,13 @@ Netdata allows you to monitor your server using a GUI. You can install it by fol
If you want to use the user_sql app, the easiest way is to create an additional database container and add it to the docker network `nextcloud-aio`. Then the Nextcloud container should be able to talk to the database container using its name.
### phpMyAdmin, Adminer or pgAdmin
-It is possible to install any of these to get a GUI for your AIO database. The pgAdmin container is recommended. You can get some docs on it here: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html. For the container to connect to the aio-database, you need to connect the container to the docker network `nextcloud-aio` and use `nextcloud-aio-database` as database host, `oc_nextcloud` as database username and the password that you get when running `sudo docker exec nextcloud-aio-nextcloud grep dbpassword config/config.php` as the password. Apart from that there is now a way for the community to add containers: https://github.com/nextcloud/all-in-one/discussions/3061#discussioncomment-7307045 **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
+It is possible to install any of these to get a GUI for your AIO database. The pgAdmin container is recommended. You can get some docs on it here: https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html. For the container to connect to the aio-database, you need to connect the container to the docker network `nextcloud-aio` and use `nextcloud-aio-database` as database host, `oc_nextcloud` as database username and the password that you get when running `sudo docker exec nextcloud-aio-nextcloud grep dbpassword config/config.php` as the password. Apart from that there is now a way for the community to add containers: https://github.com/nextcloud/all-in-one/discussions/3061#discussioncomment-7307045
### Mail server
You can configure one yourself by using either of these four recommended projects: [Docker Mailserver](https://github.com/docker-mailserver/docker-mailserver/#docker-mailserver), [Mailu](https://github.com/Mailu/Mailu), [Maddy Mail Server](https://github.com/foxcpp/maddy#maddy-mail-server), [Mailcow](https://github.com/mailcow/mailcow-dockerized#mailcow-dockerized-------) or [Stalwart](https://stalw.art/). There is now a community container which allows to easily add Stalwart Mail server to AIO: https://github.com/nextcloud/all-in-one/tree/main/community-containers/stalwart
-## Miscellaneous
+### How to migrate from an already existing Nextcloud installation to Nextcloud AIO?
+Please see the following documentation on this: [migration.md](https://github.com/nextcloud/all-in-one/blob/main/migration.md)
### Requirements for integrating new containers
For integrating new containers, they must pass specific requirements for being considered to get integrated in AIO itself. Even if not considered, we may add some documentation on it. Also there is this now: https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers
@@ -1145,19 +748,83 @@ What are the requirements?
7. No additional setup should be needed after adding the container - it should work completely out of the box.
8. If the container requires being exposed, only subfolders are supported. So the container should not require its own (sub-)domain and must be able to run in a subfolder.
-### Update policy
-This project values stability over new features. That means that when a new major Nextcloud update gets introduced, we will wait at least until the first patch release, e.g. `24.0.1` is out before upgrading to it. Also we will wait with the upgrade until all important apps are compatible with the new major version. Minor or patch releases for Nextcloud and all dependencies as well as all containers will be updated to new versions as soon as possible but we try to give all updates first a good test round before pushing them. That means that it can take around 2 weeks before new updates reach the `latest` channel. If you want to help testing, you can switch to the `beta` channel by following [this documentation](#how-to-switch-the-channel) which will also give you the updates earlier.
+### How to trust user-defined Certification Authorities (CA)?
+For some applications it might be necessary to establish a secure connection to another host/server which is using a certificate issued by a Certification Authority that is not trusted out of the box. An example could be configuring LDAPS against a domain controller (Active Directory or Samba-based) of an organization.
-### How often are update notifications sent?
-AIO ships its own update notifications implementation. It checks if container updates are available. If so, it sends a notification with the title `Container updates available!` on saturdays to Nextcloud users that are part of the `admin` group. If the Nextcloud container image should be older than 90 days (~3 months) and thus badly outdated, AIO sends a notification to all Nextcloud users with the title `AIO is outdated!`. Thus admins should make sure to update the container images at least once every 3 months in order to make sure that the instance gets all security bugfixes as soon as possible.
+You can make the Nextcloud container trust any Certification Authority by providing the environmental variable `NEXTCLOUD_TRUSTED_CACERTS_DIR` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used). The value of the variables should be set to the absolute paths of the directory on the host, which contains one or more Certification Authorities certificates. You should use X.509 certificates, Base64 encoded. (Other formats may work but have not been tested!) All the certificates in the directory will be trusted.
-### Huge docker logs
-If you should run into issues with huge docker logs, you can adjust the log size by following https://docs.docker.com/config/containers/logging/local/#usage. However for the included AIO containers, this should usually not be needed because almost all of them have the log level set to warn so they should not produce many logs.
+When using `docker run`, the environmental variable can be set with `--env NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`.
+
+In order for the value to be valid, the path should start with `/` and not end with `/` and point to an existing **directory**. Pointing the variable directly to a certificate **file** will not work and may also break things.
+
+### How to disable Collabora's Seccomp feature?
+The Collabora container enables Seccomp by default, which is a security feature of the Linux kernel. On systems without this kernel feature enabled, you need to provide `--env COLLABORA_SECCOMP_DISABLED=true` to the initial docker run command in order to make it work.
+
+### How to enable automatic updates without creating a backup beforehand?
+If you have an external backup solution, you might want to enable automatic updates without creating a backup first. However note that doing this is disrecommended since you will not be able to easily create and restore a backup from the AIO interface anymore and you need to make sure to shut down all the containers properly before creating the backup, e.g. by stopping them from the AIO interface first.
+
+But anyhow, is here a guide that helps you automate the whole procedure:
+Click here to expand
-Badges
+```bash
+#!/bin/bash
-[](https://deepwiki.com/nextcloud/all-in-one)
+# Stop the containers
+docker exec --env STOP_CONTAINERS=1 nextcloud-aio-mastercontainer /daily-backup.sh
+
+# Below is optional if you run AIO in a VM which will shut down the VM afterwards
+# poweroff
+
+```
+
+You can simply copy and paste the script into a file e.g. named `shutdown-script.sh` e.g. here: `/root/shutdown-script.sh`.
+
+Afterwards apply the correct permissions with `sudo chown root:root /root/shutdown-script.sh` and `sudo chmod 700 /root/shutdown-script.sh`. Then you can create a cronjob that runs it on a schedule e.g. runs the script at `04:00` each day like this:
+1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano).
+1. Add the following new line to the crontab if not already present: `0 4 * * * /root/shutdown-script.sh` which will run the script at 04:00 each day.
+1. save and close the crontab (when using nano the shortcuts for this are `Ctrl + o` and then `Enter` to save, and close the editor with `Ctrl + x`).
+
+
+**After that is in place, you should schedule a backup from your backup solution that creates a backup after AIO is shut down properly. Hint: If your backup runs on the same host, make sure to at least back up all docker volumes and additionally Nextcloud's datadir if it is not stored in a docker volume.**
+
+**Afterwards, you can create a second script that automatically updates the containers:**
+
+
+Click here to expand
+
+```bash
+#!/bin/bash
+
+# Run container update once
+if ! docker exec --env AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh; then
+ while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do
+ echo "Waiting for watchtower to stop"
+ sleep 30
+ done
+
+ while ! docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-mastercontainer$"; do
+ echo "Waiting for Mastercontainer to start"
+ sleep 30
+ done
+
+ # Run container update another time to make sure that all containers are updated correctly.
+ docker exec --env AUTOMATIC_UPDATES=1 nextcloud-aio-mastercontainer /daily-backup.sh
+fi
+
+```
+
+
+
+You can simply copy and paste the script into a file e.g. named `automatic-updates.sh` e.g. here: `/root/automatic-updates.sh`.
+
+Afterwards apply the correct permissions with `sudo chown root:root /root/automatic-updates.sh` and `sudo chmod 700 /root/automatic-updates.sh`. Then you can create a cronjob that runs e.g. at `05:00` each day like this:
+1. Open the cronjob with `sudo crontab -u root -e` (and choose your editor of choice if not already done. I'd recommend nano).
+1. Add the following new line to the crontab if not already present: `0 5 * * * /root/automatic-updates.sh` which will run the script at 05:00 each day.
+1. save and close the crontab (when using nano the shortcuts for this are `Ctrl + o` then `Enter` to save, and close the editor with `Ctrl + x`).
+
+### Securing the AIO interface from unauthorized ACME challenges
+[By design](https://github.com/nextcloud/all-in-one/discussions/4882#discussioncomment-9858384), Caddy that runs inside the mastercontainer, which handles automatic TLS certificate generation for the AIO interface, is vulnerable to receiving DNS challenges for arbitrary hostnames from anyone on the internet. While this does not compromise your server's security, it can result in cluttered logs and rejected certificate renewal attempts due to rate limit abuse. To mitigate this issue, it is recommended to place the AIO interface behind a VPN and/or limit its public exposure.
diff --git a/reverse-proxy.md b/reverse-proxy.md
index bdeb3244..1ea7b179 100644
--- a/reverse-proxy.md
+++ b/reverse-proxy.md
@@ -1,156 +1,26 @@
-# Using a reverse proxy or secure tunnel to access Nextcloud AIO
+# Reverse Proxy Documentation
-## Introduction
+**Note:** The maintainers of AIO noticed that this documentation could be improved to make it easier to follow. All contributions that improve this are very welcome!
-This guide explains how to connect to Nextcloud AIO securely via HTTPS (TLS) using a reverse proxy or a secure tunneling platform. It covers several potential scenarios:
+A [reverse proxy](https://en.wikipedia.org/wiki/Reverse_proxy) is basically a web server that enables computers on the internet to access a service in a [private subnet](https://en.wikipedia.org/wiki/Private_network).
-- **Integrated**: AIO's built-in reverse proxy with automatic HTTPS
-- **External**: An external reverse proxy (such as Caddy or Nginx or Cloudflare Proxy)
-- **Secure tunnel**: Tunneling services for private network access or public access without port forwarding (such as Tailscale Serve or Cloudflare Tunnel)
+**Please note:** Publishing the AIO interface with a valid certificate to the public internet is **not** the goal of this documentation! Instead, the main goal is to publish Nextcloud with a valid certificate to the public internet which is **not** running inside the mastercontainer but in a different container! If you need a valid certificate for the AIO interface, see [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface).
-## Choosing Your Approach
+In order to run Nextcloud behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else), you need to specify the port that AIO's Apache container shall use, add a specific config to your web server or reverse proxy and modify the startup command a bit. All examples below will use port `11000` as example `APACHE_PORT` which will be exposed on the host to receive unencrypted HTTP traffic from the reverse proxy. **Advice:** If you need https between Nextcloud and the reverse proxy because it is running on a different server in the same network, simply add another reverse proxy to the chain that runs on the same server like AIO and takes care of https proxying (most likely via self-signed cert). Another option is to create a VPN between the server that runs AIO and the server that runs the reverse proxy which takes care of encrypting the connection.
-> [!TIP]
-> If AIO's internal reverse proxy meets your needs, you may not need to set up your own reverse proxy. See the next section to assess whether this is the case.
+**Attention:** The process to run Nextcloud behind a reverse proxy consists of at least steps 1, 2 and 4:
+1. **Configure the reverse proxy! See [point 1](#1-configure-the-reverse-proxy)**
+1. **Use this startup command! See [point 2](#2-use-this-startup-command)**
+1. Optional: If the reverse proxy is installed on the same host and in the host network, you should limit the apache container to only listen on localhost. See [point 3](#3-limit-the-access-to-the-apache-container)
+1. **Open the AIO interface. See [point 4](#4-open-the-aio-interface)**
+1. Optional: Get a valid certificate for the AIO interface! See [point 5](#5-optional-get-a-valid-certificate-for-the-aio-interface)
+1. Optional: How to debug things? See [point 6](#6-how-to-debug-things)
-> [!NOTE]
-> If your goal is to use AIO purely locally, refer to the [Local instance documentation](https://github.com/nextcloud/all-in-one/blob/main/local-instance.md). Local instance setups don't require domain validation.
+**Please note:** Since the Apache container gets created by the mastercontainer, there is **NO** way to provide custom docker labels or custom environmental variables for the Apache container. So please do not attempt to do this because you will fail! Only the documented way will work!
-### When to use each approach
-
-| Approach | Best for | Requirements | Inbound Ports Required |
-|----------|----------|--------------|---------------|
-| **Integrated** | Simple setups, single service on port 443 | Public IP, dedicated port 443 | Yes (443) |
-| **External Reverse Proxy** (including Cloudflare Proxy) | Multiple services, existing web server, or users wanting DDoS protection | Existing reverse proxy, willingness to set one up, or Cloudflare account | Yes (443) |
-| **Cloudflare Tunnel** | No port forwarding possible/desired, public access | Cloudflare account | No |
-| **Tailscale Serve** | Private access (tailnet only) | Tailscale account | No |
-| **Tailscale Funnel** | Public access via Tailscale | Tailscale account | No |
-
-## Implementation Details
-
-### Integrated: Using AIO's internal reverse proxy with built-in HTTPS support
-
-Nextcloud AIO is secured with TLS (HTTPS) out of the box via its internal reverse proxy. The integrated HTTPS support works well if your goal is to make AIO accessible from the public Internet and to ensure all traffic is encrypted with HTTPS.
-
-Requirements:
-- A public IP address that is reachable from the Internet (it does **not** need to be static, but it must not be behind carrier-grade NAT, which some ISPs use to share IP addresses among multiple customers).
-- Port `443/tcp` on that IP must be available for AIO's exclusive use, and it must be opened/forwarded on your internet-facing firewall/router to the AIO host.[^talkPort]
-
-**If AIO's integrated HTTPS support and internal reverse proxy meet your requirements, you do not need to proceed further. Follow the [standard Nextcloud AIO instructions](https://github.com/nextcloud/all-in-one#how-to-use-this).**
-
-### External: Using AIO with an external reverse proxy (e.g., *Caddy, Nginx, Cloudflare Proxy*)
-
-**When you use an external reverse proxy, you disable AIO's built-in HTTPS support** because your reverse proxy will handle HTTPS/TLS certificates and encryption instead. This approach is necessary when:
-- Port 443 is already in use by another service
-- You want to run multiple web services on the same IP address
-- You already have an existing reverse proxy infrastructure
-
-A reverse proxy (or a web server acting as a reverse proxy) enables multiple web applications to share the same IP address and/or port (for example `443/tcp`) by directing traffic based on each application's hostname (often called "virtual hosts"). Incoming requests reach the reverse proxy and are then forwarded to the appropriate internal IP address, port, or container based on the requested hostname.
-
-**Types of external reverse proxies:**
-- **Self-hosted** (Caddy, Nginx, Apache, Traefik, HAProxy, etc.) - You manage the reverse proxy on your own server or separate server
-- **Cloudflare Proxy** (orange-clouded DNS) - Cloudflare provides the reverse proxy at their edge network with DDoS protection and CDN benefits. This is distinct from Cloudflare Tunnel, though Tunnel can optionally use these proxy features when publishing routes.
-
-Most notably, an external reverse proxy allows you to:
-- share one external IP address among multiple hostnames/web applications, and
-- use a different internal port than the externally used port.
-
-Using an existing external reverse proxy is required in particular if port `443/tcp` on your public IP is already in use by another web application or by an existing web server/reverse proxy (for example Caddy or Nginx).
-
-> [!NOTE]
-> Cloudflare **Tunnel** and Cloudflare **Proxy** are different approaches:
-> - **Cloudflare Tunnel** doesn't require opening any inbound ports on your firewall.
-> - **Cloudflare Proxy** still requires port 443 exposed on your server.
-
-> [!TIP]
-> Examples of web servers or reverse proxies you might already be running include Apache, Caddy, Nginx, Traefik, and HAProxy — but only if they are bound to port `443/tcp` on the IP address you plan to associate with AIO.
-
-> [!NOTE]
-> An external reverse proxy can also facilitate other routing approaches, but Nextcloud AIO only supports having its own dedicated hostname (e.g., `cloud.example.com`). You cannot run it in a subfolder like `example.com/nextcloud/`.[^shared]
-
-### Secure tunnel: Using AIO with a secure tunneling service (*Tailscale, Cloudflare*)
-
-Cloudflare and Tailscale offer secure tunneling services that let you access your Nextcloud without opening ports on your firewall.
-
-#### Private network access
-
-For Nextcloud AIO, you can use:
-- **Cloudflare Tunnel (`cloudflared`)** - Secure outbound-only tunnels that don't require exposing ports
-- **Tailscale Serve** - Expose services privately on your Tailscale network (tailnet only)
-
-Both options provide private network access to your Nextcloud AIO instance.
-
-#### Public Internet access (without port forwarding)
-
-To make your Nextcloud AIO instance accessible from the public Internet (not just your private network), you can use:
-- **Cloudflare Tunnel** with public routes enabled (which combines Cloudflare Tunnel with Cloudflare's proxy features)
-- **Tailscale Funnel** - Expose services to the public Internet via Tailscale's infrastructure
-
-**Comparison of Cloudflare and Tailscale options:**
-
-| Feature | Access Scope | Inbound Ports Required | Use Case |
-|---------|--------------|----------------|----------|
-| **Cloudflare Tunnel** | Public Internet | None | Public access without port forwarding |
-| **Tailscale Serve** | Your Tailscale network only | None | Private access for you and invited users |
-| **Tailscale Funnel** | Public Internet | None | Public access through Tailscale |
-
-> [!TIP]
-> Because of how [Cloudflare's Tunnel/Proxy operate](https://github.com/nextcloud/all-in-one/tree/main#notes-on-cloudflare-proxytunnel), we recommend using Tailscale with Nextcloud when possible. Tailscale typically offers better performance and fewer trade-offs/limitations for Nextcloud.
->
-> **For private/personal use**: [Tailscale Serve](https://tailscale.com/kb/1312/serve) is ideal - it keeps your Nextcloud completely private to your tailnet.
->
-> **For public access without port forwarding**: Use [Tailscale Funnel](https://tailscale.com/kb/1223/funnel).
-
-## Configuration and Deployment
-
-> [!NOTE]
-> These instructions assume you already have a domain name pointing to your server's public IP address. If you don't have a domain yet, see the recommendations below.
-
-### Quick overview
-
-To run Nextcloud AIO behind an external reverse proxy or secure tunneling/proxying service (instead of using AIO's integrated reverse proxy), the basic process is:
-
-1. Configure your web server or reverse proxy with the specific settings for AIO.
-2. Specify the port that AIO's integrated Apache container will use.
-3. Open the AIO interface and validate your domain.
-
-The sections below provide detailed instructions for each step.
-
-> [!TIP]
-> If you don't have a domain yet, we recommend using [an approach using Tailscale](https://github.com/nextcloud/all-in-one/discussions/6817). If you don't have an external reverse proxy yet, we recommend [Caddy](https://github.com/nextcloud/all-in-one/discussions/575).
-
-### Step-by-Step Instructions
-
-The process to run Nextcloud AIO behind a reverse proxy has three required steps and three optional steps:
-
-**Required steps:**
-1. **Configure** your web server or reverse proxy with the specific settings for AIO. See ["Configuring your reverse proxy"](#1-configure-the-reverse-proxy) below.
-2. **Specify** the port that AIO's integrated Apache container will use via the environment variable `APACHE_PORT`, and update the `docker run` command or your Compose file accordingly. See ["Use this startup command"](#2-use-this-startup-command) below.
- - *Optional*: Limit the access to the Apache container. See ["Limit the access to the Apache container"](#3-limit-the-access-to-the-apache-container).
-3. **Open** the AIO interface at port `8080`, enter your domain, and validate it. See ["Open the AIO interface"](#4-open-the-aio-interface) below.
-
-**Optional steps:**
-
-4. Configure additional settings if your reverse proxy uses an IP address to connect to AIO. See ["Configure AIO for IP-based reverse proxies"](#5-optional-configure-aio-for-reverse-proxies-that-connect-to-nextcloud-using-an-ip-address-and-not-localhost-nor-127001).
-5. Get a valid certificate for the AIO interface. See ["Get a valid certificate for the AIO interface"](#6-optional-get-a-valid-certificate-for-the-aio-interface).
-6. Debug things if needed. See ["How to debug things"](#7-how-to-debug-things).
-
-> [!NOTE]
-> If you run into troubles, see [the debug section](#7-how-to-debug-things).
-
-> [!IMPORTANT]
-> If you need HTTPS between Nextcloud and the reverse proxy (because the reverse proxy runs on a different server), you have two options:
->
-> 1. **Add a local reverse proxy**: Install another reverse proxy on the same server as AIO to handle HTTPS (typically with self-signed certificates)
-> 2. **Use a VPN**: Create a VPN tunnel between the AIO server and the reverse proxy server to encrypt the connection
-
-> [!NOTE]
-> Since the Apache container gets created by the mastercontainer, there is **NO** way to provide custom Docker labels or custom environmental variables for the Apache container. So please do not attempt to do this because it will fail!
-
-### 1. Configure the reverse proxy
-
-#### Adapting the sample web server configurations below
+## 1. Configure the reverse proxy
+### Adapting the sample web server configurations below
1. Replace `` with the domain on which you want to run Nextcloud.
1. Adjust the port `11000` to match your chosen `APACHE_PORT`.
1. Adjust `localhost` or `127.0.0.1` to point to the Nextcloud server IP or domain depending on where the reverse proxy is running. See the following options.
@@ -167,10 +37,9 @@ The process to run Nextcloud AIO behind a reverse proxy has three required steps
On the same server in a Docker container
- The reverse-proxy container needs to be connected to the nextcloud containers. This can be achieved one of these 3 ways:
- 1. Utilize host networking instead of docker bridge networking: Specify `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. With this setup, the default sample configurations with reverse-proxy pointing to `localhost:$APACHE_PORT` should work directly.
- 1. Connect nextcloud's external-facing containers to the reverse-proxy's docker network by specifying env variable APACHE_ADDITIONAL_NETWORK. With this setup, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT`. ⚠️⚠️⚠️ Note, the specified network must already exist before Nextcloud AIO is started. Otherwise it will fail to start the container because the network is not existing.
- 1. Connect the reverse-proxy container to the `nextcloud-aio` network by specifying it as a secondary (external) network for the reverse proxy container. With this setup also, the reverse proxy can utilize Docker bridge network's DNS name resolution to access nextcloud at `http://nextcloud-aio-apache:$APACHE_PORT` .
+ For this setup, you can use as target `host.docker.internal:$APACHE_PORT` instead of `localhost:$APACHE_PORT`. **⚠️ Important:** In order to make this work on Docker for Linux, you need to add `--add-host=host.docker.internal:host-gateway` to the docker run command of your reverse proxy container or `extra_hosts: ["host.docker.internal:host-gateway"]` in docker compose (it works on Docker Desktop by default).
+
+ Another option and actually the recommended way in this case is to use `--network host` option (or `network_mode: host` for docker-compose) as setting for the reverse proxy container to connect it to the host network. If you are using a firewall on the server, you need to open ports 80 and 443 for the reverse proxy manually. By doing so, the default sample configurations that point at `localhost:$APACHE_PORT` should work without having to modify them.
@@ -184,7 +53,7 @@ The process to run Nextcloud AIO behind a reverse proxy has three required steps
-##### Apache
+### Apache
@@ -216,14 +85,13 @@ Add this as a new Apache site config:
RequestHeader set X-Real-IP %{REMOTE_ADDR}s
AllowEncodedSlashes NoDecode
- # Adjust the two lines below to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
ProxyPass / http://localhost:11000/ nocanon
ProxyPassReverse / http://localhost:11000/
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteCond %{THE_REQUEST} "^[a-zA-Z]+ /(.*) HTTP/\d+(\.\d+)?$"
- RewriteRule .? "ws://localhost:11000/%1" [P,L,UnsafeAllow3F] # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ RewriteRule .? "ws://localhost:11000/%1" [P,L,UnsafeAllow3F]
# Enable h2, h2c and http1.1
Protocols h2 h2c http/1.1
@@ -264,30 +132,28 @@ To make the config work you can run the following command:
-##### Caddy (recommended)
+### Caddy (Recommended)
click here to expand
-**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/575#discussion-4055615) for a more complete but possibly outdated example.
-
Add this to your Caddyfile:
```
https://:443 {
- reverse_proxy localhost:11000 # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ reverse_proxy localhost:11000
}
```
The Caddyfile is a text file called `Caddyfile` (no extension) which – if you should be running Caddy inside a container – should usually be created in the same location as your `compose.yaml` file prior to starting the container.
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
**Advice:** You may have a look at [this](https://github.com/nextcloud/all-in-one/discussions/575#discussion-4055615) for a more complete example.
-##### Caddy with ACME DNS-challenge
+### Caddy with ACME DNS-challenge
@@ -299,7 +165,7 @@ You can get AIO running using the ACME DNS-challenge. Here is how to do it.
1. Add this to your Caddyfile:
```
https://:443 {
- reverse_proxy localhost:11000 # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ reverse_proxy localhost:11000
tls {
dns
}
@@ -309,23 +175,13 @@ You can get AIO running using the ACME DNS-challenge. Here is how to do it.
You also need to adjust `` and `` to match your case.
-1. Now continue with [point 2](#2-use-this-startup-command) but additionally, add `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer (but before the last line `ghcr.io/nextcloud-releases/all-in-one:latest`) which will disable the domain validation (because it is known that the domain validation will not work when using the DNS-challenge since no port is publicly opened).
+1. Now continue with [point 2](#2-use-this-startup-command) but additionally, add `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`) which will disable the domain validation (because it is known that the domain validation will not work when using the DNS-challenge since no port is publicly opened).
**Advice:** In order to make it work in your home network, you may add the internal ipv4-address of your reverse proxy as A DNS-record to your domain and disable the dns-rebind-protection in your router. Another way it to set up a local dns-server like a pi-hole and set up a custom dns-record for that domain that points to the internal ip-adddress of your reverse proxy (see https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally). If both is not possible, you may add the domain to the hosts file which is needed then for any devices that shall use the server.
-##### OpenLiteSpeed
-
-
-
-click here to expand
-
-You can find the OpenLiteSpeed reverse proxy guide by @MorrowShore here: https://github.com/nextcloud/all-in-one/discussions/6370
-
-
-
-##### Citrix ADC VPX / Citrix Netscaler
+### Citrix ADC VPX / Citrix Netscaler
@@ -335,26 +191,23 @@ For a reverse proxy example guide for Citrix ADC VPX / Citrix Netscaler, see thi
-##### Cloudflare Tunnel
+### Cloudflare Tunnel
click here to expand
-
-**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/2845#discussioncomment-6423237) for a more complete but possibly outdated example.
-
Although it does not seem like it is the case but from AIO perspective a Cloudflare Tunnel works like a reverse proxy. Please see the [caveats](https://github.com/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel) before proceeding. Here is then how to make it work:
1. Install the Cloudflare Tunnel on the same machine where AIO will be running on and point the Tunnel with the domain that you want to use for AIO to `http://localhost:11000`.
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
-1. Now continue with [point 2](#2-use-this-startup-command) but add `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command - which will disable the domain validation (because it is known that the domain validation will not work behind a Cloudflare Tunnel).
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+1. Now continue with [point 2](#2-use-this-startup-command) but additionally, add `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command which will disable the domain validation (because it is known that the domain validation will not work behind a Cloudflare Tunnel). So you need to ensure yourself that you've configured everything correctly.
-**Advice:** Make sure to [disable Cloudflare's Rocket Loader feature](https://help.nextcloud.com/t/login-page-not-working-solved/149417/8) as otherwise Nextcloud's login prompt will not be shown.
+**Advice:** Make sure to [disable Cloudflares Rocket Loader feature](https://help.nextcloud.com/t/login-page-not-working-solved/149417/8) as otherwise Nextcloud's login prompt will not be shown.
-##### HAProxy
+### HaProxy
@@ -444,26 +297,24 @@ backend acme_challenge_backend
backend Nextcloud
mode http
balance source
- server Nextcloud localhost:11000 # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ server Nextcloud localhost:11000
```
⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
-##### Nginx, Freenginx, Openresty, Angie
+### Nginx, Freenginx, Openresty
click here to expand
-**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-2811152) for a more complete but possibly outdated example.
+**Disclaimer:** This config was tested and should normally work on all modern nginx version if you configure it correctly. Improvements to the config are very welcome!
-**Disclaimer:** This config was tested and should normally work on all modern Nginx versions. Improvements to the config are very welcome!
+Add the below template to your nginx config.
-Add the below template to your Nginx config.
-
-**Note:** please check your Nginx version by running: `nginx -v` and adjust the lines marked with version notes to fit your version.
+**Note:** please check your nginx version by running: `nginx -v` and adjust it the lines marked with version notes, so that they fit your nginx version.
```
map $http_upgrade $connection_upgrade {
@@ -478,45 +329,36 @@ server {
if ($scheme = "http") {
return 301 https://$host$request_uri;
}
- if ($http_x_forwarded_proto = "http") {
- return 301 https://$host$request_uri;
- }
listen 443 ssl http2; # for nginx versions below v1.25.1
listen [::]:443 ssl http2; # for nginx versions below v1.25.1 - comment to disable IPv6
# listen 443 ssl; # for nginx v1.25.1+
# listen [::]:443 ssl; # for nginx v1.25.1+ - keep comment to disable IPv6
- # http2 on; # uncomment to enable HTTP/2 - supported on nginx v1.25.1+
-
+
+ # http2 on; # uncomment to enable HTTP/2 - supported on nginx v1.25.1+
+ # http3 on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
+ # quic_retry on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
+ # add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
# listen 443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport
# listen [::]:443 quic reuseport; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - keep comment to disable IPv6
- # http3 on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
- # quic_gso on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
- # quic_retry on; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
- # quic_bpf on; # improves HTTP/3 / QUIC - supported on nginx v1.25.0+, if nginx runs as a docker container you need to give it privileged permission to use this option
- # add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
-
- proxy_buffering off;
- proxy_request_buffering off;
-
- client_max_body_size 0;
- client_body_buffer_size 512k;
- # http3_stream_buffer_size 512k; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
- proxy_read_timeout 86400s;
server_name ;
location / {
- proxy_pass http://127.0.0.1:11000$request_uri; # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ proxy_pass http://127.0.0.1:11000$request_uri;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header Accept-Encoding "";
proxy_set_header Host $host;
- proxy_set_header Early-Data $ssl_early_data;
+
+ client_body_buffer_size 512k;
+ proxy_read_timeout 86400s;
+ client_max_body_size 0;
# Websocket
proxy_http_version 1.1;
@@ -530,63 +372,41 @@ server {
ssl_certificate /etc/letsencrypt/live//fullchain.pem; # managed by certbot on host machine
ssl_certificate_key /etc/letsencrypt/live//privkey.pem; # managed by certbot on host machine
- ssl_dhparam /etc/dhparam; # curl -L https://ssl-config.mozilla.org/ffdhe2048.txt -o /etc/dhparam
-
- ssl_early_data on;
ssl_session_timeout 1d;
- ssl_session_cache shared:SSL:10m;
+ ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
+ ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
- ssl_ecdh_curve x25519:x448:secp521r1:secp384r1:secp256r1;
-
+ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers on;
- ssl_conf_command Options PrioritizeChaCha;
- ssl_ciphers TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256;
+
+ # Optional settings:
+
+ # OCSP stapling
+ # ssl_stapling on;
+ # ssl_stapling_verify on;
+ # ssl_trusted_certificate /etc/letsencrypt/live//chain.pem;
+
+ # replace with the IP address of your resolver
+ # resolver 127.0.0.1; # needed for oscp stapling: e.g. use 94.140.15.15 for adguard / 1.1.1.1 for cloudflared or 8.8.8.8 for google - you can use the same nameserver as listed in your /etc/resolv.conf file
}
```
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+
+**Advice:** You may have a look at [this](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-2811152) for a more complete example.
-##### NPMplus (Fork of Nginx-Proxy-Manager - NPM)
+### Nginx-Proxy-Manager
click here to expand
-⚠️ **Please note:** This is not needed when running NPMplus as a community container.
-
-First, make sure the environmental variables `PUID` and `PGID` in the `compose.yaml` file for NPM are either unset or set to `0`.
-If you need to change the GID/PID then please add `net.ipv4.ip_unprivileged_port_start=0` at the end of `/etc/sysctl.conf`.
-Note: this will cause that a non root user can bind privileged ports.
-
-Second, see these screenshots for a working config:
-
-
-
-
-
-
-
-
-
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
-
-
-
-##### Nginx-Proxy-Manager - NPM
-
-
-
-click here to expand
-
-**Hint:** You may have a look at [this guide](https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-3040493) for a more complete but possibly oudated example.
-
-First, make sure the environmental variables `PUID` and `PGID` in the `compose.yaml` file for NPM are either unset or set to `0`.
-If you need to change the GID/PID then please add `net.ipv4.ip_unprivileged_port_start=0` at the end of `/etc/sysctl.conf`.
-Note: this will cause that a non root user can bind privileged ports.
+First, please make sure that the environmental variables `PUID` and `PGID` in the compose.yaml file for NPM are either unset or set to `0`.
+If you need to change the GID/PID then please add `net.ipv4.ip_unprivileged_port_start=0` at the end of `/etc/sysctl.conf`. Note: this will cause that non root users can bind privileged ports.
Second, see these screenshots for a working config:
@@ -604,34 +424,34 @@ proxy_read_timeout 86400s;
client_max_body_size 0;
```
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+
Also change `@` to a mail address of yours.
-##### Nginx-Proxy
+### Nginx-Proxy
click here to expand
-This section refers to the dedicated project named `nginx-proxy`. See its [GitHub repo](https://github.com/nginx-proxy/nginx-proxy). If you should be looking for Nginx, see the `Nginx, Freenginx, Openresty, Angie` section in this docu.
-
-Unfortunately, it is not possible to configure `nginx-proxy` in a way that works because it completely relies on environmental variables of the docker containers itself. Providing these variables does not work as stated above.
+Unfortunately it is not possible to configure nginx-proxy in a way that works because it completely relies on environmental variables of the docker containers itself. Providing these variables does not work as stated above.
If you really want to use AIO, we recommend you to switch to caddy. It is simply amazing!
+Of course understandable if that is not possible for you.
-Apart from that, there is a [manual-install](https://github.com/nextcloud/all-in-one/tree/main/manual-install).
+Apart from that, there is this: [manual-install](https://github.com/nextcloud/all-in-one/tree/main/manual-install)
-##### Node.js with Express
+### Node.js with Express
click here to expand
-**Disclaimer:** it might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
+**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
For Node.js, we will use the npm package `http-proxy`. WebSockets must be handled separately.
@@ -644,7 +464,7 @@ const http = require('http');
const app = express();
const proxy = HttpProxy.createProxyServer({
- target: 'http://localhost:11000', // Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ target: 'http://localhost:11000',
// Timeout can be changed to your liking.
timeout: 1000 * 60 * 3,
proxyTimeout: 1000 * 60 * 3,
@@ -708,17 +528,17 @@ httpServer.on('upgrade', (req, socket, head) => {
});
```
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
-##### Synology Reverse Proxy
+### Synology Reverse Proxy
click here to expand
-**Disclaimer:** it might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
+**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
See these screenshots for a working config:
@@ -726,39 +546,17 @@ See these screenshots for a working config:

-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
-##### Tailscale (Serve)
-
-
-
-Click here to expand
-
-Tailscale can be used to provide private access to your Nextcloud AIO instance without opening ports on your firewall. With **Tailscale Serve**, your Nextcloud is accessible only to devices on your Tailscale network (tailnet) via a secure HTTPS domain.
-
-For a detailed setup guide using Tailscale Serve with Nextcloud AIO, see this guide by [@Perseus333](https://github.com/Perseus333): https://github.com/nextcloud/all-in-one/discussions/6817
-
-The guide covers:
-- Setting up system-wide (non-containerized) Tailscale as a reverse proxy
-- Configuring Nextcloud AIO to work with Tailscale Serve
-- Using Tailscale's MagicDNS to provide automatic HTTPS certificates
-- Private access via your tailnet (e.g., `yourserver.tail0a12b3.ts.net`)
-
-⚠️ **Please note:** This guide covers **Tailscale Serve** for private tailnet access. If you need public Internet access, consider using **Tailscale Funnel**.
-
-
-
-##### Traefik 2
+### Traefik 2
click here to expand
-**Hint:** You may have a look at [this video](https://www.youtube.com/watch?v=VLPSRrLMDmA) for a more complete but possibly outdated example.
-
-**Disclaimer:** it might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
+**Disclaimer:** It might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
Traefik's building blocks (router, service, middlewares) need to be defined using dynamic configuration similar to [this](https://doc.traefik.io/traefik/providers/file/#configuration-examples) official Traefik configuration example. Using **docker labels _won't work_** because of the nature of the project.
@@ -772,9 +570,6 @@ The examples below define the dynamic configuration in YAML files. If you rather
entryPoints:
https:
address: ":443" # Create an entrypoint called "https" that uses port 443
- transport:
- respondingTimeouts:
- readTimeout: 24h # Allows uploads > 100MB; prevents connection reset due to chunking (public upload-only links)
# If you want to enable HTTP/3 support, uncomment the line below
# http3: {}
@@ -815,7 +610,7 @@ The examples below define the dynamic configuration in YAML files. If you rather
nextcloud:
loadBalancer:
servers:
- - url: "http://localhost:11000" # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
+ - url: "http://localhost:11000" # Use the host's IP address if Traefik runs outside the host network
middlewares:
nextcloud-secure-headers:
@@ -838,103 +633,13 @@ The examples below define the dynamic configuration in YAML files. If you rather
---
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+⚠️ **Please note:** Look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
+
+**Hint**: see https://www.youtube.com/watch?v=VLPSRrLMDmA for a video on configuring Traefik.
-##### Traefik 3
-
-
-
-click here to expand
-
-**Disclaimer:** it might be possible that the config below is not working 100% correctly, yet. Improvements to it are very welcome!
-
-Traefik's building blocks (router, service, middlewares) need to be defined using dynamic configuration similar to [this](https://doc.traefik.io/traefik/providers/file/#configuration-examples) official Traefik configuration example. Using **docker labels _won't work_** because of the nature of the project.
-
-The examples below define the dynamic configuration in YAML files. If you rather prefer TOML, use a YAML to TOML converter.
-
-1. In Traefik's static configuration define a [file provider](https://doc.traefik.io/traefik/providers/file/) for dynamic providers:
-
- ```yml
- # STATIC CONFIGURATION
-
- entryPoints:
- https:
- address: ":443" # Create an entrypoint called "https" that uses port 443
- transport:
- respondingTimeouts:
- readTimeout: 24h # Allows uploads > 100MB; prevents connection reset due to chunking (public upload-only links)
- http:
- # Required for Nextcloud to correctly handle encoded URL characters (%2F, %3F and %25 in this case) in newer Traefik versions (v3.6.4+).
- encodedCharacters:
- allowEncodedSlash: true
- allowEncodedQuestionMark: true
- allowEncodedPercent: true
- # If you want to enable HTTP/3 support, uncomment the line below
- # http3: {}
-
- certificatesResolvers:
- # Define "letsencrypt" certificate resolver
- letsencrypt:
- acme:
- storage: /letsencrypt/acme.json # Defines the path where certificates should be stored
- email: # Where LE sends notification about certificates expiring
- tlschallenge: true
-
- providers:
- file:
- directory: "/path/to/dynamic/conf" # Adjust the path according your needs.
- watch: true
- ```
-
-2. Declare the router, service and middlewares for Nextcloud in `/path/to/dynamic/conf/nextcloud.yml`:
-
- ```yml
- http:
- routers:
- nextcloud:
- rule: "Host(``)"
- entrypoints:
- - "https"
- service: nextcloud
- middlewares:
- - nextcloud-chain
- tls:
- certresolver: "letsencrypt"
-
- services:
- nextcloud:
- loadBalancer:
- servers:
- - url: "http://localhost:11000" # Adjust to match APACHE_PORT and APACHE_IP_BINDING. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#adapting-the-sample-web-server-configurations-below
-
- middlewares:
- nextcloud-secure-headers:
- headers:
- hostsProxyHeaders:
- - "X-Forwarded-Host"
- referrerPolicy: "same-origin"
-
- https-redirect:
- redirectscheme:
- scheme: https
-
- nextcloud-chain:
- chain:
- middlewares:
- # - ... (e.g. rate limiting middleware)
- - https-redirect
- - nextcloud-secure-headers
- ```
-
----
-
-⚠️ **Please note:** look into [this](#adapting-the-sample-web-server-configurations-below) to adapt the above example configuration.
-
-
-
-##### IIS with ARR and URL Rewrite
+### IIS with ARR and URL Rewrite
@@ -969,8 +674,7 @@ Add the following `web.config` file to the root of the site you created as the r
-
-
+
@@ -985,8 +689,7 @@ Add the following `web.config` file to the root of the site you created as the r
-
-
+
@@ -1004,7 +707,7 @@ Add the following `web.config` file to the root of the site you created as the r
-##### Others
+### Others
@@ -1014,11 +717,11 @@ Config examples for other reverse proxies are currently not documented. Pull req
-### 2. Use this startup command
+## 2. Use this startup command
After adjusting your reverse proxy config, use the following command to start AIO:
-(For a `compose.yaml` example, see the example further [below](#inspiration-for-a-docker-compose-file).)
+(For a docker-compose example, see the example further [below](#inspiration-for-a-docker-compose-file).)
```
# For Linux:
@@ -1030,37 +733,14 @@ sudo docker run \
--publish 8080:8080 \
--env APACHE_PORT=11000 \
--env APACHE_IP_BINDING=0.0.0.0 \
---env APACHE_ADDITIONAL_NETWORK="" \
---env SKIP_DOMAIN_VALIDATION=false \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
-ghcr.io/nextcloud-releases/all-in-one:latest
+nextcloud/all-in-one:latest
```
-
+Note: You may be interested in adjusting Nextcloud’s datadir to store the files in a different location than the default docker volume. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
-Explanation of the command
-
-- `sudo docker run` This command spins up a new docker container. Docker commands can optionally be used without `sudo` if the user is added to the docker group (this is not the same as docker rootless, see FAQ in the normal readme).
-- `--init` This option makes sure that no zombie-processes are created, ever. See [the Docker documentation](https://docs.docker.com/reference/cli/docker/container/run/#init).
-- `--sig-proxy=false` This option allows to exit the container shell that gets attached automatically when using `docker run` by using `[CTRL] + [C]` without shutting down the container.
-- `--name nextcloud-aio-mastercontainer` This is the name of the container. This line is not allowed to be changed, since mastercontainer updates would fail.
-- `--restart always` This is the "restart policy". `always` means that the container should always get started with the Docker daemon. See the Docker documentation for further detail about restart policies: https://docs.docker.com/config/containers/start-containers-automatically/
-- `--publish 8080:8080` This means that port 8080 of the container should get published on the host using port 8080. This port is used for the AIO interface and uses a self-signed certificate by default. You can also use a different host port if port 8080 is already used on your host, for example `--publish 8081:8080` (only the first port can be changed for the host, the second port is for the container and must remain at 8080).
-- `--env APACHE_PORT=11000` This is the port that is published on the host that runs Docker and Nextcloud AIO at which the reverse proxy should point at.
-- `--env APACHE_IP_BINDING=0.0.0.0` This can be modified to allow access to the published port on the host only from certain ip-addresses. [See this documentation](#3-limit-the-access-to-the-apache-container)
-- `--env APACHE_ADDITIONAL_NETWORK=""` This can be used to put the sibling apache container that is created by AIO into a specified network - useful if your reverse proxy runs as a container on the same host. [See this documentation](#adapting-the-sample-web-server-configurations-below)
-- `--env SKIP_DOMAIN_VALIDATION=false` This can be set to `true` if the domain validation does not work and you are sure that you configured everything correctly after you followed [the debug documentation](#7-how-to-debug-things). Also see [this documentation](https://github.com/nextcloud/all-in-one#how-to-skip-the-domain-validation).
-- `--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config` This means that the files that are created by the mastercontainer will be stored in a docker volume that is called `nextcloud_aio_mastercontainer`. This line is not allowed to be changed, since built-in backups would fail later on.
-- `--volume /var/run/docker.sock:/var/run/docker.sock:ro` The docker socket is mounted into the container which is used for spinning up all the other containers and for further features. It needs to be adjusted on Windows/macOS and on docker rootless. See the applicable documentation on this. If adjusting, don't forget to also set `WATCHTOWER_DOCKER_SOCKET_PATH`! If you dislike this, see https://github.com/nextcloud/all-in-one/tree/main/manual-install.
-- `ghcr.io/nextcloud-releases/all-in-one:latest` This is the docker container image that is used.
-- Further options can be set using environment variables, for example `--env NEXTCLOUD_DATADIR="/mnt/ncdata"` (This is an example for Linux. See [this](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) for other OS' and for an explanation of what this value does. This specific one needs to be specified upon the first startup if you want to change it to a specific path instead of the default Docker volume). To see explanations and examples for further variables (like changing the location of Nextcloud's datadir or mounting some locations as external storage into the Nextcloud container), read through this readme and look at the docker-compose file: https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
-
-
-
-Note: you may be interested in adjusting Nextcloud’s datadir to store the files in a different location than the default docker volume. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
-
-You should also think about limiting the Apache container to listen only on localhost in case the reverse proxy is running on the same host and in the host network, by providing an additional environmental variable to this docker run command. See [point 3](#3-limit-the-access-to-the-apache-container).
+You should also think about limiting the apache container to listen only on localhost in case the reverse proxy is running on the same host and in the host network, by providing an additional environmental variable to this docker run command. See [point 3](#3-limit-the-access-to-the-apache-container).
On macOS see https://github.com/nextcloud/all-in-one#how-to-run-aio-on-macos.
@@ -1079,11 +759,9 @@ docker run ^
--publish 8080:8080 ^
--env APACHE_PORT=11000 ^
--env APACHE_IP_BINDING=0.0.0.0 ^
---env APACHE_ADDITIONAL_NETWORK="" ^
---env SKIP_DOMAIN_VALIDATION=false ^
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
--volume //var/run/docker.sock:/var/run/docker.sock:ro ^
-ghcr.io/nextcloud-releases/all-in-one:latest
+nextcloud/all-in-one:latest
```
Also, you may be interested in adjusting Nextcloud's Datadir to store the files on the host system. See [this documentation](https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir) on how to do it.
@@ -1096,38 +774,16 @@ On Synology DSM see https://github.com/nextcloud/all-in-one#how-to-run-aio-on-sy
Simply translate the docker run command into a docker-compose file. You can have a look at [this file](https://github.com/nextcloud/all-in-one/blob/main/compose.yaml) for some inspiration but you will need to modify it either way. You can find further examples here: https://github.com/nextcloud/all-in-one/discussions/588
-### 3. Limit the access to the Apache container
+## 3. Limit the access to the apache container
Use this environment variable during the initial startup of the mastercontainer to make the apache container only listen on localhost: `--env APACHE_IP_BINDING=127.0.0.1`. **Attention:** This is only recommended to be set if you use `localhost` in your reverse proxy config to connect to your AIO instance. If you use an ip-address instead of localhost, you should set it to `0.0.0.0`.
-### 4. Open the AIO interface
-
-After starting AIO, you should be able to access the AIO Interface via `https://ip.address.of.the.host:8080` and type in and validate the domain that you have configured.
+## 4. Open the AIO interface.
+After starting AIO, you should be able to access the AIO Interface via `https://ip.address.of.the.host:8080`.
⚠️ **Important:** do always use an ip-address if you access this port and not a domain as HSTS might block access to it later! (It is also expected that this port uses a self-signed certificate due to security concerns which you need to accept in your browser)
Enter your domain in the AIO interface that you've used in the reverse proxy config and you should be done. Please do not forget to open/forward port `3478/TCP` and `3478/UDP` in your firewall/router for the Talk container!
-### 5. Optional: Configure AIO for reverse proxies that connect to nextcloud using an ip-address and not localhost nor 127.0.0.1
-If your reverse proxy connects to nextcloud using an ip-address and not localhost or 127.0.0.1* you must make the following configuration changes
-
-*: The IP address it uses to connect to AIO is not in a private IP range such as these: `127.0.0.0/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,100.64.0.0/10,fd00::/8,::1/128`
-
-#### Nextcloud trusted proxies
-Add the IP it uses connect to AIO to the Nextcloud trusted_proxies like this:
-
-```
-sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:system:set trusted_proxies 2 --value=ip.address.of.proxy
-```
-
-#### Collabora WOPI allow list
-If your reverse proxy connects to Nextcloud with an IP address that is different from the one for your domain* and you are using the Collabora server then you must also add the IP to the WOPI request allow list via `Administration Settings > Administration > Office > Allow list for WOPI requests`.
-
-*: For example, the reverse proxy has a public globally routable IP and connects to your AIO instance via Tailscale with an IP in the `100.64.0.0/10` range, or you are using a Cloudflare tunnel ([cloudflare notes](https://github.com/nextcloud/all-in-one#notes-on-cloudflare-proxytunnel): You must add all [Cloudflare IP-Ranges](https://www.cloudflare.com/ips/) to the WOPI allowlist.)
-
-#### External reverse proxies connecting via VPN (e.g. Tailscale)
-
-If your reverse proxy is outside your LAN and connecting via VPN such as Tailscale, you may want to set `APACHE_IP_BINDING=AIO.VPN.host.IP` to ensure only traffic coming from the VPN can connect.
-
-### 6. Optional: get a valid certificate for the AIO interface
+## 5. Optional: get a valid certificate for the AIO interface
If you want to also access your AIO interface publicly with a valid certificate, you can add e.g. the following config to your Caddyfile:
@@ -1144,50 +800,18 @@ https://:8443 {
Afterwards should the AIO interface be accessible via `https://ip.address.of.the.host:8443`. You can alternatively change the domain to a different subdomain by using `https://:443` instead of `https://:8443` in the Caddyfile and use that to access the AIO interface.
-### 7. How to debug things?
-
-
-
-
+## 6. How to debug things?
If something does not work, follow the steps below:
1. Make sure to exactly follow the whole reverse proxy documentation step-for-step from top to bottom!
-1. Make sure that you used the `docker run` command that is described in this reverse proxy documentation. **Hint:** make sure that you have set the `APACHE_PORT` via e.g. `--env APACHE_PORT=11000` during the docker run command!
+1. Make sure that you used the docker run command that is described in this reverse proxy documentation. **Hint:** make sure that you have set the `APACHE_PORT` via e.g. `--env APACHE_PORT=11000` during the docker run command!
1. Make sure to set the `APACHE_IP_BINDING` variable correctly. If in doubt, set it to `--env APACHE_IP_BINDING=0.0.0.0`
1. Make sure that all ports to which your reverse proxy is pointing match the chosen `APACHE_PORT`.
-1. Make sure to follow [this](#adapting-the-sample-web-server-configurations-below) to adapt the example configurations to your specific setup!
+1. Make sure to follow [this](#adapting-the-sample-web-server-configurations-below) to adapt the example configurations to your specific setup
1. Make sure that the mastercontainer is able to spawn other containers. You can do so by checking that the mastercontainer indeed has access to the Docker socket which might not be positioned in one of the suggested directories like `/var/run/docker.sock` but in a different directory, based on your OS and the way how you installed Docker. The mastercontainer logs should help figuring this out. You can have a look at them by running `sudo docker logs nextcloud-aio-mastercontainer` after the container is started the first time.
1. Check if after the mastercontainer was started, the reverse proxy if running inside a container, can reach the provided apache port. You can test this by running `nc -z localhost 11000; echo $?` from inside the reverse proxy container. If the output is `0`, everything works. Alternatively you can of course use instead of `localhost` the ip-address of the host here for the test.
-1. Make sure that you are not behind CGNAT. If that is the case, you will not be able to open ports properly. In that case you might use a Cloudflare Tunnel!
-1. If you use Cloudflare, you might need to skip the domain validation anyways since it is known that Cloudflare might block the validation attempts. In that case, see the last option below!
-1. If your reverse proxy is configured to use the host network (as recommended in the above docs) or running on the host, make sure that you've configured your firewall to open port 443 (and 80)!
-1. Check if you have a public IPv4- and public IPv6-address. If you only have a public IPv6-address (e.g. due to DS-Lite), make sure to enable IPv6 in Docker and your whole networking infrastructure (e.g. also by adding an AAAA DNS-entry to your domain)!
-1. [Enable Hairpin NAT in your router](https://github.com/nextcloud/all-in-one/discussions/5849) or [set up a local DNS server and add a custom dns-record](https://github.com/nextcloud/all-in-one#how-can-i-access-nextcloud-locally) that allows the server to reach itself locally
-1. Try to configure everything from scratch - if it still does not work by following https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance.
-1. As last resort, you may disable the domain validation by adding `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command. But only use this if you are completely sure that you've correctly configured everything! Also see [this documentation](https://github.com/nextcloud/all-in-one#how-to-skip-the-domain-validation).
-
-### 8. Removing the reverse proxy
-
-If you, at some point, want to remove the reverse proxy, here are some general steps:
-1. Stop all running containers in the AIO Interface.
-2. Stop and remove the mastercontainer.
- ```
- sudo docker stop nextcloud-aio-mastercontainer
- sudo docker rm nextcloud-aio-mastercontainer
- ```
-3. Remove the software and configuration file that you used for the reverse proxy (see section 1).
-4. Restart the mastercontainer with the [docker run command from the main readme](https://github.com/nextcloud/all-in-one#how-to-use-this) but add the two options:
- ```
- --env APACHE_IP_BINDING=0.0.0.0 \
- --env APACHE_PORT=443 \
- ```
- Do this *before* the last line of the run command!
-
- *The first command ensures that the Apache container is listening on all available network interfaces and the second command configures it to listen to port 443.*
-5. Restart all other containers in the AIO interface.
-
----
-
-## Footnotes:
-
-[^talkPort]: Ports 3478/TCP and 3478/UDP are also required if using Nextcloud Talk (but they're less likely to conflict with existing services).
-[^shared]: Other Nextcloud Server deployment methods (but not AIO) can be deployed behind shared hostnames and accessed via subfolder-based URLs. For example, this is supported with Bare Metal (Archive) and the micro-services Docker image, among others. Note that pure subfolder deployments are less and less required these days, with the broad support for virtual host based access (including at the reverse proxy level), which easily facilitates port IP address and external port sharing.
+1. Make sure that you are not behind CGNAT. If that is the case, you will not be able to open ports properly. In that case you might use a Cloudflare Tunnel.
+1. If you use Cloudflare, you might need to skip the domain validation anyways since it is known that Cloudflare might block the validation attempts. In that case, see the last option below.
+1. If your reverse proxy is configured to use the host network (as recommended in the above docs) or running on the host, make sure that you've configured your firewall to open port 443 and 80.
+1. Check if you have a public IPv4- and public IPv6-address. If you only have a public IPv6-address (e.g. due to DS-Lite), make sure to enable IPv6 in Docker and your whole networking infrastructure (e.g. also by adding an AAAA DNS-entry to your domain).
+1. Try to configure everything from scratch if it still does not work by following https://github.com/nextcloud/all-in-one#how-to-properly-reset-the-instance.
+1. As last resort, you may disable the domain validation by adding `--env SKIP_DOMAIN_VALIDATION=true` to the docker run command. But only use this if you are completely sure that you've correctly configured everything!
diff --git a/tests/QA/060-environmental-variables.md b/tests/QA/060-environmental-variables.md
index b984c0e3..488ae8e0 100644
--- a/tests/QA/060-environmental-variables.md
+++ b/tests/QA/060-environmental-variables.md
@@ -1,19 +1,16 @@
# Environmental variables
-- [ ] When starting the mastercontainer with `--env APACHE_PORT=11000` on a clean instance, the domaincheck container should be started with that same port published. That makes sure that also the Apache container will use that port later on. Using a value here that is not a port will not allow the mastercontainer to start correctly. However `@INTERNAL` is also an allowed value which skips publishing the port on the host for internal usage inside a bridged network for example.
+- [ ] When starting the mastercontainer with `--env APACHE_PORT=11000` on a clean instance, the domaincheck container should be started with that same port published. That makes sure that also the Apache container will use that port later on. Using a value here that is not a port will not allow the mastercontainer to start correctly.
- [ ] When starting the mastercontainer with `--env APACHE_IP_BINDING=127.0.0.1` on a clean instance, the domaincheck container's apache port should only listen on localhost on the host. Using a value here that is not a number or dot will not allow the mastercontainer to start correctly.
-- [ ] When starting the mastercontainer with `--env APACHE_ADDITIONAL_NETWORK=frontend_net` on a clean instance, the domaincheck and subsequently the apache containers should be connected to the specified `frontend_net` docker network, in addition to the default `nextcloud-aio` network. Specifying the network that doesn't already exist will not allow the mastercontainer to start correctly.
- [ ] When starting the mastercontainer with `--env TALK_PORT=3479` on a clean instance, the talk container should use this port later on. Using a value here that is not a port will not allow the mastercontainer to start correctly. Also it should stop if apache_port and talk_port are set to the same value.
- [ ] Make also sure that reverse proxies work by following https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#reverse-proxy-documentation and following [001-initial-setup.md](./001-initial-setup.md) and [002-new-instance.md](./002-new-instance.md)
- [ ] When starting the mastercontainer with `--env SKIP_DOMAIN_VALIDATION=true` on a clean instance, it should skip the domain verification. So it should accept any domain that you type in then.
-- [ ] When starting the mastercontainer with `--env DOCKER_API_VERSION=1.44` it should use the mentioned docker API version internally for all requests
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_DATADIR="/mnt/testdata"` it should map that location from `/mnt/testdata` to `/mnt/ncdata` inside the Nextcloud container. Not having adjusted the permissions correctly before starting the Nextcloud container the first time will not allow the Nextcloud container to start correctly. See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir for allowed values.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_MOUNT="/mnt/"` it should map `/mnt/` to `/mnt/` inside the Nextcloud container. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host for allowed values.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_UPLOAD_LIMIT=11G` it should change Nextclouds upload limit to 11G. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud for allowed values.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_MEMORY_LIMIT=1024M` it should change Nextclouds PHP memory limit to 1024M. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud for allowed values.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_MAX_TIME=4000` it should change Nextclouds upload max time 4000s. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud for allowed values.
- [ ] When starting the mastercontainer with `--env BORG_RETENTION_POLICY="--keep-within=1d --keep-weekly=1 --keep-monthly=1"` it should change borgs retention policy to the defined one. This can be checked when creating a backup and looking at the logs.
-- [ ] When starting the mastercontainer with `--env FULLTEXTSEARCH_JAVA_OPTIONS="-Xms1024M -Xmx1024M"` it should change Elasticsearchs `ES_JAVA_OPTS` options to the defined one. This can be checked by checking the `ES_JAVA_OPTS` variable for the nextcloud-aio-fulltextsearch container.
- [ ] When starting the mastercontainer with `--env WATCHTOWER_DOCKER_SOCKET_PATH="$XDG_RUNTIME_DIR/docker.sock"` it should map `$XDG_RUNTIME_DIR/docker.sock` to `/var/run/docker.sock` inside the watchtower container which allow to update the mastercontainer on docker rootless.
- [ ] When starting the mastercontainer with `--env AIO_DISABLE_BACKUP_SECTION=true` it should hide the backup section that gets shown after AIO is set up (everything of [020-backup-and-restore](./020-backup-and-restore.md)) and simply show that the backup section is disabled.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_TRUSTED_CACERTS_DIR=/path/to/my/cacerts`, the resulting nextcloud container should trust all the Certification Authorities, whose certificates are included in the directory `/path/to/my/cacerts` on the host.
@@ -23,7 +20,7 @@ See https://github.com/nextcloud/all-in-one#how-to-trust-user-defined-certificat
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_ADDITIONAL_APKS=zip`, the resulting Nextcloud container should have the zip package installed and not imagemagick.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=inotify`, the resulting Nextcloud container should have the inotify extension installed and not the imagick extension.
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_ENABLE_DRI_DEVICE=true`, the resulting Nextcloud container should have the /dev/dri device mounted into the container. (Only works if a `/dev/dri` device is present on the host)
-- [ ] When starting the mastercontainer with `--env NEXTCLOUD_ENABLE_NVIDIA_GPU=true`, the resulting Nextcloud container should have the nvidia gpu device mounted into the container. (Only works if a Nvidia GPU and runtime is installed on the host)
- [ ] When starting the mastercontainer with `--env NEXTCLOUD_KEEP_DISABLED_APPS=true` it should keep apps in Nextcloud that are disabled in the AIO interface. For example if Collabora is disabled in the AIO interface and you install the richdocuments app in Nextcloud, a restart should not uninstall the richdocuments app in Nextcloud anymore.
+- [ ] When starting the mastercontainer with `--env AIO_COMMUNITY_CONTAINERS="fail2ban"`, it should add the fail2ban container to the container stack and show it in the AIO interface as well as start it, etc.
You can now continue with [070-timezone-change.md](./070-timezone-change.md)
diff --git a/zizmor.yml b/zizmor.yml
deleted file mode 100644
index 7601baa4..00000000
--- a/zizmor.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-rules:
- excessive-permissions:
- disable: true
- dangerous-triggers:
- ignore:
- - build_images.yml
- artipacked:
- disable: true