Mount with fstab on Synology

Hi team,

with reading the official docs and a lot in this community I was able to set up two containers on my Synology.
As I have to update these now, I got questions.

In the docs they write we have to mount the data and identity folders with fstab on linux.
So I guess I need to do this on my Synology this way, but fstab is not available there, so I didn’t.

My run command is as follows:

sudo docker run -d --restart unless-stopped --stop-timeout 300
-p 28967:28967
-p 14002:14002
-e WALLET=“xxx”
-e EMAIL=“xxx”
-e ADDRESS=“xxx:28967”
-e STORAGE=“1TB”
–mount type=bind,source="/volume1/docker/storj/config/identity",destination=/app/identity
–mount type=bind,source="/volume1/docker/storj/config",destination=/app/config
–name storagenode storjlabs/storagenode:latest

So I have mounted it with it, can I assume that I can normally shutdown the container / Synology for updates and everything starts again with the mounts?

And also can I just use watchtower with this and everything is fine?

Thanks a lot for help,
Andy

What I forgot to write:

One containers folder is on the internal hdd /volume1, the other one on an external usb drive.

First of all: Welcome to the Storj Family :wink:

I think the Synology Nas handles that for you, just verify it with a reboot if the Storage is on the same mountpoint as before (/volume1/ and the other disk on USB).

Yes, as long as docker gets also started automatically as a Service (which i assume on Synology) all containers will also be started. Thats because of this Flag (which is a RestartPolicy, see https://docs.docker.com/config/containers/start-containers-automatically/): --restart unless-stopped

To be 100% sure test it with a reboot of your NAS :slight_smile:

As long as you configure it as in the Documentation yes, i never had any issues with it. But to be sure i would recommend to verify it on a monthly basis.

Also i would recommend an external Monitoring tool (like uptimerobot), so you get alerted in case something goes wrong. Also you might want to have a fancy Dashboard with Historical Graphs, check this Guide out:

1 Like

Many thanks for the warm welcome! :slight_smile:

I would just use watchtower like the docs say:

docker run -d --restart=always --name watchtower -v /var/run/docker.sock:/var/run/docker.sock storjlabs/watchtower storagenode watchtower --stop-timeout 300s

But as it will delete the existing container if an update exists, I wonder how watchtower knows the paths to data and identity for the new, updated container?

You need to ensure to put all node names which should be covered in here, example:

docker run -d --restart=always --name watchtower -v /var/run/docker.sock:/var/run/docker.sock storjlabs/watchtower <node1> <node2> watchtower --stop-timeout 300s

I am not 100% sure but i assume it will read the config of the running container (you can do it with docker inspect --> https://docs.docker.com/engine/reference/commandline/inspect/), copy it and apply it to the new one.

Official Documentation:

Watchtower will pull down your new image, gracefully shut down your existing container and restart it with the same options that were used when it was deployed initially.

Great, many thanks.
I will just use the code with two nodes and see the magic. :slight_smile: