Questions setting AIO through VPN and DynDNS

, ,

The basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 15.0.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 26.04.1
  • PHP version (e.g, 8.3):
    • 8.5
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

My setup:

Hi, I’m not an engineer but I can get around following detailed tutorials for these things. I’m having some issues setting AIO up and would love some help.

I have a pretty neat TL-Link router which offers VPN, DynDNS, and overall good security.

I’ve installed Wireguard VPN on my router, connected my local server (an old laptop with Ubuntu Server freshly installed) to it and my main PC, so now I can access the setup page on port 8080 through my main PC. I have a domain where I host my main website and would like to use a subdomain for NextCloud and also intend to use my server for other services. I would like to use IPv6 when possible.

Caddy tells me no valid A records were found at my subdomain.domain.com

I’ve also set a DynDNS domain name that I’m not sure how to use for this.

I’ve read the documentation, I’ve looked stuff up, but I can’t seem to figure it out, it’s a bit over my head.

What I have tried:

I updated Docker to be able to use IPv6 across the board.

I opened the 443 and 3478 ports for my server’s public IPv4 which is the VPN endpoint.

In my domain DNS settings I added a type A record to that same IPv4 with the host name being what I’d like my subdomain to be.

When I try to set this as my domain (like cloud.mydomain.com) in NextCloud admin setup I get this error:

DNS config is not set for this domain or the domain is not a valid domain! (It was found to be set to ‘’)

Questions:

(I’ve kinda figured out some things since I originally made this post a few hours ago so I’ve gone an edited it a bit)

Is the VPN kinda the same as using Tailscale? And is it secure enough to just pair my VPN with Caddy and call it a day?

I know the domain’s DNS settings are wrong but I have no idea how to fix it. How would I put my VPN, DynDNS, and subdomains that live in a different IP than my main domain together?

(I have another server that hosts my website, this server would use subdomains from that without touching the main domain)

And does it use IPv6 on its own even though I’m using IPv4s for this setup?

Thank youuu

Hi @Eirika, a few things that should untangle this:

1. What that error actually means. “It was found to be set to ‘’” means AIO couldn’t resolve any A or AAAA record for that name, not that the IP is wrong. So the record either isn’t live yet or isn’t where the world looks for it. Two common causes:

  • The host field: many DNS panels want only cloud there. If you typed cloud.mydomain.com, you may have created cloud.mydomain.com.mydomain.com.
  • The DNS zone: records only count at the provider your domain’s nameservers point to. Since your main website is hosted somewhere else, check which provider that is (dig NS mydomain.com) and add the record there.

Check with dig +short cloud.mydomain.com A, ideally from a machine outside your network. It should return your router’s public IPv4.

2. DynDNS + subdomain. If your home IP changes, don’t use an A record for the subdomain. Make cloud.mydomain.com a CNAME to your DynDNS hostname. Then the subdomain follows your home IP while the main domain and website stay where they are. Every record is independent, so different subdomains pointing to different IPs is completely normal.

3. After DNS, the next two checks. AIO then connects to your domain on port 443 from inside its own container. That needs 443/TCP forwarded to the server and your router supporting NAT loopback (hairpinning). If you get the “not reachable on Port 443 from within this container” error, that’s the hairpinning issue. For Talk you also need 3478/TCP and UDP forwarded. If you put your own Caddy in front, as in your Caddy thread, AIO has to run in reverse-proxy mode (APACHE_PORT, e.g. 11000) and Caddy forwards to it. Follow AIO’s reverse-proxy documentation for that, otherwise the domain check will never pass.

4. VPN vs. Tailscale. Both are WireGuard underneath. Tailscale adds the coordination and NAT traversal, so you don’t need open ports. But a VPN on your router isn’t involved at all when people reach Nextcloud through your domain. That traffic goes to your public IP and the forwarded ports. The VPN is only useful if you want access only over the VPN. In that case read AIO’s “local instance” documentation, because you’ll still need valid HTTPS, which usually means a DNS challenge.

