Update IP without restart

Every 24 hours. Forced by ISP.

Okā€¦ that really sucks. Sorry to hear that. I have no clue why they would even do that since they would still immediately have to assign you a new IP anyway. So, what exactly is your objection to DDNS?

Edit: Btw, even with DDNS or a custom script, it takes time to update the IP. Downtime due to this delay might be as bad or even worse compared to just restarting your node.

Wow is there any possible way to change ISP or is there limited ISPs where your from, cause every 24 hours seems excessiveā€¦
You are better off using ddns and updating it manually

You can write your log into a file which will survive a restart.

Sounds like he lives in Germany. Itā€™s quite common there that the ISP changes IPs evry 24h.

Well that is standard here. Basically everytime you disconnect from the ISP you get assigned a new IP. After 24 hrs ISP does a force disconnect. So when doing a restart on every change of IP it will never go beyond 24 hrs. uptime.

I donā€™t want to rely on 3rd party when it is crucial to server uptime. Also in general the ā€œfreeā€ versions of DDNS come with annoying requirements such as frequent mandatory confirmation or minimum updating intervals. For less worrying or maintenance free service or better support you would have to pay for the service.
As network discovery is crucial for storj it is awkward for them to build this software without the ability to detect ip changes. I donā€™t know who came up with such an idea.
The perfect solution would be that the node would auto detect a change of ip and re-advertises itself to the satellite with the new ip without interaction required.
The second best solution would be that I take care of ip detection, pass the new ip to the node and it then advertises the new ip to the satellite without having to restart. (Something like /etc/init.d/storjd -force-update-ip) As restarting surely comes with a massive overhead and kills all stats and impacts reliability and probably reputation, this is totally unnecessary for a simple thing like change of ip.

Correct.

Do like I do and have your own DDNS servers. There was a time when no-ip.org got its domains blacklisted for a while, after that I set up my own DDNS (since I already had a domain). I have two DNS servers from different companies (the servers are the smallest VMs the companies offer, something liek 1 core, 1GB RAM) and a script updates them if my IP changes.

Try this:

No need to confirm your domain every 30 days like no-ip & works like a charm.

Also its FREE FREE FREE !!!

Thanks for the link and the suggestion to run my own DDNS servers. However this is either a workaround or requires additional server/setup and still relying on 3rd party.
I really appreciate these suggestions and I might make use of them but still I believe the most appropriate solution would to handle ip detection and updating locally as described either bei node autodetection or by manual/scripted refresh.
It is a bit weird that such a scenario has not been considered during development.

Have you added this idea on ideas.storj.io ? I think youā€™ve sufficiently made your point, but the devs donā€™t see every forum topic. If you want storj to consider this. Thatā€™s the place they look at to determine what gets added or not. At the least the devs who decide this will definitely see and consider your idea if you post it there.

I was having an issue with to many connection requests from my DDNS and them wanting to charge me more. So I did exactly what you are asking and just made a script to pull my current public IP each time the server starts.

#!/bin/bash

echo "Stopping Docker Container"
sudo docker stop -t 300 storagenode

echo "Removing old container config"
sudo docker rm storagenode

echo "Starting storj container"
pubip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
port="28967"
wallet="<your wallet address here>"
email="<your email here>"
cert="/path/to/cert"
dir="/path/to/storage"
bandwith="20TB"
storage="3TB"


sudo docker run -d --restart unless-stopped -p $port:$port -e WALLET=$wallet -e EMAIL=$email -e ADDRESS="${pubip}:${port}" -e BANDWIDTH=$bandwith -e STORAGE=$storage --mount type=bind,source=$cert,destination=/app/identity --mount type=bind,source=$dir,destination=/app/config --name storagenode storjlabs/storagenode:alpha

echo "nodeV2 Started"

The tag for the image should be beta.
Also, you can omit the ADDRESS option, then it will be taken from the contact.external-address: parameter of the config.yaml. Then only change the address in that parameter with sed for example and restart the container.
The restart is quickly than a creation

1 Like

Done that: Ideas & Suggestions - Storj Community Forum (official)

1 Like

Well, I can recommend afraid.org if you want a simple DDNS service that works.
It has been up since 2001 and I personally used it for 7 years until I moved to my own DNS-infrastructure.

1 Like