Docker + Nextcloud + External storage

  • Great, th'as up and running, now ;) The certificate is valid and my browers and other apps are happy!

    Thank you again for the help and the great job with all those docker add-ons! Sorry if I missed some information in the docs sometimes, but one can admit that there are a lot of sources of information: your website, readme files, multiple forum posts here... And some of them are outdated, so it is quite hard for a beginner to find the right information.

  • Hi,

    Now I'm facing anothher issue. I would like to access my Nextcloud instance via (for example)

    For that, I've forwarded port 2222 to port 443 on my router, as Nextcloud and letsencrypt are accessed on port 443. But it doesn't seem to be sufficient, I've got a timeout error when trying to access Nextcloud on port 2222 and even from my local network.

    Where am I wrong? Do I have to change some settings somewhere on nextcloud and/or letsencrypt? Or even to rebuild the containers?


  • Nextcloud has its own auto redirects for security purposes and you'll have to modify those in it's config file. You may have to do other stuff on the nginx side but I'm not sure.

    All of that automation was done for port 443, ymmv with a custom port

  • Hi,

    I'm back with a new tiny problem. My setup works perfectly: Nextcloud installed as a Docker component on Librelec, accessible from everywhere via my Duckdns domain and certified with letsencrypt. I also have cron tasks running everyday in order to backup my Nextcloud calendars. However, those cron tasks are actually cUrl commands which download an ICS file from my own Nextcloud instance. Unfortunately, I've discovered that those curl commands don't reach their targets because of a time out error, as described on this output:

    LibreELEC:~ # curl -v -k -u <username>:<password> -o <destination> https://<domain:port>/remote.php/dav/calendars/<username>/personal?export
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying <ip:port>...
    * TCP_NODELAY set
    0 0 0 0 0 0 0 0 --:--:-- 0:00:31 --:--:-- 0* connect to <ip> port <port> failed: Connection timed out
    * Failed to connect to <domain> port <port>: Connection timed out
    0 0 0 0 0 0 0 0 --:--:-- 0:00:31 --:--:-- 0
    * Closing connection 0
    curl: (7) Failed to connect to <domain> port <port>: Connection timed out

    I've checked that I can access https://<domain:port>/remote.php/dav/calendars/<username>/personal?export from my browser and download the ICS file.

    I guess I could do something to make curl being able to download the file from my Raspberry and that it might be linked to the SSL certificate, but I can't understand how.

    Does anyone have an idea?


  • My guess is, it's due to curl when trying to connect to the domain, trying to go out the wan and try to come back in through the router and into the letsencrypt container.

    Assuming the cron tasks are running inside the nextcloud container, see if you can curl "https://localhost/remote.php/dav/calendars/<username>/personal?export" instead, so it tries to connect directly