From 46c7fed2be514b64a219ff611877415d39891e11 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 12 Jul 2024 11:34:00 +0200 Subject: [PATCH 1/6] update the ipv6 documentation Signed-off-by: Simon L. --- compose.yaml | 13 ------------- docker-ipv6-support.md | 22 +++++++++------------- manual-install/latest.yml | 8 -------- manual-install/update-yaml.sh | 8 -------- 4 files changed, 9 insertions(+), 42 deletions(-) diff --git a/compose.yaml b/compose.yaml index e886db33..d300a97d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -30,8 +30,6 @@ services: # NEXTCLOUD_KEEP_DISABLED_APPS: false # Setting this to true will keep Nextcloud apps that are disabled in the AIO interface and not uninstall them if they should be installed. See https://github.com/nextcloud/all-in-one#how-to-keep-disabled-apps # TALK_PORT: 3478 # This allows to adjust the port that the talk container is using. See https://github.com/nextcloud/all-in-one#how-to-adjust-the-talk-port # WATCHTOWER_DOCKER_SOCKET_PATH: /var/run/docker.sock # Needs to be specified if the docker socket on the host is not located in the default '/var/run/docker.sock'. Otherwise mastercontainer updates will fail. For macos it needs to be '/var/run/docker.sock' - # networks: # Is needed when you want to create the nextcloud-aio network with ipv6-support using this file, see the network config at the bottom of the file - # - nextcloud-aio # Is needed when you want to create the nextcloud-aio network with ipv6-support using this file, see the network config at the bottom of the file # security_opt: ["label:disable"] # Is needed when using SELinux # # Optional: Caddy reverse proxy. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md @@ -52,14 +50,3 @@ volumes: # If you want to store the data on a different drive, see https://githu nextcloud_aio_mastercontainer: name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work -# # Optional: If you need ipv6, follow step 1 and 2 of https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md first and then uncomment the below config in order to activate ipv6 for the internal nextcloud-aio network. -# # Please make sure to uncomment also the networking lines of the mastercontainer above in order to actually create the network with docker-compose -# networks: -# nextcloud-aio: -# name: nextcloud-aio # This line is not allowed to be changed as otherwise the created network will not be used by the other containers of AIO -# driver: bridge -# enable_ipv6: true -# ipam: -# driver: default -# config: -# - subnet: fd12:3456:789a:2::/64 # IPv6 subnet to use diff --git a/docker-ipv6-support.md b/docker-ipv6-support.md index a9694c35..aed19065 100644 --- a/docker-ipv6-support.md +++ b/docker-ipv6-support.md @@ -5,14 +5,12 @@ Before enabling IPv6-Support for Docker, please note that there are still some u Now that this was mentioned, see the instructions below on how to enable IPv6 for Docker. ## Docker on Linux and Docker-rootless -1. Edit `/etc/docker/daemon.json` (or `~/.config/docker/daemon.json` in case of docker-rootless), set the `ipv6` key to `true` and the `fixed-cidr-v6` key to your IPv6 subnet. In this example we are setting it to `fd12:3456:789a:1::/64`. Additionally set `experimental` to `true` and `ip6tables` to `true` as well. If you are using mailcow and enabled IPv6 with the update.sh, you can keep their daemon.json, it will work too. +First of all upgrade your docker installation to v27.0.1 or higher. +1. Then edit `/etc/docker/daemon.json` (or `~/.config/docker/daemon.json` in case of docker-rootless), add the below json: ```json { - "ipv6": true, - "fixed-cidr-v6": "fd12:3456:789a:1::/64", - "experimental": true, - "ip6tables": true + "default-network-opts": {"bridge":{"com.docker.network.enable_ipv6":"true"}} } ``` @@ -23,22 +21,20 @@ Now that this was mentioned, see the instructions below on how to enable IPv6 fo ```console sudo systemctl restart docker ``` -3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create --subnet="fd12:3456:789a:2::/64" --driver bridge --ipv6 nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it. +3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it. ## Docker Desktop (Windows and macOS) -On Windows and macOS which use Docker Desktop, you need to go into the settings, and select `Docker Engine`. There you should see the currently used daemon.json file. +First of all upgrade your docker desktop installation to v4.32.0 or higher. +Then, on Windows and macOS which use Docker Desktop, you need to go into the settings, and select `Docker Engine`. There you should see the currently used daemon.json file. -1. You need to now adjust this json file by setting the `ipv6` key to `true` and the `fixed-cidr-v6` key to your IPv6 subnet. In this example we are setting it to `fd12:3456:789a:1::/64`. Additionally set `experimental` to `true` and `ip6tables` to `true` as well. +1. You need to now adjust this json file: ``` - "ipv6": true, - "fixed-cidr-v6": "fd12:3456:789a:1::/64", - "experimental": true, - "ip6tables": true + "default-network-opts": {"bridge":{"com.docker.network.enable_ipv6":"true"}} ``` 2. Add these values to the json and make sure to keep the other currently values and that you don't see `Unexpected token in JSON at position ...` before attempting to restart by clicking on `Apply & restart`. -3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `docker network inspect nextcloud-aio`. On a new instance, this command should return that it did not find a network with this name. Then you can run `docker network create --subnet="fd12:3456:789a:2::/64" --driver bridge --ipv6 nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it. +3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it. --- diff --git a/manual-install/latest.yml b/manual-install/latest.yml index da511f7c..1be0ea0d 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -388,13 +388,5 @@ volumes: nextcloud_aio_nextcloud_data: name: nextcloud_aio_nextcloud_data -# Inspired by https://github.com/mailcow/mailcow-dockerized/blob/master/docker-compose.yml networks: nextcloud-aio: - name: nextcloud-aio - driver: bridge - enable_ipv6: true - ipam: - driver: default - config: - - subnet: ${IPV6_NETWORK} diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 2c67aafc..4bc92661 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -139,16 +139,8 @@ done cat << NETWORK >> containers.yml -# Inspired by https://github.com/mailcow/mailcow-dockerized/blob/master/docker-compose.yml networks: nextcloud-aio: - name: nextcloud-aio - driver: bridge - enable_ipv6: true - ipam: - driver: default - config: - - subnet: \${IPV6_NETWORK} NETWORK cat containers.yml > latest.yml From 338e0868f538cd05b1dea16d00d05f2ef35f3438 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 12 Jul 2024 14:37:17 +0200 Subject: [PATCH 2/6] Update compose.yaml Signed-off-by: Zoey --- compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/compose.yaml b/compose.yaml index d300a97d..69516d24 100644 --- a/compose.yaml +++ b/compose.yaml @@ -7,6 +7,7 @@ services: volumes: - nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work - /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don't forget to also set 'WATCHTOWER_DOCKER_SOCKET_PATH'! + network_mode: bridge # add to the same network as docker run would do ports: - 80:80 # Can be removed when running behind a web server or reverse proxy (like Apache, Nginx, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md - 8080:8080 From b3161695e6d50b6982dd05274fd7952d7059a144 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 12 Jul 2024 14:38:38 +0200 Subject: [PATCH 3/6] Update docker-ipv6-support.md Signed-off-by: Zoey --- docker-ipv6-support.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docker-ipv6-support.md b/docker-ipv6-support.md index aed19065..f4423e65 100644 --- a/docker-ipv6-support.md +++ b/docker-ipv6-support.md @@ -1,9 +1,5 @@ # IPv6-Support for Docker -Before enabling IPv6-Support for Docker, please note that there are still some unresolved problems in regards to IPv6-Support in Docker. See https://github.com/nextcloud/all-in-one/discussions/2557 for more details on this. - -Now that this was mentioned, see the instructions below on how to enable IPv6 for Docker. - ## Docker on Linux and Docker-rootless First of all upgrade your docker installation to v27.0.1 or higher. 1. Then edit `/etc/docker/daemon.json` (or `~/.config/docker/daemon.json` in case of docker-rootless), add the below json: @@ -34,7 +30,7 @@ Then, on Windows and macOS which use Docker Desktop, you need to go into the set ``` 2. Add these values to the json and make sure to keep the other currently values and that you don't see `Unexpected token in JSON at position ...` before attempting to restart by clicking on `Apply & restart`. -3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it. +3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2557 in order to recreate the network and enable ipv6 for it. --- From 0600a89a8852ff8142952ddab3eeeab3567a7366 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 15 Jul 2024 11:46:27 +0200 Subject: [PATCH 4/6] address review Signed-off-by: Simon L. --- manual-install/latest.yml | 1 + manual-install/update-yaml.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/manual-install/latest.yml b/manual-install/latest.yml index 1be0ea0d..ef317ac5 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -390,3 +390,4 @@ volumes: networks: nextcloud-aio: + name: nextcloud-aio diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 4bc92661..6d65052d 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -141,6 +141,7 @@ cat << NETWORK >> containers.yml networks: nextcloud-aio: + name: nextcloud-aio NETWORK cat containers.yml > latest.yml From 1f04defd75d89e54f316af3beefa0db319ac1856 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 15 Jul 2024 11:47:44 +0200 Subject: [PATCH 5/6] also remove IPV6_NETWORK Signed-off-by: Simon L. --- manual-install/sample.conf | 1 - manual-install/update-yaml.sh | 1 - nextcloud-aio-helm-chart/update-helm.sh | 1 - 3 files changed, 3 deletions(-) diff --git a/manual-install/sample.conf b/manual-install/sample.conf index e4fcff5f..69934fd0 100644 --- a/manual-install/sample.conf +++ b/manual-install/sample.conf @@ -37,4 +37,3 @@ NEXTCLOUD_UPLOAD_LIMIT=10G # This allows to change the upload limit of REMOVE_DISABLED_APPS=yes # Setting this to no keep Nextcloud apps that are disabled via their switch and not uninstall them if they should be installed in Nextcloud. TALK_PORT=3478 # This allows to adjust the port that the talk container is using. UPDATE_NEXTCLOUD_APPS="no" # When setting to "yes" (with quotes), it will automatically update all installed Nextcloud apps upon container startup on saturdays. -IPV6_NETWORK=fd12:3456:789a:2::/64 # IPv6 subnet to use diff --git a/manual-install/update-yaml.sh b/manual-install/update-yaml.sh index 6d65052d..a1db1388 100644 --- a/manual-install/update-yaml.sh +++ b/manual-install/update-yaml.sh @@ -95,7 +95,6 @@ sed -i 's|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=|NEXTCLOUD_ADDITIONAL_PHP_EXTENSIO sed -i 's|INSTALL_LATEST_MAJOR=|INSTALL_LATEST_MAJOR=no # Setting this to yes will install the latest Major Nextcloud version upon the first installation|' sample.conf sed -i 's|REMOVE_DISABLED_APPS=|REMOVE_DISABLED_APPS=yes # Setting this to no keep Nextcloud apps that are disabled via their switch and not uninstall them if they should be installed in Nextcloud.|' sample.conf sed -i 's|=$|= # TODO! This needs to be a unique and good password!|' sample.conf -echo 'IPV6_NETWORK=fd12:3456:789a:2::/64 # IPv6 subnet to use' >> sample.conf grep '# TODO!' sample.conf > todo.conf grep -v '# TODO!\|_ENABLED' sample.conf > temp.conf diff --git a/nextcloud-aio-helm-chart/update-helm.sh b/nextcloud-aio-helm-chart/update-helm.sh index 44d523b0..ad360d8b 100755 --- a/nextcloud-aio-helm-chart/update-helm.sh +++ b/nextcloud-aio-helm-chart/update-helm.sh @@ -336,7 +336,6 @@ sed -i 's|= |: |' /tmp/sample.conf sed -i '/^NEXTCLOUD_DATADIR/d' /tmp/sample.conf sed -i '/^APACHE_IP_BINDING/d' /tmp/sample.conf sed -i '/^NEXTCLOUD_MOUNT/d' /tmp/sample.conf -sed -i '/^IPV6_NETWORK/d' /tmp/sample.conf sed -i '/_ENABLED.*/s/ yes / "yes" /' /tmp/sample.conf sed -i '/_ENABLED.*/s/ no / "no" /' /tmp/sample.conf sed -i 's|^NEXTCLOUD_TRUSTED_CACERTS_DIR: .*|NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container|' /tmp/sample.conf From aaf748b547dbc9840eb3ce8fd3f60f31b1485b80 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Mon, 15 Jul 2024 13:50:04 +0200 Subject: [PATCH 6/6] update link to network recreation docs Signed-off-by: Simon L. --- docker-ipv6-support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-ipv6-support.md b/docker-ipv6-support.md index f4423e65..8d338dfb 100644 --- a/docker-ipv6-support.md +++ b/docker-ipv6-support.md @@ -17,7 +17,7 @@ First of all upgrade your docker installation to v27.0.1 or higher. ```console sudo systemctl restart docker ``` -3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2045 in order to recreate the network and enable ipv6 for it. +3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/4989 in order to recreate the network and enable ipv6 for it. ## Docker Desktop (Windows and macOS) First of all upgrade your docker desktop installation to v4.32.0 or higher. @@ -30,7 +30,7 @@ Then, on Windows and macOS which use Docker Desktop, you need to go into the set ``` 2. Add these values to the json and make sure to keep the other currently values and that you don't see `Unexpected token in JSON at position ...` before attempting to restart by clicking on `Apply & restart`. -3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/2557 in order to recreate the network and enable ipv6 for it. +3. Make sure that ipv6 is enabled for the internal `nextcloud-aio` network by running `sudo docker network inspect nextcloud-aio | grep EnableIPv6`. On a new instance, this command should return that it did not find a network with this name. Then you can run `sudo docker network create nextcloud-aio` in order to create the network with ipv6-support. However if it finds the network and its value `EnableIPv6` is set to false, make sure to follow https://github.com/nextcloud/all-in-one/discussions/4989 in order to recreate the network and enable ipv6 for it. ---