I have Nextcloud running on a docker container (not the official one, just one I made with Ubuntu and nginx). I also use nginx as reverse proxy.
I keep getting the (in)famous complaint from Nextcloud:
Your web server is not properly set up to resolve “/.well-known/webfinger”. Further information can be found in the documentation .
Your web server is not properly set up to resolve “/.well-known/nodeinfo”. Further information can be found in the documentation .
On my NGINX proxy I have this configured on my nextcloud.conf:
location ^~ /.well-known {
# The rules in this block are an adaptation of the rules
# in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; }
location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other
# requests by passing them to the front-end controller.
return 301 /index.php$request_uri;
}
I just don’t know what and where should be on the proxy and on the nextcloud-nginx. Does anyone have a similar configuration and is willing to share some tips here?
I found one valid config but it may not work properly in your environments because my nextcloud server deployment is a little speicial.
My Nextcloud version is v24.0.6 and is deployed in docker (linuxserver/nextcloud:lastest). It’s behind another nginx reverse proxy web server running in docker on physic Unraid PC and it needs port forward as the PC is in a NAT network.
The network route to nextcloud container is like:
Internet IP:10000 → Unraid nginx container:18443 → reverse proxy to Unraid:9000 → port forward locally to nextcloud container:80
I was having the webfinger issue with a similar setup, and what worked for me was deleting the nginx default.conf and letting it regenerate after restarting nextcloud (/config/nginx/site-confs/default.conf).
I also had to clear cache since the 301 response gets cached and so the warning won’t clear. You need to Open Dev Tools (F12), and while this is open right click on refresh button and select Empty cache and hard reload.
Thanks a lot wyxls. Above config added to “community official ngix” one fixed issue on my side.
My config is basing on dockers: nginx:latest + nextcloud:fpm-alpine.
Might be relevant for issues faced that in my config there is redirection on my router (no DNS servers advertisement on router) to DNS resolution/blocking docker pihole:latest on same server as nextcloud/nginx.