Feel free to do so, depending on whether your computer is really included in those networks the instances sharing the same virtual LAN might be able to access your page. I don’t know whether that’s really an issue in your case. I would even expose them to the internet, if there was any use of it.
Your help is completely fine as it is Despite my sabotage attempts
Unfortunately, I never had storj docker containers starting correctly after reboot or shutdown. I tried many things. They just stay dead. I think default expectation for storj is to magically turn itself on after restart, but I never had this privilige. I don’t know if this is my docker version issue, my OS issue (Devuan, which is a Debian system without systemd), or something else. I wasted a lot of time trying to have storj working upon reboot without fruition, so I wrote this script, and it works now.
This script will do the following upon reboot or manual call:
docker stop -t 300 (nodename) (if node is running)
docker rm (nodename) (if it exists)
docker run -d (all parameters)
It goes the job, I tested it with many reboots. Sounds correct?
The --restart unless-stopped option in Docker provides automatic restart behavior, which can be useful for ensuring your nodes come back online after a reboot or a Docker daemon restart. Here’s an overview of the restart policy options you could use:
–restart unless-stopped:
Container restarts automatically unless explicitly stopped.
If your primary goal is to have the nodes running after reboots without manually starting them, this option is generally suitable.
Never worked for me.
My next best could be: --restart on-failure:10
That will restart node docker instance if it crashes, up to maximum of 10 retries, but will not try to start after reboot, since I am doing it by script anyway.
It seems, SERVER_ADDRESS is mandatory to declare, unless you declare it in config.yaml. My node failed after I reverted my changes in yaml file, trying to consolidate all powers to the script. So now, I brought STORJ_CONSOLE_ADDRESS back to the script, and it’s working. For simplicity, I will try to get everything in the script to keep all config files in nodes intact.
It sounds like you didn’t enable docker to start automatically.
This is only mean, that you changed server.address: option in your config.yaml for that node. Otherwise it shouldn’t work, because the default value is
I’ve been on that page. I don’t have systemd, but SysVinit on Devuan system. Devuan is a Debian Stable fork but with systemd stripped out.
I also don’t have containerd service in my system. containerd package is installed though, and everything is working. But not autostart of storj.
I’ve got Ubuntu and Debian, both indeed always restarting at reboot. So, I had to take care everything was mounted fine before the actual restart (although, if not the case there were some measures implemented by STORJ preventing any harm).
And I can’t emphasize the fact you need to keep it as simple as possible: the example I gave you is also a second node on the same system. Always working fine, without any further ado or adaptations. I usually don’t even adapt any other options in the config.yaml.
Besides, is quite uneasy to adapt your script for every new node.
I myself used in the past:
Mount all drives under storj/nd[0-9]*
For-each on all these folders
Data port = 28966 + number following the nd-foldername above (starting with 1).
Dashboard port = 14001 + number following the nd-foldername above (starting with 1).
Size as calculated above.
So I didn’t have to keep the arrays up-to-date.
No, you don’t. As long as you don’t complicate the stuff. Only necessary if you didn’t use docker. With docker it’s like you’re running several virtual systems / VMs, in which you manage the NAT with -p option.
Why do you assign 4G to each docker instance? Mine are using 250M at maximum…
Also, you removed commented out line, that line doesn’t affect anything.
And lastly STORJ_SERVER_ADDRESS, yesterday my second node failed due to lack of that. I will try it again with suggestions you made.
No special adaptation needed. Everything is declared in the table here:
I can add as many nodes as I want, easily. All I need to do beforehand, is to format the partition and mount it where it should be.
And each mount point is a serial number of the drive. If anything disappears, I will know exactly which drive died.
Good. And what do you use now, if anything?
Agreed
I will be happy to decrease it later. Better to declare 4G than not declare anything.
Since I wanted my nodes to have all a local IP, I ended up using lxc-containers since docker doesn’t support local area networking out of the box. Than you have to do complicated stuff, like assigning multiple LAN-IPs to your ethernet adapter using macvlan. A solution that broke everytime when the network went down for any reason, like just rebooting the router.
I still use docker, but it would be light weighter if I just used the binary. But then I also have to take care of the updating process myself. So I’m not up to spending the time now.
Thanks, I’ve read these threads and I’ve tried adding option they arrived that to docker, re-launching nodes with this and then doing reboot (due to system updates). Unfortunately, nodes still didn’t start after reboot. So I will stick to my trusted script. I have added further new nodes to it, everything works nicely.