Nextcloud AIO in LAN / VPN

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Hallo, I don’t want to open port 80/443 permanently to my nextcloud AIO. Unfortunaly my local DNS server (pihole) does not correctly forward the DNS to local IP, I can’t figure out why (I set it in “local DNS”). Is there a possibility to change the whole setup to IP-based? What would you recommend?

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian 13.3
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.66
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Hi, see all-in-one/local-instance.md at main · nextcloud/all-in-one · GitHub

No, unless it’s a public IP address that you own and for which you can get a valid TLS certificate. So, no. :wink:

Get your local DNS working.

As the link provided by @szaimen shows, you need a domain name with a valid certificate, so local IP addresses won’t work.

Just a wild guess, but maybe it’s because your client devices/browsers are using DoH (DNS over HTTPS), which would mean they’re bypassing your local Pi-hole…?

Hi, it seems that it doesn’t work because I tried to use a DNS that is a CNAME to a DynDNS entry and nslookup uses that cname instead of the local IP. I can’t get along with tailscale so I’ll just use the ugly DynDNS name

On yur local DNS server, pi-hole in this case, you’d need to set an A record.

dyndnsname.domain.tld → <local_ip_address>, like this…

grafik

To avoid the “ugly” bit, you could register a domain name of your choice and use that instead. :wink:

I know :slight_smile: I did exactly that, and I configured the DNS in the provider settings to forward to the DynDNS entry and I configured PiHole to forward to the local adress, but nslookup always uses CNAME if exists. This does not work with CNAME entrys.

The public record is a CNAME record, but this is not required in the local network. In this case, the name must be resolved directly to the server’s local IP address.

If this is about getting an SSL certificate, you must either open port 443, at least temporarily, or you could use the ACME DNS challenge. The latter is best done via a reverse proxy, since, as far as I am aware, AIO cannot obtain a certificate on its own without port forwarding: https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-get-nextcloud-running-using-the-acme-dns-challenge.g

As you can see in the screenshot, I configured that. But as you can see in the terminal screenshot, it is ignored.

Is 192.168.85.100 the IP of your Pi-hole?

If so, it appears that you added a CNAME (Canonical Name) record for nextcloud.xxxxxxxx.de under “Local CNAME records” in Pi-hole that points to the DynDNS name, which then resolves to the public IP address, instead of adding an A record under “Local DNS records” in Pi-hole that points directly to the local IP address of your server.

No, in PiHole it is all configured in “List of local DNS records”.

The configuration of the CNAME record was made in the provider DNS settings.

I got it working with tailscale now (had to remove the stack completly).

Great Tutorial:
https://github.com/nextcloud/all-in-one/discussions/6817

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.