diff --git a/ct/cronicle.sh b/ct/cronicle.sh index 1e32fc594..1e846027b 100644 --- a/ct/cronicle.sh +++ b/ct/cronicle.sh @@ -43,7 +43,6 @@ function update_script() { if [ "$UPD" == "2" ]; then NODE_VERSION="22" setup_nodejs if check_for_gh_release "cronicle" "jhuckaby/Cronicle"; then - IP=$(hostname -I | awk '{print $1}') msg_info "Installing Dependencies" $STD apt-get install -y \ git \ @@ -59,7 +58,7 @@ function update_script() { cd /opt/cronicle $STD npm install $STD node bin/build.js dist - sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json + sed -i "s/localhost:3012/${LOCAL_IP}:3012/g" /opt/cronicle/conf/config.json $STD /opt/cronicle/bin/control.sh start msg_ok "Installed Cronicle Worker" echo -e "\n Add Masters secret key to /opt/cronicle/conf/config.json \n" diff --git a/ct/gitea-mirror.sh b/ct/gitea-mirror.sh index e3acbc7a0..df464f06b 100644 --- a/ct/gitea-mirror.sh +++ b/ct/gitea-mirror.sh @@ -49,14 +49,13 @@ function update_script() { if [[ ! -f /opt/gitea-mirror.env ]]; then msg_info "Detected old Enviroment, updating files" APP_SECRET=$(openssl rand -base64 32) - HOST_IP=$(hostname -I | awk '{print $1}') cat </opt/gitea-mirror.env # See here for config options: https://github.com/RayLabsHQ/gitea-mirror/blob/main/docs/ENVIRONMENT_VARIABLES.md NODE_ENV=production HOST=0.0.0.0 PORT=4321 DATABASE_URL=sqlite://data/gitea-mirror.db -BETTER_AUTH_URL=http://${HOST_IP}:4321 +BETTER_AUTH_URL=http://${LOCAL_IP}:4321 BETTER_AUTH_SECRET=${APP_SECRET} npm_package_version=${APP_VERSION} EOF diff --git a/ct/homeassistant.sh b/ct/homeassistant.sh index 06eb7a974..4a91af857 100644 --- a/ct/homeassistant.sh +++ b/ct/homeassistant.sh @@ -69,7 +69,6 @@ function update_script() { exit fi if [ "$UPD" == "4" ]; then - IP=$(hostname -I | awk '{print $1}') msg_info "Installing FileBrowser" RELEASE=$(curl -fsSL https://api.github.com/repos/filebrowser/filebrowser/releases/latest | grep -o '"tag_name": ".*"' | sed 's/"//g' | sed 's/tag_name: //g') $STD curl -fsSL https://github.com/filebrowser/filebrowser/releases/download/v2.23.0/linux-amd64-filebrowser.tar.gz | tar -xzv -C /usr/local/bin @@ -95,7 +94,7 @@ WantedBy=default.target" >$service_path msg_ok "Completed successfully!\n" echo -e "FileBrowser should be reachable by going to the following URL. - ${BL}http://$IP:8080${CL} admin|helper-scripts.com\n" + ${BL}http://$LOCAL_IP:8080${CL} admin|helper-scripts.com\n" exit fi } diff --git a/ct/n8n.sh b/ct/n8n.sh index f8b11564a..3e668b305 100644 --- a/ct/n8n.sh +++ b/ct/n8n.sh @@ -29,13 +29,12 @@ function update_script() { fi if [ ! -f /opt/n8n.env ]; then sed -i 's|^Environment="N8N_SECURE_COOKIE=false"$|EnvironmentFile=/opt/n8n.env|' /etc/systemd/system/n8n.service - HOST_IP=$(hostname -I | awk '{print $1}') mkdir -p /opt cat </opt/n8n.env N8N_SECURE_COOKIE=false N8N_PORT=5678 N8N_PROTOCOL=http -N8N_HOST=$HOST_IP +N8N_HOST=$LOCAL_IP EOF fi NODE_VERSION="22" setup_nodejs diff --git a/ct/netvisor.sh b/ct/netvisor.sh index 62196966e..3955bf078 100644 --- a/ct/netvisor.sh +++ b/ct/netvisor.sh @@ -49,7 +49,6 @@ function update_script() { if [[ -f /opt/netvisor/oidc.toml ]]; then mv /opt/netvisor/oidc.toml /opt/scanopy/oidc.toml fi - LOCAL_IP="$(hostname -I | awk '{print $1}')" if ! grep -q "PUBLIC_URL" /opt/scanopy/.env; then sed -i "\|_PATH=|a\NETVISOR_PUBLIC_URL=http://${LOCAL_IP}:60072" /opt/scanopy/.env fi diff --git a/ct/podman-homeassistant.sh b/ct/podman-homeassistant.sh index 50f3464cc..bdedb0c5b 100644 --- a/ct/podman-homeassistant.sh +++ b/ct/podman-homeassistant.sh @@ -65,7 +65,6 @@ function update_script() { exit fi if [ "$UPD" == "3" ]; then - import_local_ip msg_info "Installing FileBrowser" $STD curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash $STD filebrowser config init -a '0.0.0.0' diff --git a/ct/scanopy.sh b/ct/scanopy.sh index 61e3ac3df..9363f566f 100644 --- a/ct/scanopy.sh +++ b/ct/scanopy.sh @@ -56,7 +56,6 @@ function update_script() { if [[ -f /opt/scanopy.oidc.toml ]]; then mv /opt/scanopy.oidc.toml /opt/scanopy/oidc.toml fi - LOCAL_IP="$(hostname -I | awk '{print $1}')" if ! grep -q "PUBLIC_URL" /opt/scanopy/.env; then sed -i "\|_PATH=|a\scanopy_PUBLIC_URL=http://${LOCAL_IP}:60072" /opt/scanopy/.env fi diff --git a/install/2fauth-install.sh b/install/2fauth-install.sh index a8b097364..bb70fb82f 100644 --- a/install/2fauth-install.sh +++ b/install/2fauth-install.sh @@ -17,12 +17,11 @@ msg_info "Installing Dependencies" $STD apt install -y nginx msg_ok "Installed Dependencies" -PHP_VERSION="8.4" -PHP_MODULE="common,ctype,fileinfo,mysql,tokenizer,dom,redis" PHP_FPM="YES" setup_php +PHP_VERSION="8.4" PHP_MODULE="common,ctype,fileinfo,mysql,tokenizer,dom,redis" PHP_FPM="YES" setup_php setup_composer setup_mariadb MARIADB_DB_NAME="2fauth_db" MARIADB_DB_USER="2fauth" setup_mariadb_db -import_local_ip + fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth" "tarball" msg_info "Setup 2FAuth" diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh index 396ba18ca..50d67e3d0 100644 --- a/install/adventurelog-install.sh +++ b/install/adventurelog-install.sh @@ -26,8 +26,8 @@ PYTHON_VERSION="3.13" setup_uv NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs PG_VERSION="17" PG_MODULES="postgis" setup_postgresql PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" PG_DB_EXTENSIONS="postgis" setup_postgresql_db + fetch_and_deploy_gh_release "adventurelog" "seanmorley15/adventurelog" "tarball" -import_local_ip msg_info "Installing AdventureLog (Patience)" SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)" diff --git a/install/bar-assistant-install.sh b/install/bar-assistant-install.sh index 1de0b68fc..9f25c98fe 100644 --- a/install/bar-assistant-install.sh +++ b/install/bar-assistant-install.sh @@ -75,7 +75,6 @@ mkdir -p /opt/bar-assistant/resources/data curl -fsSL https://github.com/bar-assistant/data/archive/refs/heads/v5.tar.gz | tar -xz --strip-components=1 -C /opt/bar-assistant/resources/data MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//') MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//') -LOCAL_IP=$(hostname -I | awk '{print $1}') sed -i -e "s|^APP_URL=|APP_URL=http://${LOCAL_IP}/bar/|" \ -e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://127.0.0.1:7700|" \ -e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \ diff --git a/install/bookstack-install.sh b/install/bookstack-install.sh index 3846765f1..b6c645f22 100644 --- a/install/bookstack-install.sh +++ b/install/bookstack-install.sh @@ -21,8 +21,8 @@ PHP_MODULE="ldap,tidy,bz2,mysqli" PHP_FPM="YES" PHP_APACHE="YES" PHP_VERSION="8. setup_composer setup_mariadb MARIADB_DB_NAME="bookstack_db" MARIADB_DB_USER="bookstack_user" setup_mariadb_db + fetch_and_deploy_gh_release "bookstack" "BookStackApp/BookStack" "tarball" -import_local_ip msg_info "Configuring Bookstack (Patience)" cd /opt/bookstack diff --git a/install/cronicle-install.sh b/install/cronicle-install.sh index 69761b1ab..3abca494e 100644 --- a/install/cronicle-install.sh +++ b/install/cronicle-install.sh @@ -17,11 +17,10 @@ NODE_VERSION="22" setup_nodejs fetch_and_deploy_gh_release "cronicle" "jhuckaby/Cronicle" "tarball" msg_info "Configuring Cronicle Primary Server" -IP=$(hostname -I | awk '{print $1}') cd /opt/cronicle $STD npm install $STD node bin/build.js dist -sed -i "s/localhost:3012/${IP}:3012/g" /opt/cronicle/conf/config.json +sed -i "s/localhost:3012/${LOCAL_IP}:3012/g" /opt/cronicle/conf/config.json $STD /opt/cronicle/bin/control.sh setup $STD /opt/cronicle/bin/control.sh start msg_ok "Configured Cronicle Primary Server" diff --git a/install/cryptpad-install.sh b/install/cryptpad-install.sh index a86d10f04..ef8188f7b 100644 --- a/install/cryptpad-install.sh +++ b/install/cryptpad-install.sh @@ -28,8 +28,7 @@ $STD npm ci $STD npm run install:components $STD npm run build cp config/config.example.js config/config.js -IP=$(hostname -I | awk '{print $1}') -sed -i "51s/localhost/${IP}/g" /opt/cryptpad/config/config.js +sed -i "51s/localhost/${LOCAL_IP}/g" /opt/cryptpad/config/config.js sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js if [[ "$onlyoffice" =~ ^[Yy]$ ]]; then $STD bash -c "./install-onlyoffice.sh --accept-license" diff --git a/install/docmost-install.sh b/install/docmost-install.sh index 518d2e0b9..cae026ca7 100644 --- a/install/docmost-install.sh +++ b/install/docmost-install.sh @@ -22,7 +22,6 @@ msg_ok "Installed Dependencies" NODE_VERSION="22" NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/docmost/docmost/main/package.json | jq -r '.packageManager | split("@")[1]')" setup_nodejs PG_VERSION="16" setup_postgresql PG_DB_NAME="docmost_db" PG_DB_USER="docmost_user" setup_postgresql_db -import_local_ip fetch_and_deploy_gh_release "docmost" "docmost/docmost" "tarball" msg_info "Configuring Docmost (Patience)" diff --git a/install/endurain-install.sh b/install/endurain-install.sh index 6cd184795..0260afaae 100644 --- a/install/endurain-install.sh +++ b/install/endurain-install.sh @@ -21,7 +21,6 @@ PYTHON_VERSION="3.13" setup_uv NODE_VERSION="24" setup_nodejs PG_VERSION="17" PG_MODULES="postgis" setup_postgresql PG_DB_NAME="enduraindb" PG_DB_USER="endurain" setup_postgresql_db -import_local_ip fetch_and_deploy_gh_release "endurain" "endurain-project/endurain" "tarball" "latest" "/opt/endurain" msg_info "Setting up Endurain" diff --git a/install/firefly-install.sh b/install/firefly-install.sh index 5ad4c0283..046f756b7 100644 --- a/install/firefly-install.sh +++ b/install/firefly-install.sh @@ -17,7 +17,7 @@ PHP_VERSION="8.4" PHP_APACHE="YES" PHP_MODULE="mysql" setup_php setup_composer setup_mariadb MARIADB_DB_NAME="firefly" MARIADB_DB_USER="firefly" setup_mariadb_db -import_local_ip + fetch_and_deploy_gh_release "firefly" "firefly-iii/firefly-iii" "prebuild" "latest" "/opt/firefly" "FireflyIII-*.zip" fetch_and_deploy_gh_release "dataimporter" "firefly-iii/data-importer" "prebuild" "latest" "/opt/firefly/dataimporter" "DataImporter-v*.tar.gz" diff --git a/install/gitea-mirror-install.sh b/install/gitea-mirror-install.sh index 5b2a86a3d..8455b59d0 100644 --- a/install/gitea-mirror-install.sh +++ b/install/gitea-mirror-install.sh @@ -39,14 +39,13 @@ msg_ok "Installed gitea-mirror" msg_info "Creating Services" APP_SECRET=$(openssl rand -base64 32) APP_VERSION=$(grep -o '"version": *"[^"]*"' package.json | cut -d'"' -f4) -HOST_IP=$(hostname -I | awk '{print $1}') cat </opt/gitea-mirror.env # See here for config options: https://github.com/RayLabsHQ/gitea-mirror/blob/main/docs/ENVIRONMENT_VARIABLES.md NODE_ENV=production HOST=0.0.0.0 PORT=4321 DATABASE_URL=sqlite://data/gitea-mirror.db -BETTER_AUTH_URL=http://${HOST_IP}:4321 +BETTER_AUTH_URL=http://${LOCAL_IP}:4321 BETTER_AUTH_SECRET=${APP_SECRET} npm_package_version=${APP_VERSION} EOF diff --git a/install/healthchecks-install.sh b/install/healthchecks-install.sh index c8ed7f51a..d60e1249e 100644 --- a/install/healthchecks-install.sh +++ b/install/healthchecks-install.sh @@ -54,7 +54,6 @@ $STD pip install --upgrade pip wheel $STD pip install gunicorn -r requirements.txt msg_ok "Installed Python packages" -LOCAL_IP=$(hostname -I | awk '{print $1}') cat </opt/healthchecks/hc/local_settings.py DEBUG = False diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 86a474459..e8ee49f1e 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -18,7 +18,6 @@ $STD apt-get install -y jq msg_ok "Installed Dependencies" NODE_VERSION="22" NODE_MODULE="pnpm@latest" setup_nodejs -import_local_ip fetch_and_deploy_gh_release "homepage" "gethomepage/homepage" "tarball" RELEASE=$(get_latest_github_release "gethomepage/homepage") diff --git a/install/infisical-install.sh b/install/infisical-install.sh index 637f7973b..cb010ad43 100644 --- a/install/infisical-install.sh +++ b/install/infisical-install.sh @@ -21,7 +21,6 @@ msg_ok "Installed Dependencies" PG_VERSION="17" setup_postgresql PG_DB_NAME="infisical_db" PG_DB_USER="infisical" setup_postgresql_db -import_local_ip msg_info "Setting up Infisical Repository" setup_deb822_repo \ diff --git a/install/inventree-install.sh b/install/inventree-install.sh index 430211a48..75205c3a4 100644 --- a/install/inventree-install.sh +++ b/install/inventree-install.sh @@ -28,7 +28,6 @@ $STD apt install -y inventree msg_ok "Installed InvenTree" msg_info "Configuring InvenTree" -LOCAL_IP="$(hostname -I | awk '{print $1}')" if [[ -f /etc/inventree/config.yaml ]]; then sed -i "s|site_url:.*|site_url: http://${LOCAL_IP}|" /etc/inventree/config.yaml fi diff --git a/install/investbrain-install.sh b/install/investbrain-install.sh index 9e9bc3a05..80de472ad 100644 --- a/install/investbrain-install.sh +++ b/install/investbrain-install.sh @@ -33,7 +33,6 @@ setup_composer NODE_VERSION="22" setup_nodejs PG_VERSION="17" setup_postgresql PG_DB_NAME="investbrain" PG_DB_USER="investbrain" setup_postgresql_db -import_local_ip fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain" diff --git a/install/invoiceninja-install.sh b/install/invoiceninja-install.sh index b62930f49..1890c8181 100644 --- a/install/invoiceninja-install.sh +++ b/install/invoiceninja-install.sh @@ -36,7 +36,7 @@ msg_ok "Installed Dependencies" setup_mariadb MARIADB_DB_NAME="invoiceninja" MARIADB_DB_USER="invoiceninja" setup_mariadb_db PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,curl,gd,gmp,imagick,intl,mbstring,mysql,soap,xml,zip" setup_php -import_local_ip + fetch_and_deploy_gh_release "invoiceninja" "invoiceninja/invoiceninja" "prebuild" "latest" "/opt/invoiceninja" "invoiceninja.tar.gz" msg_info "Configuring InvoiceNinja" diff --git a/install/joplin-server-install.sh b/install/joplin-server-install.sh index 2ce1193a8..a1fe71f34 100644 --- a/install/joplin-server-install.sh +++ b/install/joplin-server-install.sh @@ -28,8 +28,8 @@ $STD pm2 install pm2-logrotate $STD pm2 set pm2-logrotate:max_size 100MB $STD pm2 set pm2-logrotate:retain 5 $STD pm2 set pm2-logrotate:compress tr + fetch_and_deploy_gh_release "joplin-server" "laurent22/joplin" "tarball" -import_local_ip msg_info "Setting up Joplin Server (Patience)" cd /opt/joplin-server diff --git a/install/koel-install.sh b/install/koel-install.sh index 72d6f684e..0fdd83c59 100644 --- a/install/koel-install.sh +++ b/install/koel-install.sh @@ -21,7 +21,6 @@ $STD apt install -y \ locales msg_ok "Installed Dependencies" -import_local_ip PG_VERSION="16" setup_postgresql PG_DB_NAME="koel" PG_DB_USER="koel" setup_postgresql_db PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bz2,exif,imagick,pgsql,sqlite3" setup_php diff --git a/install/kubo-install.sh b/install/kubo-install.sh index f12abf61f..cc86dae3b 100644 --- a/install/kubo-install.sh +++ b/install/kubo-install.sh @@ -21,8 +21,7 @@ $STD ln -s /usr/local/kubo/ipfs /usr/local/bin/ipfs $STD ipfs init ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001 ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080 -LXCIP=$(hostname -I | awk '{print $1}') -ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://${LXCIP}:5001\", \"http://localhost:3000\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\", \"http://0.0.0.0:5001\"]" +ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://${LOCAL_IP}:5001\", \"http://localhost:3000\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\", \"http://0.0.0.0:5001\"]" ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]' msg_ok "Configured IPFS" diff --git a/install/kutt-install.sh b/install/kutt-install.sh index 70380b302..05526ec98 100644 --- a/install/kutt-install.sh +++ b/install/kutt-install.sh @@ -19,7 +19,6 @@ read -rp "${TAB3}Enter your choice (default: i): " ssl_choice ssl_choice=${ssl_choice:-i} case "${ssl_choice,,}" in i) - import_local_ip DEFAULT_HOST="$LOCAL_IP" msg_info "Configuring Caddy" diff --git a/install/librenms-install.sh b/install/librenms-install.sh index b7b150af8..101e5289f 100644 --- a/install/librenms-install.sh +++ b/install/librenms-install.sh @@ -78,11 +78,10 @@ sed -i "s/listen = \/run\/php\/php8.4-fpm.sock/listen = \/run\/php-fpm-librenms. msg_ok "Configured PHP-FPM" msg_info "Configure Nginx" -IP_ADDR=$(hostname -I | awk '{print $1}') cat >/etc/nginx/sites-enabled/librenms <<'EOF' server { listen 80; - server_name ${IP_ADDR}; + server_name ${LOCAL_IP}; root /opt/librenms/html; index index.php; diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 65e584afd..138cb8302 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -50,10 +50,9 @@ fi $STD yarn $STD npx playwright install-deps $STD npx playwright install -IP=$(hostname -I | awk '{print $1}') cat </opt/linkwarden/.env NEXTAUTH_SECRET=${SECRET_KEY} -NEXTAUTH_URL=http://${IP}:3000 +NEXTAUTH_URL=http://${LOCAL_IP}:3000 DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME} EOF $STD yarn prisma:generate diff --git a/install/mattermost-install.sh b/install/mattermost-install.sh index 2f1ac277c..4a4d27df2 100644 --- a/install/mattermost-install.sh +++ b/install/mattermost-install.sh @@ -44,14 +44,13 @@ $STD sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO $DB_USER; msg_ok "Set up PostgreSQL" msg_info "Installing Mattermost" -IPADDRESS=$(hostname -I | awk '{print $1}') curl -fsSL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg sh -c 'curl -fsSL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s mattermost' >/dev/null $STD apt update $STD apt install -y mattermost $STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \ - -e "/SiteURL/c\ \"SiteURL\": \"http://$IPADDRESS:8065\"," /opt/mattermost/config/config.json + -e "/SiteURL/c\ \"SiteURL\": \"http://$LOCAL_IP:8065\"," /opt/mattermost/config/config.json systemctl enable -q --now mattermost msg_ok "Installed Mattermost" diff --git a/install/mealie-install.sh b/install/mealie-install.sh index 3566e76d8..20f435010 100644 --- a/install/mealie-install.sh +++ b/install/mealie-install.sh @@ -40,7 +40,6 @@ msg_ok "Installed Python Dependencies" msg_info "Building Frontend" MEALIE_VERSION=$(<$HOME/.mealie) -CONTAINER_IP=$(hostname -I | awk '{print $1}') export NUXT_TELEMETRY_DISABLED=1 cd /opt/mealie/frontend $STD sed -i "s|https://github.com/mealie-recipes/mealie/commit/|https://github.com/mealie-recipes/mealie/releases/tag/|g" /opt/mealie/frontend/pages/admin/site-settings.vue @@ -79,7 +78,7 @@ POSTGRES_DB=${PG_DB_NAME} PRODUCTION=true HOST=0.0.0.0 PORT=9000 -BASE_URL=http://${CONTAINER_IP}:9000 +BASE_URL=http://${LOCAL_IP}:9000 EOF msg_ok "Wrote Environment File" diff --git a/install/mediamanager-install.sh b/install/mediamanager-install.sh index 6a3284fae..dcd092bcb 100644 --- a/install/mediamanager-install.sh +++ b/install/mediamanager-install.sh @@ -61,7 +61,6 @@ $STD /usr/local/bin/uv sync --locked --active -n -p cpython3.13 --managed-python msg_ok "Configured MediaManager" msg_info "Creating config and start script" -LOCAL_IP="$(hostname -I | awk '{print $1}')" SECRET="$(openssl rand -hex 32)" sed -e "s/localhost:8/$LOCAL_IP:8/g" \ -e "s|/data/|$MEDIA_DIR/|g" \ diff --git a/install/meilisearch-install.sh b/install/meilisearch-install.sh index 2944737f4..9b5361ee6 100644 --- a/install/meilisearch-install.sh +++ b/install/meilisearch-install.sh @@ -18,7 +18,6 @@ fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" msg_info "Configuring ${APPLICATION}" curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml MASTER_KEY=$(openssl rand -base64 12) -LOCAL_IP="$(hostname -I | awk '{print $1}')" sed -i \ -e 's|^env =.*|env = "production"|' \ -e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \ diff --git a/install/n8n-install.sh b/install/n8n-install.sh index 389222d37..c95806739 100644 --- a/install/n8n-install.sh +++ b/install/n8n-install.sh @@ -29,13 +29,12 @@ $STD npm install --global n8n msg_ok "Installed n8n" msg_info "Creating Service" -HOST_IP=$(hostname -I | awk '{print $1}') mkdir -p /opt cat </opt/n8n.env N8N_SECURE_COOKIE=false N8N_PORT=5678 N8N_PROTOCOL=http -N8N_HOST=$HOST_IP +N8N_HOST=${LOCAL_IP} EOF cat </etc/systemd/system/n8n.service diff --git a/install/open-archiver-install.sh b/install/open-archiver-install.sh index 255c63add..7e3d71ffc 100644 --- a/install/open-archiver-install.sh +++ b/install/open-archiver-install.sh @@ -20,11 +20,11 @@ msg_ok "Installed dependendencies" NODE_VERSION="22" NODE_MODULE="pnpm" setup_nodejs PG_VERSION="17" setup_postgresql PG_DB_NAME="openarchiver_db" PG_DB_USER="openarchiver" setup_postgresql_db + fetch_and_deploy_gh_release "meilisearch" "meilisearch/meilisearch" "binary" fetch_and_deploy_gh_release "openarchiver" "LogicLabs-OU/OpenArchiver" "tarball" JWT_KEY="$(openssl rand -hex 32)" SECRET_KEY="$(openssl rand -hex 32)" -import_local_ip msg_info "Configuring MeiliSearch" curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml diff --git a/install/openproject-install.sh b/install/openproject-install.sh index f0a553fe9..577ec8b6f 100644 --- a/install/openproject-install.sh +++ b/install/openproject-install.sh @@ -21,7 +21,6 @@ PG_VERSION="17" setup_postgresql PG_DB_NAME="openproject" PG_DB_USER="openproject" setup_postgresql_db API_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) echo "OpenProject API Key: $API_KEY" >>~/openproject.creds -import_local_ip msg_info "Setting up OpenProject Repository" curl -fsSL "https://dl.packager.io/srv/opf/openproject/key" | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg diff --git a/install/openziti-controller-install.sh b/install/openziti-controller-install.sh index a48b6ce67..8abfc837a 100644 --- a/install/openziti-controller-install.sh +++ b/install/openziti-controller-install.sh @@ -29,8 +29,7 @@ msg_ok "Installed openziti" read -r -p "${TAB3}Would you like to go through the auto configuration now? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then - IPADDRESS=$(hostname -I | awk '{print $1}') - GEN_FQDN="controller.${IPADDRESS}.sslip.io" + GEN_FQDN="controller.${LOCAL_IP}.sslip.io" read -r -p "${TAB3}Please enter the controller FQDN [${GEN_FQDN}]: " ZITI_CTRL_ADVERTISED_ADDRESS ZITI_CTRL_ADVERTISED_ADDRESS=${ZITI_CTRL_ADVERTISED_ADDRESS:-$GEN_FQDN} read -r -p "${TAB3}Please enter the controller port [1280]: " ZITI_CTRL_ADVERTISED_PORT diff --git a/install/outline-install.sh b/install/outline-install.sh index 71168df00..b38868db7 100644 --- a/install/outline-install.sh +++ b/install/outline-install.sh @@ -23,8 +23,8 @@ msg_ok "Installed Dependencies" NODE_VERSION="22" setup_nodejs PG_VERSION="16" setup_postgresql PG_DB_NAME="outline" PG_DB_USER="outline" setup_postgresql_db + fetch_and_deploy_gh_release "outline" "outline/outline" "tarball" -import_local_ip msg_info "Configuring Outline (Patience)" SECRET_KEY="$(openssl rand -hex 32)" diff --git a/install/pangolin-install.sh b/install/pangolin-install.sh index a1f5c0fd7..181c49cbb 100644 --- a/install/pangolin-install.sh +++ b/install/pangolin-install.sh @@ -28,7 +28,6 @@ read -rp "${TAB3}Enter your Pangolin URL (ex: https://pangolin.example.com): " p read -rp "${TAB3}Enter your email address: " pango_email msg_info "Setup Pangolin" -IP_ADDR=$(hostname -I | awk '{print $1}') SECRET_KEY=$(openssl rand -base64 48 | tr -dc 'A-Za-z0-9' | head -c 32) cd /opt/pangolin mkdir -p /opt/pangolin/config/{traefik,db,letsencrypt,logs} @@ -77,7 +76,7 @@ api: providers: http: - endpoint: "http://$IP_ADDR:3001/api/v1/traefik-config" + endpoint: "http://$LOCAL_IP:3001/api/v1/traefik-config" pollInterval: "5s" file: filename: "/opt/pangolin/config/traefik/dynamic_config.yml" @@ -168,12 +167,12 @@ http: next-service: loadBalancer: servers: - - url: "http://$IP_ADDR:3002" + - url: "http://$LOCAL_IP:3002" api-service: loadBalancer: servers: - - url: "http://$IP_ADDR:3000" + - url: "http://$LOCAL_IP:3000" EOF $STD npm run db:sqlite:generate $STD npm run db:sqlite:push @@ -218,7 +217,7 @@ Requires=pangolin.service [Service] Type=simple User=root -ExecStart=/usr/bin/gerbil --reachableAt=http://$IP_ADDR:3004 --generateAndSaveKeyTo=/var/config/key --remoteConfig=http://$IP_ADDR:3001/api/v1/ +ExecStart=/usr/bin/gerbil --reachableAt=http://$LOCAL_IP:3004 --generateAndSaveKeyTo=/var/config/key --remoteConfig=http://$LOCAL_IP:3001/api/v1/ Restart=always RestartSec=10 diff --git a/install/passbolt-install.sh b/install/passbolt-install.sh index 302e9e817..3cd4f2e39 100644 --- a/install/passbolt-install.sh +++ b/install/passbolt-install.sh @@ -23,7 +23,7 @@ msg_ok "Installed dependencies" setup_mariadb MARIADB_DB_NAME="passboltdb" MARIADB_DB_USER="passbolt" setup_mariadb_db create_self_signed_cert -import_local_ip + setup_deb822_repo \ "passbolt" \ "https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x3D1A0346C8E1802F774AEF21DE8B853FC155581D" \ diff --git a/install/patchmon-install.sh b/install/patchmon-install.sh index 22fa8bb21..99ef333af 100644 --- a/install/patchmon-install.sh +++ b/install/patchmon-install.sh @@ -23,8 +23,8 @@ msg_ok "Installed Dependencies" NODE_VERSION="24" setup_nodejs PG_VERSION="17" setup_postgresql PG_DB_NAME="patchmon_db" PG_DB_USER="patchmon_usr" setup_postgresql_db + fetch_and_deploy_gh_release "PatchMon" "PatchMon/PatchMon" "tarball" "latest" "/opt/patchmon" -import_local_ip msg_info "Configuring PatchMon" cd /opt/patchmon diff --git a/install/planka-install.sh b/install/planka-install.sh index c934c693f..b5b917a25 100644 --- a/install/planka-install.sh +++ b/install/planka-install.sh @@ -43,7 +43,6 @@ msg_ok "Set up PostgreSQL Database" fetch_and_deploy_gh_release "planka" "plankanban/planka" "prebuild" "latest" "/opt/planka" "planka-prebuild.zip" msg_info "Configuring PLANKA" -LOCAL_IP=$(hostname -I | awk '{print $1}') SECRET_KEY=$(openssl rand -hex 64) cd /opt/planka $STD npm install diff --git a/install/pterodactyl-panel-install.sh b/install/pterodactyl-panel-install.sh index 62d0d542f..37eeba8fb 100644 --- a/install/pterodactyl-panel-install.sh +++ b/install/pterodactyl-panel-install.sh @@ -70,11 +70,10 @@ cd /opt/pterodactyl-panel curl -fsSL "https://github.com/pterodactyl/panel/releases/download/v${RELEASE}/panel.tar.gz" -o "panel.tar.gz" tar -xzf "panel.tar.gz" cp .env.example .env -IP=$(hostname -I | awk '{print $1}') ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) $STD composer install --no-dev --optimize-autoloader --no-interaction $STD php artisan key:generate --force -$STD php artisan p:environment:setup --no-interaction --author "$ADMIN_EMAIL" --url "http://$IP" +$STD php artisan p:environment:setup --no-interaction --author "$ADMIN_EMAIL" --url "http://$LOCAL_IP" $STD php artisan p:environment:database --no-interaction --database $DB_NAME --username $DB_USER --password "$DB_PASS" $STD php artisan migrate --seed --force --no-interaction $STD php artisan p:user:make --no-interaction --admin=1 --email "$ADMIN_EMAIL" --password "$ADMIN_PASS" --name-first "$NAME_FIRST" --name-last "$NAME_LAST" --username "admin" diff --git a/install/reactive-resume-install.sh b/install/reactive-resume-install.sh index f446a820f..67567a363 100644 --- a/install/reactive-resume-install.sh +++ b/install/reactive-resume-install.sh @@ -19,7 +19,6 @@ curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio.deb -o minio $STD dpkg -i minio.deb msg_ok "Installed Dependencies" -import_local_ip PG_VERSION="16" setup_postgresql PG_DB_NAME="rxresume" PG_DB_USER="rxresume" PG_DB_GRANT_SUPERUSER="true" setup_postgresql_db NODE_VERSION="24" NODE_MODULE="pnpm@latest" setup_nodejs diff --git a/install/scanopy-install.sh b/install/scanopy-install.sh index 2e375f14e..a683ac9c9 100644 --- a/install/scanopy-install.sh +++ b/install/scanopy-install.sh @@ -47,7 +47,6 @@ cp ./target/release/daemon /usr/bin/scanopy-daemon msg_ok "Built scanopy-daemon" msg_info "Configuring server for first-run" -LOCAL_IP="$(hostname -I | awk '{print $1}')" cat </opt/scanopy/.env ### - SERVER scanopy_DATABASE_URL=postgresql://$PG_DB_USER:$PG_DB_PASS@localhost:5432/$PG_DB_NAME diff --git a/install/snipeit-install.sh b/install/snipeit-install.sh index c140ae895..ec09ef687 100644 --- a/install/snipeit-install.sh +++ b/install/snipeit-install.sh @@ -24,7 +24,6 @@ setup_composer fetch_and_deploy_gh_release "snipe-it" "grokability/snipe-it" "tarball" setup_mariadb MARIADB_DB_NAME="snipeit_db" MARIADB_DB_USER="snipeit" setup_mariadb_db -import_local_ip msg_info "Configuring Snipe-IT" cd /opt/snipe-it diff --git a/install/speedtest-tracker-install.sh b/install/speedtest-tracker-install.sh index de64a035b..a0db51bc2 100644 --- a/install/speedtest-tracker-install.sh +++ b/install/speedtest-tracker-install.sh @@ -23,8 +23,7 @@ msg_ok "Installed Dependencies" PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="common,sqlite3,redis" setup_php setup_composer NODE_VERSION="22" setup_nodejs -import_local_ip -fetch_and_deploy_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker" "tarball" "latest" "/opt/speedtest-tracker" +fetch_and_deploy_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker" "tarball" msg_info "Installing Speedtest CLI" setup_deb822_repo \ diff --git a/install/wallabag-install.sh b/install/wallabag-install.sh index ec4e4e556..2bc5639fd 100644 --- a/install/wallabag-install.sh +++ b/install/wallabag-install.sh @@ -20,7 +20,6 @@ $STD apt install -y \ imagemagick msg_ok "Installed Dependencies" -import_local_ip setup_mariadb MARIADB_DB_NAME="wallabag" MARIADB_DB_USER="wallabag" setup_mariadb_db PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,bz2,curl,gd,imagick,intl,mbstring,mysql,redis,tidy,xml,zip" setup_php diff --git a/install/wanderer-install.sh b/install/wanderer-install.sh index 26b833419..beecd72e6 100644 --- a/install/wanderer-install.sh +++ b/install/wanderer-install.sh @@ -32,7 +32,6 @@ msg_ok "Installed wanderer" msg_info "Creating Service" MEILI_KEY=$(openssl rand -hex 32) POCKETBASE_KEY=$(openssl rand -hex 16) -LOCAL_IP="$(hostname -I | awk '{print $1}')" cat </opt/wanderer/.env ORIGIN=http://${LOCAL_IP}:3000 diff --git a/install/wizarr-install.sh b/install/wizarr-install.sh index 56368023f..57a152d11 100644 --- a/install/wizarr-install.sh +++ b/install/wizarr-install.sh @@ -19,8 +19,8 @@ msg_ok "Installed Dependencies" setup_uv NODE_VERSION="22" setup_nodejs + fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr" "tarball" -import_local_ip msg_info "Configure Wizarr" cd /opt/wizarr diff --git a/install/zammad-install.sh b/install/zammad-install.sh index 9bf623b74..e23f1565d 100644 --- a/install/zammad-install.sh +++ b/install/zammad-install.sh @@ -20,8 +20,6 @@ $STD apt install -y \ apt-transport-https msg_ok "Installed Dependencies" -import_local_ip - msg_info "Setting up Elasticsearch" setup_deb822_repo \ "elasticsearch" \