Docker Container with External Storage Access to Temporarily available NAS


my nextcloud is inside a docker container on my server with bridge network_mode, including access to other containers such as database and redis. In addition, I have a separate NAS on another machine. Due to power saving, the NAS is only running, when I need it, otherwise it is shutdown.

Now I want to add the NAS as external storage to my nextcloud, but I don’t know any sophisticated way to do it.

Option #1: I mount the NAS to the local file system of my server/docker container and import it inside nextcloud via admin share as local storage. But if the NAS is not reachable, every request to nextcloud takes forever, since it is always checking the availability.

Option #2: I try to forward the port of the NAS to the docker container (I don’t know how) and import the share inside nextcloud as SMB/SFTP. I had this setting before moving to docker container and know, that nextcloud is fine, if the NAS is not available.

Does anybody know, how to forward the port or any other option to include my NAS in my nextcloud?

Thanks, Manoki