5. IPv6. It doesn’t happen on its own. You need IPv6 enabled in Docker (AIO has a doc for the daemon.json setting), an AAAA record for the subdomain, and a router firewall rule that allows 443 (and 3478) to the server’s IPv6 address. IPv6 has no port forwarding, just an allow rule. With only an A record, everything simply runs over IPv4, which is fine to start with.

I’d get 1 and 2 working first (dig returns your IP), then retry the domain in the AIO interface.

One extra check on the IPv6 question: an A record only advertises IPv4, so AIO won’t “use IPv6 on its own” for that hostname unless you also add an AAAA record pointing to a globally reachable IPv6 address and allow 443 through the router firewall. Enabling IPv6 in Docker doesn’t create that DNS record. Also, router WireGuard and Tailscale both make private tunnels; Tailscale mainly simplifies NAT traversal, but neither replaces public DNS if AIO must validate the hostname from outside.

I see, thank you!

I’ve decided to go with Tailscale, but then I’m using CNAME to link it to the ip I get after running:

tailscale serve --bg http://127.0.0.1:11000

and using dig +short cloud.mydomain.com A while having tailscale down does give me the right cname, but Nextcloud is still giving me the same error

edit:

oh I realized with tailscale serve status that it’s on my tailnet only… trying tailscale funnel 11000 tells me there’s already a listener for port 443 /: looking into it..

Ok so the issue now was that I’d set up tailscale serve and it can’t be up at the same time as a funnel. So solved that and it works now I suppose but I’m getting this error from Nextcloud when I try to submit the domain:

Domain does not point to this server or the reverse proxy is not configured correctly. See the mastercontainer logs for more details. ('sudo docker logs -f nextcloud-aio-mastercontainer')

I’m sure the time has passed for the dns records to refresh… And those logs say:

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443

[  OK  ] php-fpm
[  OK  ] caddy-internal
[  OK  ] caddy-acme
[  OK  ] cron
[  OK  ] backup-time-file-watcher
[  OK  ] session-deduplicator
[  OK  ] domain-validator
[  OK  ] desec-ip-updater
[12-Nov-2026 20:48:27] NOTICE: fpm is running, pid 193
[12-Nov-2026 20:48:27] NOTICE: ready to handle connections
NOTICE: PHP message: The response of the connection attempt to "https://subdomain.mydomain.com:443" was:
NOTICE: PHP message: Expected was: 0013bb0d356400d2f606a9eb767c9a7b67123f6652afde61
NOTICE: PHP message: The error message was: cURL error 35: TLS connect error: error:0A000126:SSL routines::unexpected eof while reading (see 
) for https://subdomain.mydomain.com
NOTICE: PHP message: Please follow 
 in order to debug things!
NOTICE: PHP message: The response of the connection attempt to "https://subdomain.mydomain.com:443" was:
NOTICE: PHP message: Expected was: 0013bb0d356400d2f606a9eb767c9a7b67123f6652afde61
NOTICE: PHP message: The error message was: cURL error 35: TLS connect error: error:0A000126:SSL routines::unexpected eof while reading (see 
) for https://subdomain.mydomain.com
NOTICE: PHP message: Please follow 
 in order to debug things!
NOTICE: PHP message: The response of the connection attempt to "https://subdomain.mydomain.com:443" was:
NOTICE: PHP message: Expected was: 0013bb0d356400d2f606a9eb767c9a7b67123f6652afde61
NOTICE: PHP message: The error message was: cURL error 35: TLS connect error: error:0A000126:SSL routines::unexpected eof while reading (see 
) for https://subdomain.mydomain.com
NOTICE: PHP message: Please follow 
 in order to debug things!
NOTICE: PHP message: The response of the connection attempt to "https://subdomain.mydomain.com:443" was:
NOTICE: PHP message: Expected was: 0013bb0d356400d2f606a9eb767c9a7b67123f6652afde61
NOTICE: PHP message: The error message was: cURL error 35: TLS connect error: error:0A000126:SSL routines::unexpected eof while reading (see 
) for https://subdomain.mydomain.com
NOTICE: PHP message: Please follow 
 in order to debug things!

