diff --git a/other/nightly/install.sh b/other/nightly/install.sh index bb538367f..7e8c4482a 100755 --- a/other/nightly/install.sh +++ b/other/nightly/install.sh @@ -446,7 +446,7 @@ if [ -x "$(command -v snap)" ]; then fi install_docker() { - curl -s https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh 2>&1 + curl -s https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh 2>&1 || true if ! [ -x "$(command -v docker)" ]; then curl -s https://get.docker.com | sh -s -- --version ${DOCKER_VERSION} 2>&1 if ! [ -x "$(command -v docker)" ]; then @@ -822,8 +822,17 @@ echo -e "\033[0;35m \____\___/|_| |_|\__, |_| \__,_|\__|\__,_|_|\__,_|\__|_|\___/|_| |_|___(_) |___/ \033[0m" + +IPV4_PUBLIC_IP=$(curl -4s https://ifconfig.io || true) +IPV6_PUBLIC_IP=$(curl -6s https://ifconfig.io || true) + echo -e "\nYour instance is ready to use!\n" -echo -e "You can access Coolify through your Public IP: http://$(curl -4s https://ifconfig.io):8000" +if [ -n "$IPV4_PUBLIC_IP" ]; then + echo -e "You can access Coolify through your Public IPV4: http://$(curl -4s https://ifconfig.io):8000" +fi +if [ -n "$IPV6_PUBLIC_IP" ]; then + echo -e "You can access Coolify through your Public IPv6: http://[$IPV6_PUBLIC_IP]:8000" +fi set +e DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p') diff --git a/other/nightly/upgrade.sh b/other/nightly/upgrade.sh index 0d96755d8..c948f1368 100644 --- a/other/nightly/upgrade.sh +++ b/other/nightly/upgrade.sh @@ -30,7 +30,10 @@ fi # Make sure coolify network exists # It is created when starting Coolify with docker compose -docker network create --attachable coolify 2>/dev/null +if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then + echo "Failed to create coolify network with ipv6. Trying without ipv6..." + docker network create --attachable coolify 2>/dev/null +fi # docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null if [ -f /data/coolify/source/docker-compose.custom.yml ]; then diff --git a/scripts/install.sh b/scripts/install.sh index 1968dae11..ac9e469bd 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -446,7 +446,7 @@ if [ -x "$(command -v snap)" ]; then fi install_docker() { - curl -s https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh 2>&1 + curl -s https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh 2>&1 || true if ! [ -x "$(command -v docker)" ]; then curl -s https://get.docker.com | sh -s -- --version ${DOCKER_VERSION} 2>&1 if ! [ -x "$(command -v docker)" ]; then @@ -822,8 +822,17 @@ echo -e "\033[0;35m \____\___/|_| |_|\__, |_| \__,_|\__|\__,_|_|\__,_|\__|_|\___/|_| |_|___(_) |___/ \033[0m" + +IPV4_PUBLIC_IP=$(curl -4s https://ifconfig.io || true) +IPV6_PUBLIC_IP=$(curl -6s https://ifconfig.io || true) + echo -e "\nYour instance is ready to use!\n" -echo -e "You can access Coolify through your Public IP: http://$(curl -4s https://ifconfig.io):8000" +if [ -n "$IPV4_PUBLIC_IP" ]; then + echo -e "You can access Coolify through your Public IPV4: http://$(curl -4s https://ifconfig.io):8000" +fi +if [ -n "$IPV6_PUBLIC_IP" ]; then + echo -e "You can access Coolify through your Public IPv6: http://[$IPV6_PUBLIC_IP]:8000" +fi set +e DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p') diff --git a/scripts/upgrade.sh b/scripts/upgrade.sh index cabc7cc9b..71959c8b9 100644 --- a/scripts/upgrade.sh +++ b/scripts/upgrade.sh @@ -30,7 +30,10 @@ fi # Make sure coolify network exists # It is created when starting Coolify with docker compose -docker network create --attachable coolify 2>/dev/null +if ! docker network create --attachable --ipv6 coolify 2>/dev/null; then + echo "Failed to create coolify network with ipv6. Trying without ipv6..." + docker network create --attachable coolify 2>/dev/null +fi # docker network create --attachable --driver=overlay coolify-overlay 2>/dev/null if [ -f /data/coolify/source/docker-compose.custom.yml ]; then