Knutowskie Posted September 17, 2024 Posted September 17, 2024 I got the following setup: SWAG, 2x Nextcloud, MariaDB and Collabora are running in docker containers. All fine so far. I noticed that the containers Nextcloud and Collabora are talking with each other over the WAN Loop. The solution for speeding things up should be to set up docker network aliases ( see here: https://help.nextcloud.com/t/probably-dns-help-with-nc-docker-collabora-wireguard-tunnel/176562/5 ) My problem is: where in the Web-GUI of unraid i can set up this? My search attempts here didnt reveal another threat. So maybe someone got a solution? Quote
Bastian Posted September 23, 2024 Posted September 23, 2024 Unraids Web UI has no build in function do configure Docker Networks. Unraid automatically creates a new docker network for bonded interfaces and has the flag to preserve Docker Networks on restart (though it still can fail). If you need to add some additional network configuration, you will have to use the CLI. After the network is created, you can normally select in the Dropdown on editing the template. A lot of people edit the Template and add something along the line of && docker network blah for the Post Argument to have the configuration persistent. 1 Quote
Knutowskie Posted September 25, 2024 Author Posted September 25, 2024 (edited) On 9/23/2024 at 11:42 PM, Bastian said: Unraids Web UI has no build in function do configure Docker Networks. Unraid automatically creates a new docker network for bonded interfaces and has the flag to preserve Docker Networks on restart (though it still can fail). If you need to add some additional network configuration, you will have to use the CLI. After the network is created, you can normally select in the Dropdown on editing the template. A lot of people edit the Template and add something along the line of && docker network blah for the Post Argument to have the configuration persistent. Thank you for your reply. So where can i add the network aliases for my swag container? It needs to be something like cloud.domain.com and collabora.domain.com so the internal traffic stays internal. In the situation right now the nextcloud container talks to collabora container over WAN, as it is only able to use "collabora.domain.com" and no IP address. To be honest: i don't know which dropdown you mean where i can add the line for the alias. It should look like this: docker network connect --alias cloud.domain.com --alias collabora.domain.com somedockernetwork swag But this would connect it to another network as far as i understand. I only need the swag to be connected to one single docker net, but with aliases. Is there a docker-compose file or something, that unraid uses and that i can edit? The other solution would be to connect swag to a dummy network in default and then add the real network with the solution i found here: using_multiple_docker_networks_in_unraid Edited September 25, 2024 by Knutowskie Quote
Bastian Posted September 25, 2024 Posted September 25, 2024 For better or worse, Lime Tech created their own Compose Notation to store the Run Configuration. Those are stored within /boot/config/plugins/dockerMan/templates-user. The way I would go with it (though never done it myself): Enable "Preserve Docker Networks" in the Docker Configuration in Unraid Create a new Docker Network using the CLI docker network create somedockernetwork Edit Swag and attach it to said network using the UI The network is available from the dropdown list in the UI Edit Swag and create the alias using the "Post Argument" (Advanced View) && docker network connect --alias cloud.domain.com --alias collabora.domain.com somedockernetwork swag 1 Quote
Knutowskie Posted September 25, 2024 Author Posted September 25, 2024 (edited) 23 hours ago, Bastian said: For better or worse, Lime Tech created their own Compose Notation to store the Run Configuration. Those are stored within /boot/config/plugins/dockerMan/templates-user. The way I would go with it (though never done it myself): Enable "Preserve Docker Networks" in the Docker Configuration in Unraid Create a new Docker Network using the CLI docker network create somedockernetwork Edit Swag and attach it to said network using the UI The network is available from the dropdown list in the UI Edit Swag and create the alias using the "Post Argument" (Advanced View) && docker network connect --alias cloud.domain.com --alias collabora.domain.com somedockernetwork swag but if i want to connect a docker container to the same network twice, i get an error. "The command failed." ... Error response from daemon: endpoint with name swag already exists in network proxynet So this is my solution that seems to work: i created some custom network named "eth0" a while ago for my pihole. The swag container now is connected primary to it and gets an IP in my Home-LAN. Let's say 192.168.0.3. With the above way i attached it to my "proxynet" where the 2 nextclouds, a mariaDB and the collabora lives. All seems to work! Any suggestions why this may be a bad idea? Edited September 26, 2024 by Knutowskie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.