olivier
(Olivier)
April 11, 2022, 1:02pm
1
NethServer Version: 7.9.2009
Module: NextCloud
The NextCloud module has got a setting to turn on Service discovery (“Enable CalDAV and CardDAV auto-discovery”, Nextcloud — NethServer 7 Final ). However following recent NextCloud updates, the URL seem to have changed.
In the file /etc/e-smith/templates/etc/httpd/conf.d/zz_nextcloud.conf/10base, current code is:
if ($wellknown eq 'enabled' && $vhost eq '') {
$OUT .= " \n\n# Enable webdav redirect\n";
$OUT .= " Redirect 301 /.well-known/host-meta /nextcloud/public.php?service=host-meta\n";
$OUT .= " Redirect 301 /.well-known/host-meta.json /nextcloud/public.php?service=host-meta-json\n";
$OUT .= " Redirect 301 /.well-known/webfinger /nextcloud/public.php?service=webfinger\n";
$OUT .= " Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav/\n";
$OUT .= " Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav/\n";
}
But according to General troubleshooting — Nextcloud latest Administration Manual latest documentation it might need to be as follow:
if ($wellknown eq 'enabled' && $vhost eq '') {
$OUT .= " \n\n# Enable webdav redirect\n";
$OUT .= " Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav\n";
$OUT .= " Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav\n";
$OUT .= " Redirect 301 /.well-known/webfinger /nextcloud/index.php/.well-known/webfinger\n";
$OUT .= " Redirect 301 /.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo\n";
}
For now, as user, I have copied the original file in a custom template and applied the change there.
2 Likes
mrmarkuz
(Markus Neuberger)
April 11, 2022, 8:33pm
2
Hi and welcome to NethServer Community,
thanks for pointing that out.
I can confirm the issue and that your custom template is working.
It seems Nextcloud changed it with version 21.
I think this should be fixed.
Caldav/carddav settings are untouched so there’s no possible regression.
@giacomo I’d open an issue/PR…
1 Like
giacomo
(Giacomo Sanchietti)
April 13, 2022, 9:25am
3
Thank you for reporting.
This is a bug, indeed.
1 Like
mrmarkuz
(Markus Neuberger)
April 14, 2022, 7:35am
4
Issue opened, PR will follow…
opened 07:34AM - 14 Apr 22 UTC
bug
There are warnings regarding Webfinger/Nodeinfo in the Nextcloud settings. The U… RLs have changed with Nextcloud 21 so we need to adapt them in the `/etc/e-smith/templates/etc/httpd/conf.d/zz_nextcloud.conf/10base`
**Steps to reproduce**
- Install Nextcloud and set “Enable CalDAV and CardDAV auto-discovery”
- Go to Nextcloud admin settings
**Expected behavior**
No warnings about webfinger and nodeinfo
**Actual behavior**
There are warnings about wrong webfinger/nodeinfo paths.
**Components**
nethserver-nextcloud-1.19.4-1
**See also**
https://docs.nextcloud.com/server/23/admin_manual/issues/general_troubleshooting.html#service-discovery
https://community.nethserver.org/t/paths-of-nextcloud-service-discovery-seem-to-have-changed/20074
----
Thanks to Olivier for raising the issue.
6 Likes
giacomo
(Giacomo Sanchietti)
April 19, 2022, 6:56am
5
@mrmarkuz did a great job! The package is now ready for testing.
Would you give it a try @olivier ?
2 Likes
mrmarkuz
(Markus Neuberger)
April 25, 2022, 10:09pm
6
Please can somebody test the package so we can eliminate the errors in the Nextcloud Administration overview?
yum install --enablerepo=nethserver-testing nethserver-nextcloud
There should be no errors about webfinger or nodeinfo in Nextcloud Administration overview anymore.
This is my result. Maybe because I’m running behind a reverse proxy?
1 Like
mrmarkuz
(Markus Neuberger)
April 26, 2022, 12:04am
9
Thanks for testing!
I don’t think so.
If you’re using AD and you’re asked for credentials in Nextcloud admin overview, just use one of your users but you need to add the domain like user@domain
.
Did you enable caldav and carddav autodiscovery for Nextcloud?
@mrmarkuz No, I don’t have auto-discovery enabled.
mrmarkuz
(Markus Neuberger)
April 26, 2022, 1:18am
11
OK, you need to enable it for the test to work. After enabling the webfinger and nodeinfo errors should be gone.
1 Like
giacomo
(Giacomo Sanchietti)
April 26, 2022, 2:30pm
12
I can confirm the issue has been fixed.
The issue is not even present when accessing Nextcloud using the virtual host
1 Like
olivier
(Olivier)
April 26, 2022, 2:50pm
13
Tested and working well. Thanks a lot for fixing it!
As the URL are permanently redirected (with 301), I had to clear up/disable the cache of the browser when doing the tests.
2 Likes
Interesting. I have several ios clients using it for their contacts, calendar and file app without that enabled.
mrmarkuz
(Markus Neuberger)
April 26, 2022, 4:55pm
15
I don’t use ios clients but maybe they don’t need/use the auto-discovery?
BTW, SOGo and Webtop support carddav/caldav too.
1 Like