diff --git a/compose.yaml b/compose.yaml index e886db33185..69516d24df6 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 @@ -30,8 +31,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 +51,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 a9694c35c50..8d338dfbd81 100644 --- a/docker-ipv6-support.md +++ b/docker-ipv6-support.md @@ -1,18 +1,12 @@ # 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 -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 +17,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/4989 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/4989 in order to recreate the network and enable ipv6 for it. --- diff --git a/manual-install/latest.yml b/manual-install/latest.yml index da511f7c04a..ef317ac54da 100644 --- a/manual-install/latest.yml +++ b/manual-install/latest.yml @@ -388,13 +388,6 @@ 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/sample.conf b/manual-install/sample.conf index e4fcff5f040..69934fd0fc5 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 2c67aafcdc0..a1db1388075 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 @@ -139,16 +138,9 @@ 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 diff --git a/nextcloud-aio-helm-chart/update-helm.sh b/nextcloud-aio-helm-chart/update-helm.sh index 44d523b05a2..ad360d8b7fe 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