Docker + nginx + letsencrypt : works on LAN but can't acces from outside (502 bad gateway)

Hi there !
I have the same probleme as others, but I couldnā€™t make their solution work for me (or didnā€™t understood them ^^), so I open another thread.
As said in the title, I running docker on windows 10, with linux containers. I have

Command used for nginx :

docker run -d --name=nginx-proxy
-p 80:80 -p 443:443
-e DEFAULT_HOST=XXX.com
-v /var/lib/docker/volumes/nginx/_data/certs:/etc/nginx/certs:ro
-v /var/lib/docker/volumes/nginx/_data_dhparam:/etc/nginx/dhparam
-v /etc/nginx/vhost.d
-v /usr/share/nginx/html
-v /var/run/docker.sock:/tmp/docker.sock:ro
ā€“restart always
ā€“label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy jwilder/nginx-proxy:latest

Command used for letsenrypt :

docker run -d --name=lestencrypt
-v /var/lib/docker/volumes/nginx/_data/certs:/etc/nginx/certs:rw
-v /var/run/docker.sock:/var/run/docker.sock:ro
ā€“volumes-from nginx-proxy
ā€“restart always
-e ā€œDEFAULT_EMAIL=XXX@XXX.comā€
-e DEBUG=true jrcs/letsencrypt-nginx-proxy-companion

Command for nextcloud :

docker run -d --name=nextcloud
-p 8080:80
-e VIRTUAL_HOST=XXX.com
-e VIRTUAL_PORT=8080
ā€“expose=8080
-e LETSENCRYPT_HOST=XXX.com
-v /var/lib/docker/volumes/nextcloud/_data/data:/var/www/html
-v /var/lib/docker/volumes/nextcloud/_data/database:/var/lib/mysql
-v d:/:/4to -v e:/:/10to
ā€“restart always nextcloud

I tried to add

ā€˜overwriteprotocolā€™ => ā€˜httpsā€™,

to the config file, but I just couldnā€™t acces from lan anymore.

I donā€™t remember doing anythyng else last time I build everything. So thatā€™s why I calling for your help : )

Thanks