You were right. "unbound" was failed. Turns out IPV6 was disabled which was causing "unbound" to fail and in turn causing the issues with resolving domain names in Nextcloud. This is a vanilla install of Ubuntu 16 LTS so I'm not sure what happened. I enabled IPV6 and rebooted and everything started working. Thanks for the tip.