diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index 24273cdf0..07379c3ef 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -214,7 +214,7 @@ while true; do sleep 10 done -if ! ip=$(curl -s --fail --connect-timeout 2 --max-time 2 https://api.cloudron.io/api/v1/helper/public_ip | sed -n -e 's/.*"ip": "\(.*\)"/\1/p'); then +if ! ip=$(curl -s --fail --connect-timeout 2 --max-time 2 https://ipv4.api.cloudron.io/api/v1/helper/public_ip | sed -n -e 's/.*"ip": "\(.*\)"/\1/p'); then ip='' fi if [[ -z "${setupToken}" ]]; then diff --git a/setup/start/cloudron-motd b/setup/start/cloudron-motd index b9651fe46..e5abacbac 100755 --- a/setup/start/cloudron-motd +++ b/setup/start/cloudron-motd @@ -7,7 +7,7 @@ printf "**********************************************************************\n if [[ -z "$(ls -A /home/yellowtent/platformdata/addons/mail/dkim)" ]]; then if [[ -f /tmp/.cloudron-motd-cache ]]; then ip=$(cat /tmp/.cloudron-motd-cache) - elif ! ip=$(curl --fail --connect-timeout 2 --max-time 2 -q https://api.cloudron.io/api/v1/helper/public_ip | sed -n -e 's/.*"ip": "\(.*\)"/\1/p'); then + elif ! ip=$(curl --fail --connect-timeout 2 --max-time 2 -q https://ipv4.api.cloudron.io/api/v1/helper/public_ip | sed -n -e 's/.*"ip": "\(.*\)"/\1/p'); then ip='' fi echo "${ip}" > /tmp/.cloudron-motd-cache diff --git a/src/sysinfo/generic.js b/src/sysinfo/generic.js index fca8aa8e4..b0a9231bd 100644 --- a/src/sysinfo/generic.js +++ b/src/sysinfo/generic.js @@ -20,7 +20,7 @@ async function getServerIp(config) { return await promiseRetry({ times: 10, interval: 5000, debug }, async () => { debug('getServerIp: getting server IP'); - const [networkError, response] = await safe(superagent.get('https://api.cloudron.io/api/v1/helper/public_ip') + const [networkError, response] = await safe(superagent.get('https://ipv4.api.cloudron.io/api/v1/helper/public_ip') .timeout(30 * 1000) .ok(() => true));