I’m trying to setup a server hosting a nextcloud instance, with the cospend app enabled, hosted on a OVH VPS. Let’s assume the domain name for that server is foo.bar.
I have several issues:
The VPS has both an IPv4 and an IPv6, and the DNS is configured to point the domain name to both these IPs. Yet, I can’t seem to make it work with IPv6:
ping -6 foo.barresolves correctly the IPv6 address, but hangs forever
ssh -6 root@foo.bar hangs forever
the -4 counterpart of both these commands work as expected
I can connect to the nextcloud instance via the web client, but I can’t get it to work with android or desktop clients. On the Android client, it redirects me to the web browser, where I can log in, then I have to click on a button that says “grant access”, and when I do, it spins forever. On the desktop client, I put https://foo.bar in the URL field, and (after the client complains about the certificate), it says “The returned server URL does not start with HTTPS despite the login URL started with HTTPS. Login will not be possible because this might be a security issue. Please contact your administrator.”
When I connect on the web client as an admin, I try to install the Cospend application by clicking on “+ Apps”, but I can’t find it there, yet that seems to be the indicated way to install applications.
Can you share your configuration, and what VPS host you’re using? Sounds like networking and nginx config is messed up. It’s also worth checking that DNS resolves to the correct addresses with dig- it could well be that your local IPv6 is broken, not your server’s.
I also set the forceSSL setting on my nginx virtualHost for nextcloud; using non-SSL http makes little sense for an authenticated service IMO.
I haven’t used OVH, so I’m not sure if DHCP is sufficient for their networking; double check with their docs. That said, checking if you can dig up your IPv6 address is probably still a good smoke test. But sounds like you don’t actually care about IPv6, just nextcloud being broken?
Well spotted, this fixed the issue for the android client. Furthermore, I was able to install applications declaratively without problems.
Yes, there is still an issue: I use nixos’ acme module to fetch a certificate, but the certificate it provides is not trusted by clients. Hence, the desktop client refuses to log in into my nextcloud instance. My ACME configuration is as follows
NixOS generates a preliminary self-signed certificate, which is replaced once the letsencrypt request succeeds.
If that doesn’t happen, the self-signed cert stays in place and your clients don’t trust it. If you look at your logs you’ll probably see a failing certificate service.
Indeed, that was it: I tried obtaining a certificate for *.mydomain.net with an http challenge, which apparently is not allowed. Changing this solved the issue. Thanks!