From cb2d4c005143a39aeb4b55d2780ecdaed68a76de Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Fri, 19 Dec 2025 22:43:40 +0100 Subject: [PATCH] homarr: debian native builds (#10005) --- ct/homarr.sh | 17 +++-------------- install/homarr-install.sh | 12 ++++++------ 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 275ff2944..df511dd53 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -35,22 +35,11 @@ function update_script() { msg_ok "Services Stopped" if ! { grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr/.env 2>/dev/null || grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr.env 2>/dev/null; }; then - DEBIAN_VERSION=$(cat /etc/debian_version 2>/dev/null | cut -d'.' -f1) - if [[ -n "$DEBIAN_VERSION" ]] && [[ "$DEBIAN_VERSION" -lt 13 ]]; then - msg_warn "⚠️ COMPATIBILITY WARNING ⚠️" - msg_warn "You are running Debian ${DEBIAN_VERSION}. Homarr's requires Debian 13" - msg_warn "" - msg_warn "Please Upgrade to Debian 13:" - msg_warn "See: https://github.com/community-scripts/ProxmoxVE/discussions/7489" - msg_warn "" - exit - fi msg_info "Fixing old structure" - # fix musl issues because homarr compiles on alpine not debian soure: https://github.com/alexander-akhmetov/python-telegram/issues/3 - $STD apt install -y musl-dev - ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 + systemctl disable -q --now nginx cp /opt/homarr/.env /opt/homarr.env echo "REDIS_IS_EXTERNAL='true'" >> /opt/homarr.env + sed -i '/^\[Unit\]/a Requires=redis-server.service\nAfter=redis-server.service' /etc/systemd/system/homarr.service sed -i 's|^ExecStart=.*|ExecStart=/opt/homarr/run.sh|' /etc/systemd/system/homarr.service sed -i 's|^EnvironmentFile=.*|EnvironmentFile=-/opt/homarr.env|' /etc/systemd/system/homarr.service chown -R redis:redis /appdata/redis @@ -72,7 +61,7 @@ EOF NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]') setup_nodejs - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-amd64.tar.gz" + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-debian-amd64.tar.gz" msg_info "Updating Homarr" cp /opt/homarr/redis.conf /etc/redis/redis.conf diff --git a/install/homarr-install.sh b/install/homarr-install.sh index c759081e9..b11bd7708 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -18,17 +18,14 @@ $STD apt install -y \ redis-server \ nginx \ gettext \ - openssl \ - musl-dev + openssl msg_ok "Installed Dependencies" NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]') setup_nodejs -fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-amd64.tar.gz" +fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-debian-amd64.tar.gz" msg_info "Installing Homarr" -# fix musl issues because homarr compiles on alpine not debian soure: https://github.com/alexander-akhmetov/python-telegram/issues/3 -ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 mkdir -p /opt/homarr_db touch /opt/homarr_db/db.sqlite SECRET_ENCRYPTION_KEY="$(openssl rand -hex 32)" @@ -65,6 +62,8 @@ ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis - EOF cat </etc/systemd/system/homarr.service [Unit] +Requires=redis-server.service +After=redis-server.service Description=Homarr Service After=network.target @@ -79,8 +78,9 @@ WantedBy=multi-user.target EOF chmod +x /opt/homarr/run.sh systemctl daemon-reload -systemctl enable -q --now redis-server && sleep 5 +systemctl enable -q --now redis-server systemctl enable -q --now homarr +systemctl disable -q --now nginx msg_ok "Created Services" motd_ssh