Skip to content

Commit

Permalink
Merge pull request #4274 from peaklabs-dev/fix-installer-on-pi
Browse files Browse the repository at this point in the history
Feat: Show private IP and port in installation script for easier Raspberry PI installation.
  • Loading branch information
andrasbacsai authored Nov 14, 2024
2 parents 3a46423 + 2c91c46 commit 4f15ffa
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,24 @@ echo -e "\033[0;35m
|___/
\033[0m"
echo -e "\nYour instance is ready to use."
echo -e "Please visit http://$(curl -4s https://ifconfig.io):8000 to get started.\n"
echo -e "WARNING: We recommend you to backup your /data/coolify/source/.env file to a safe location, outside of this server."
echo -e "You can access Coolify through:"
echo -e "- Public IP: http://$(curl -4s https://ifconfig.io):8000"

set +e
DEFAULT_PRIVATE_IP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
PRIVATE_IPS=$(hostname -I)
set -e

if [ -n "$PRIVATE_IPS" ]; then
echo -e "If your Public IP is not accessible, you can use the following Private IPs:\n"
for IP in $PRIVATE_IPS; do
if [ "$IP" == "$DEFAULT_PRIVATE_IP" ]; then
echo -e "http://$DEFAULT_PRIVATE_IP:8000 (default)"
else
echo -e "http://$IP:8000"
fi
done
fi
echo -e "\n"
echo -e "WARNING: It is highly recommended to backup your Environment variables file (/data/coolify/source/.env) to a safe location, outside of this server (e.g. into a Password Manager).\n"
cp /data/coolify/source/.env /data/coolify/source/.env.backup

0 comments on commit 4f15ffa

Please sign in to comment.