Which makes me thing I should be funneling to 443 instead of 11000? But this says to use 11000 and I’m not running any other docker images or anything at the moment.

When I reboot my server and do docker compose up I get:

 ✔ Container nextcloud-aio-mastercontainer Created                                                                                                                                                          0.7s
Attaching to nextcloud-aio-mastercontainer
Container nextcloud-aio-mastercontainer Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint nextcloud-aio-mastercontainer (335d39ee5755394811708f6e2e680314dafdc7faf631e3750e74bf95abd724fd): failed to bind host port 0.0.0.0:80/tcp: address already in use 

So I do sudo lsof -i :80 and it tells me Apache2 is using it. I stop Apache2, do docker compose up again and it works.

Am I supposed to not be running Apache2? Or am I missing some configuration so they don’t fight each other?

But it still gives me the same error and to run sudo docker logs -f nextcloud-aio-mastercontainer, so I do and I get a different error now:

Trying to fix docker.sock permissions internally...
Creating docker group internally with id 983
Initial startup of Nextcloud All-in-One complete!
You should be able to open the Nextcloud AIO Interface now on port 8080 of this server!
E.g. https://internal.ip.of.this.server:8080
⚠️ Important: do always use an ip-address if you access this port and not a domain as HSTS might block access to it later!

If your server has port 80 and 8443 open and you point a domain to your server, you can get a valid certificate automatically by opening the Nextcloud AIO Interface via:
https://your-domain-that-points-to-this-server.tld:8443
[  OK  ] caddy-internal
[  OK  ] caddy-acme
[  OK  ] cron
[  OK  ] php-fpm
[  OK  ] backup-time-file-watcher
[  OK  ] session-deduplicator
[  OK  ] desec-ip-updater
[  OK  ] domain-validator
[12-Nov-2026 23:17:59] NOTICE: fpm is running, pid 199
[12-Nov-2026 23:17:59] NOTICE: ready to handle connections
NOTICE: PHP message: The response of the connection attempt to "https://subdomain.mydomain.com:443" was: 
NOTICE: PHP message: Expected was: 0013bb0d356400d2f606a9eb767c9a7b67123f6652afde61
NOTICE: PHP message: The error message was: cURL error 35: TLS connect error: error:0A000126:SSL routines::unexpected eof while reading (see https://curl.se/libcurl/c/libcurl-errors.html) for https://subdomain.mydomain.com
NOTICE: PHP message: Please follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug in order to debug things!
NOTICE: PHP message: The response of the connection attempt to "https://subdomain.mydomain.com:443" was: 
NOTICE: PHP message: Expected was: 0013bb0d356400d2f606a9eb767c9a7b67123f6652afde61
NOTICE: PHP message: The error message was: cURL error 35: TLS connect error: error:0A000126:SSL routines::unexpected eof while reading (see https://curl.se/libcurl/c/libcurl-errors.html) for https://subdomain.mydomain.com
NOTICE: PHP message: Please follow https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md#how-to-debug in order to debug things!

Tried: nc -vz host 443 and it says:

getaddrinfo for host "host" port 443: Temporary failure in name resolution

Then I try: openssl s_client and it says:

40B74A38DE7F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:183:calling connect()
40B74A38DE7F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:185:
40B74A38DE7F0000:error:8000006F:system library:BIO_connect:Connection refused:../crypto/bio/bio_sock2.c:183:calling connect()
40B74A38DE7F0000:error:10000067:BIO routines:BIO_connect:connect error:../crypto/bio/bio_sock2.c:185:
connect:errno=111

I’m so confuseed, would love some help please

Yes, in that setup the domain check can’t pass, because AIO tests whether the domain points at the server’s public IP and reaches it on 443, and with Tailscale nothing is public. Skipping it is the intended route here: start the mastercontainer with -e SKIP_DOMAIN_VALIDATION=true (keep APACHE_PORT=11000 and APACHE_IP_BINDING=127.0.0.1).

One thing to watch: tailscale serve gets its certificate for your *.ts.net name. If you put a CNAME’d custom domain in front of it, the browser will see a cert mismatch. The simplest fix is to enter the machine.tailnet-name.ts.net name itself as the AIO domain. Also check that this name is in trusted_domains once it’s set up.

I’d set up a funnel so it was public. But anyway, I’m going back to Caddy with Wireguard… Was trying Tailscale out in hopes that it made my life easier but it definitely hasn’t and I’ve learnt it actually limits the speed quite a bit if I linked it for others to download my files. I do not intend to post it publicly online but privately with either students or friends.

However, that means I’m still stuck. I have used Nginx before with my DigitalOcean servers and had no issues, why is Caddy recommended so strongly for this? It seems incapable of certifying my domain, looking into it apparently there are some DNS plugins but my domain hosting service (Hover) is not one of them. Is that why I can’t get it to work?

If I skip the domain validation then what steps do I have to do manually? Just the certificate that I could get with LetsEncrypt when I eventually hopefully figure out what is going wrong?

I’ve spent so many hours and days on this, it’s so defeating, at this point just getting it to work on my vpn would be a welcome win.

Yes, for the DNS challenge to work, Caddy has to be able to communicate with your DNS provider via an API in order to create a temporary TXT record. For this, it needs the appropriate DNS plugin.

I did a bit of googleing, and it appears that Hover doesn’t provide an official, supported public API that can be used for the ACME DNS challenge. This is likeley also the reason why there doesn’t seem to be an DNS plugin for ACME/Caddy that supports Hover.

However, I also found the following: (Ab)using the Hover API · Articles

It seems that Hover does have an unofficial API that could potentially be used for this purpose. I don’t know whether there is currently a working Caddy plugin that could be used with this API. If there isn’t, another option would be to use Certbot to obtain and renew the certificates, and then configure Caddy to disable its automatic certificate management and use the certificates generated by Certbot instead, as described in this thread on the Let’s Encrypt forum:: Hover.com DNS challenge for SSL - Help - Let's Encrypt Community Support

The Caddy configuration would then look something like this:

{
    auto_https off
}

cloud.example.com {
    tls /etc/letsencrypt/live/cloud.example.com/fullchain.pem /etc/letsencrypt/live/cloud.example.com/privkey.pem

    reverse_proxy localhost:11000
}

In this example, Certbot would be responsible for obtaining and renewing the certificate, while Caddy simply uses the resulting certificate and private key.

Keep in mind that this approach has some important drawbacks.

First, as far as I understand, the Hover API described above is unofficial and unsupported by Hover. It could therefore stop working at any time if Hover changes anything.

Second, there are security implications. The unofficial API appears to require your Hover username and password. This means that the credentials used by Certbot would potentially provide full access to your Hover account, rather than being limited to managing the DNS records required for the ACME challenge.

If those credentials were ever leaked or compromised, an attacker could potentially gain access to your entire Hover account and any other functionality associated with it.

For that reason, I would strongly recommend either asking Hover Support whether they provide an officially supported way to perform DNS-01 ACME challenges or using a DNS provider that offers an official API and an ACME/Caddy integration

I see, thanks a lot for this!

I have two domains with Hover and haven’t had issues with Nginx and Certbot to get them to work on my DigitalOcean droplets, my wordpress websites are https through that. Wouldn’t it be better to avoid Caddy alltogether?

I don’t know anything about this ACME stuff other than what you have just mentioned, is that a NextCloud specific requirement that isn’t required for Wordpress?

Also how come this DNS plugin isn’t mentioned anywhere in any of the Caddy - Nextcloud documentation? :woozy_face: would’ve saved me so much pain

Not necessarily. The DNS plugin was actually brought up by you, and you generally only need that if port 80 is not reachable from the Internet. For example, if you want your services to be accessible only locally, or if you’re behind CGNAT and can’t forward ports directly.

If port 80 is reachable from the Internet and you forward it directly to Caddy, Caddy should automatically obtain certificates for every site block you configure, as long as the corresponding DNS records points to your public IP. It then uses the HTTP-01 challenge without requiring a DNS plugin.

So I’m honestly not sure why it isn’t working in your case.

You mentioned using a VPN funnel through a VPS. Are you using it because you’re behind CGNAT and therefore cannot forward ports 80 and 443 directly to your home network, or because you already forwarded port 80 to your WordPress website?

In general, you only need one of these two approaches: either direct port forwarding from the Internet to your Caddy server, or a VPS with a VPN tunnel/funnel that forwards the traffic to Caddy. You don’t need both.

However, what’s important in both cases is that ports 80 and 443 ultimately need to be forwarded directly to Caddy, and Caddy then forwards the requests to the appropriate services, such as your WordPress site and Nextcloud.

Full disclosure: I asked ChatGPT to write the following explanation, because otherwise I would probably still be working on this post tomorrow morning. :wink: Hopefully it helps clarify the setups with or without a VPN tunnel.

Conceptually, the setup could look something like this:

Option 1: Direct port forwarding

                         INTERNET
                            │
                ┌───────────┴───────────┐
                │                       │
          www.example.com             cloud.example.com
                │                       │
                └───────────┬───────────┘
                            │
                     Public IP / Router
                            │
                    Port 80 + Port 443
                            │
                            ▼
                       ┌─────────┐
                       │  Caddy  │
                       └────┬────┘
                            │
              ┌─────────────┴──────────────┐
              │                            │
              ▼                            ▼
       ┌─────────────┐             ┌───────────────┐
       │  WordPress  │             │ Nextcloud AIO │
       │   :8080     │             │     :11000    │
       └─────────────┘             └───────────────┘

In this setup, DNS records for both domains point to your public IP. Your router forwards ports 80 and 443 to Caddy.

Caddy handles TLS automatically using the HTTP-01 challenge and then reverse-proxies the traffic to WordPress and Nextcloud AIO.

For example:

example.com {
    reverse_proxy wordpress:8080
}

cloud.example.com {
    reverse_proxy nextcloud-aio-apache:11000
}

The exact Nextcloud AIO upstream depends on how your Docker networking is configured.

Option 2: VPS funnel / VPN tunnel

If you’re behind CGNAT and cannot forward ports 80/443, you can instead use a VPS with a public IP:

                         INTERNET
                            │
                ┌───────────┴───────────┐
                │                       │
          www.example.com             cloud.example.com
                │                       │
                └───────────┬───────────┘
                            │
                            ▼
                       ┌─────────┐
                       │   VPS   │
                       │ Public  │
                       │ IP      │
                       └────┬────┘
                            │
                    VPN / Tunnel
                            │
                            ▼
                       ┌─────────┐
                       │  Home   │
                       │ Network │
                       └────┬────┘
                            │
                            ▼
                       ┌─────────┐
                       │  Caddy  │
                       └────┬────┘
                            │
              ┌─────────────┴──────────────┐
              │                            │
              ▼                            ▼
       ┌─────────────┐             ┌───────────────┐
       │  WordPress  │             │ Nextcloud AIO │
       │   :8080     │             │     :11000    │
       └─────────────┘             └───────────────┘

In this scenario, the VPS acts as the public entry point. Ports 80 and 443 terminate on the VPS and are then forwarded through the VPN/tunnel to Caddy at home.

This also means that Caddy can still use the normal HTTP-01 challenge, because from Let’s Encrypt’s perspective, port 80 is publicly reachable. You don’t necessarily need a DNS challenge just because the actual services are behind a VPN tunnel.

The important part is that the traffic path looks like this:

Let's Encrypt
     │
     │ HTTP-01 challenge
     ▼
   VPS :80
     │
     │ VPN tunnel
     ▼
 Caddy :80
     │
     └── responds to ACME challenge

Afterwards:

Internet
   │
   ▼
VPS :443
   │
   │ VPN tunnel
   ▼
Caddy :443
   │
   ├── www.example.com
   │      └── WordPress
   │
   └── cloud.example.com
          └── Nextcloud AIO

The main difference between the two setups is therefore where the public IP and ports 80/443 terminate:

Direct forwarding:

Internet → Router → Caddy → Applications


VPS funnel:

Internet → VPS → VPN tunnel → Caddy → Applications

If you have CGNAT, the second approach is useful because the VPS provides the publicly reachable IP address while the VPN tunnel provides the connection back into your home network.

If you can get ports 80 and 443 forwarded directly to Caddy, however, I would generally prefer the simpler direct-forwarding setup. There is no particular need for a DNS challenge or a VPS funnel just to obtain Let’s Encrypt certificates.

I see, ok ok, I was a bit confused about that and the DNS plugins being needed.

I was trying Tailscale but it didn’t solve my issues and it would heavily limit the download speed so I’m sticking with VPN + port forwarding.

So in my router (TP-Link) I have NAT Forwarding and I’ve opened ports 80 and 443.

I also have Wireguard VPN installed in my router and running on my server.

My router has a dynamic IP but it also comes with a dynamic dns that gives me a host name so it automatically updates, throws me something like: myserver.tplinkdns.com

I’m inputting that host name in Hover as a CNAME pointing to the subdomain I want to use: cloud.mydomain.com

Is all of that sounding okay?

In my Caddyfile I had the cloud.example.com linking to reverse_proxy localhost:11000 as it is in the NextCloud documentation. I’m now trying to have Caddy running in a separate docker compose file (following this) and on its own hoping to keep it cleaner and easier to debug.

Currently I’m running into the issue of docker logs caddy throwing

{"level":"warn","ts":1794553993.2504716,"msg":"No files matching import glob pattern","pattern":"/etc/caddy/sites/*.caddy"}

when there’s definitely a .caddy file in there, nextcloud-aio-mastercontainer.caddy, so fighting that battle at the moment.. that .caddy file has:

cloud.mydomain.com:443 {
import security
reverse_proxy nextcloud-aio-mastercontainer:11000
}

Yeah ok got something that could be useful:

{"level":"info","ts":1794595846.430721,"logger":"http","msg":"using ACME account","account_id":"https://acme-v02.api.letsencrypt.org/acme/acct/3995335421","account_contact":["mailto:me@mydomain.com"]}
{"level":"info","ts":1794595846.5989335,"logger":"http.acme_client","msg":"trying to solve challenge","identifier":"cloud.mydomain.com","challenge_type":"http-01","ca":"https://acme-v02.api.letsencrypt.org/directory"}
{"level":"error","ts":1794595857.563169,"logger":"http.acme_client","msg":"challenge failed","identifier":"cloud.mydomain.com","challenge_type":"http-01","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"23.16.241.207: Fetching http://cloud.mydomain.com/.well-known/acme-challenge/3Kh5mOSHKnhA_gcaMP_aZpWDKLkPckNBDQCA45hi1R8: Timeout during connect (likely firewall problem)","instance":"","subproblems":null}}
{"level":"error","ts":1794595857.5632668,"logger":"http.acme_client","msg":"validating authorization","identifier":"cloud.mydomain.com","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":"23.16.241.207: Fetching http://cloud.mydomain.com/.well-known/acme-challenge/3Kh5mOSHKnhA_gcaMP_aZpWDKLkPckNBDQCA45hi1R8: Timeout during connect (likely firewall problem)","instance":"","subproblems":null},"order":"https://acme-v02.api.letsencrypt.org/acme/order/3995737612/581924166452","attempt":1,"max_attempts":3}
{"level":"info","ts":1794595858.7099497,"logger":"http.acme_client","msg":"trying to solve challenge","identifier":"cloud.mydomain.com","challenge_type":"tls-alpn-01","ca":"https://acme-v02.api.letsencrypt.org/directory"} 

Looking at my ufw status I can see that port 80 tcp is open though

AIO’s domain check comes from the public internet, not from inside the tailnet. dig on your PC can look right while that check still sees nothing, which matches serve being tailnet-only. Funnel is what publishes the name, and ‘already a listener on 443’ means something else already owns that port, often the AIO master or the router. I’d free that listener before starting funnel, rather than adding another name.

Sooo the problem was that I was running a wireguard client on my laptop and it was creating a loop.. no need for that if you have the wireguard server running on your router :melting_face: :+1:

Thank you all for your help!