Sometimes i have to restart my amazon EC2 instance, and then it gives me a dynamic IP address. This means 2 things.
I need to update CloudFlare “IP Access Rules” to allow the new IP to not be blocked for my domain protection
I need to update the SSH Ip/hostname in the n8n credential area so all my SSH nodes in all the workflows can use the new IP when trying to execute.
Im currently in the process of using the CloudFlare API to be able to update rules (just need a script to run when the box reboots to trigger this new n8n workflow.
That is an interesting one, The only bit that may be tricky is changing the n8n credentials automatically but it looks like you can use expressions for the hostname. I think what I would do is have n8n update an env variable as part of the API update calls and use that or store it somewhere else like a local file and just read the file at the start of the workflow to get the IP to use.
The other option would be to just get an elastic IP so your EC2 instance always has the same IP then it doesn’t matter.