Help installing Nextcloud for use in internal network (VPN) on home server: problem with domain

My home setup is as follows.

I have a Home Server with internal IP Address 192.168.254.23 and it is running, among other things, Plex and Calibre-Web on Portainer and Home Assistant with Google Assistant integration as a VM. My network is behind a VPN. I can get automatic external communications to the Home Assistant instance through port forwarding (needed for Google Assistant) or by logging in through my VPN (needed for instance for Plex).

Now I’d like to start using NextCloud.

I used these instructions: GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance. and used the https://raw.githubusercontent.com/nextcloud/all-in-one/main/docker-compose.yml on Portainer. I can access the Nextcloud AIO Interface through https://192.168.254.23:8080/ but then I run into troubles as I’m unsure what to do about the domain.

My first throught was to create a domain name (e.g. nextcloud.example.com ) and configure my router’s local DNS database to point that domain to the server’s IP. Something I did similarly for Home Assistant (where I point the DNS record to the VM’s IP on the server). This does not work, clicking submit gives an error (first it gave something about using an internal IP and second it gave “DNS config is not set for this domain or the domain is not a valid domain! (It was found to be set to ‘’)”)

So unsure on how to proceed. What I’d like is for the domain to be usable from within the network (when we are home) or externally after using the VPN.

Any suggestions?

To get hints, we will need to exclude a misconfiguration.
This is the reason, why you gut shown the support template while creating this thread.
Please fill the Support Templates. and add it to your first posting.
The extracts of log files are needed to check the answer of your system after calling your Nextcloud instance.