Hey everyone,
I’m running Nextcloud in Docker on a Raspberry Pi 4 using a docker-compose setup.
Support intro
- Nextcloud version :
30.0.1.2 (docker) - Operating system and version:
Debian 12 - Apache or nginx version:
2.12.1 (docker) - PHP version:
8.2.25 - Other information such as config.php, compose file, and npm config are all at the end of this post.
I recently ran into a problem where Nextcloud was repeatedly throwing a dns_get_record error (<==my old post has my docker compose file and all other info if you like to check them).
After some troubleshooting, I’ve noticed that I could not access nextcloud database even though Nextcloud has been using it fine without error (?). At the end, I managed to get rid of the issue by recreating the nextcloud containers and changing the network settings from an internal (custom) Docker network to a public one. I also made sure the Nextcloud database was accessible via Docker Adminer.
Now that things are working, I’m trying to understand what went wrong with my original setup. And I’m sure it was my network setup having some issue because once I change my current working one back to my old network setup, I get the dns_get_record error again (and probably even worse).
Here’s how my Docker networks were configured originally:
- I had two networks:
default(Docker’s default network)nextcloud_net(a custom internal network meant to isolate Nextcloud-related services)
Here’s how my containers were assigned to networks:
nextcloud: connected todefaultandnextcloud_netnextcloud_db: only onnextcloud_netredis: only onnextcloud_netcron: only onnextcloud_netnginxProxyManager: only ondefault
My intention was for nextcloud_net to be an internal network just for Nextcloud and its related services. But it seems like something about this setup broke DNS resolution inside the container (leading to the dns_get_record errors).
Has anyone experienced something similar or can explain why DNS would fail in this kind of network configuration?
Thanks in advance!