A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix(installation): Fix the baremetal installation script after the rebrand
MohamedBassem27e5693a1b27
diff --git a/hoarder-linux.sh b/hoarder-linux.shindex 1ad80578..8a857091 100644--- a/hoarder-linux.sh+++ b/hoarder-linux.sh@@ -5,7 +5,7 @@ set -Eeuo pipefail# v2.0# Copyright 2024-2025# Author: vhsdream-# Adapted from: The Hoarder installation script from https://github.com/community-scripts/ProxmoxVE+# Adapted from: The Karakeep installation script from https://github.com/community-scripts/ProxmoxVE# License: MIT# Basic error handling@@ -26,7 +26,7 @@ LOG_DIR=/var/log/hoarderENV_FILE=${CONFIG_DIR}/hoarder.envinstall() {- echo "Hoarder installation for Debian 12/Ubuntu 24.04" && sleep 4+ echo "Karakeep installation for Debian 12/Ubuntu 24.04" && sleep 4echo "Installing Dependencies..." && sleep 1apt-get install --no-install-recommends -y \g++ \@@ -64,17 +64,17 @@ install() {npm install -g [email protected]echo "Installed Node.js" && sleep 1- echo "Installing Hoarder..."+ echo "Installing Karakeep..."mkdir -p $DATA_DIRmkdir -p $CONFIG_DIRmkdir -p $LOG_DIRM_DATA_DIR=/var/lib/meilisearchM_CONFIG_FILE=/etc/meilisearch.toml- RELEASE=$(curl -s https://api.github.com/repos/hoarder-app/hoarder/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')+ RELEASE=$(curl -s https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')cd /tmp- wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"+ wget -q "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip"unzip -q v${RELEASE}.zip- mv hoarder-${RELEASE} ${INSTALL_DIR} && cd ${INSTALL_DIR}/apps/web+ mv karakeep-${RELEASE} ${INSTALL_DIR} && cd ${INSTALL_DIR}/apps/webcorepack enableexport NEXT_TELEMETRY_DISABLED=1export PUPPETEER_SKIP_DOWNLOAD="true"@@ -88,7 +88,7 @@ install() {pnpm buildcd ${INSTALL_DIR}/packages/dbpnpm migrate- echo "Installed Hoarder" && sleep 1+ echo "Installed Karakeep" && sleep 1echo "Creating configuration files..."cd $INSTALL_DIR@@ -103,11 +103,11 @@ no_analytics = trueEOFchmod 600 $M_CONFIG_FILE- HOARDER_SECRET="$(openssl rand -base64 36 | cut -c1-24)"+ KARAKEEP_SECRET="$(openssl rand -base64 36 | cut -c1-24)"cat <<EOF >${ENV_FILE}NODE_ENV=productionSERVER_VERSION=${RELEASE}-NEXTAUTH_SECRET="${HOARDER_SECRET}"+NEXTAUTH_SECRET="${KARAKEEP_SECRET}"NEXTAUTH_URL="http://localhost:3000"DATA_DIR=${DATA_DIR}MEILI_ADDR="http://127.0.0.1:7700"@@ -248,27 +248,27 @@ EOFapt -y autocleanecho "Cleaned" && sleep 1- echo "OK, Hoarder should be accessible on port 3000 of this device's IP address!" && sleep 4+ echo "OK, Karakeep should be accessible on port 3000 of this device's IP address!" && sleep 4exit 0}update() {echo "Checking for an update..." && sleep 1- if [[ ! -d ${INSTALL_DIR} ]]; then echo "Is Hoarder even installed?"; exit 1; fi- RELEASE=$(curl -s https://api.github.com/repos/hoarder-app/hoarder/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')+ if [[ ! -d ${INSTALL_DIR} ]]; then echo "Is Karakeep even installed?"; exit 1; fi+ RELEASE=$(curl -s https://api.github.com/repos/karakeep-app/karakeep/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')PREV_RELEASE=$(cat ${INSTALL_DIR}/version.txt)if [[ "${RELEASE}" != "${PREV_RELEASE}" ]]; thenecho "Stopping affected services..." && sleep 1systemctl stop hoarder-web hoarder-workersecho "Stopped services" && sleep 1- echo "Updating Hoarder to v${RELEASE}..." && sleep 1+ echo "Updating Karakeep to v${RELEASE}..." && sleep 1sed -i "s|SERVER_VERSION=${PREV_RELEASE}|SERVER_VERSION=${RELEASE}|" ${ENV_FILE}rm -R ${INSTALL_DIR}cd /tmp- wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip"+ wget -q "https://github.com/karakeep-app/karakeep/archive/refs/tags/v${RELEASE}.zip"unzip -q v${RELEASE}.zip- mv hoarder-${RELEASE} ${INSTALL_DIR}+ mv karakeep-${RELEASE} ${INSTALL_DIR}# https://github.com/hoarder-app/hoarder/issues/967if [[ $(corepack -v) < "0.31.0" ]]; thennpm install -g [email protected]@@ -281,7 +281,7 @@ update() {cd ${INSTALL_DIR}/packages/db && pnpm migrateecho "${RELEASE}" >${INSTALL_DIR}/version.txtchown -R hoarder:hoarder ${INSTALL_DIR} ${DATA_DIR}- echo "Updated Hoarder to v${RELEASE}" && sleep 1+ echo "Updated Karakeep to v${RELEASE}" && sleep 1echo "Restarting services and cleaning up..." && sleep 1systemctl start hoarder-workers hoarder-webrm /tmp/v${RELEASE}.zip@@ -295,7 +295,7 @@ update() {[ "$(id -u)" -ne 0 ] && echo "This script requires root privileges. Please run with sudo or as the root user." && exit 1command="${1:-}"if [ -z "$command" ]; then- echo -e "Run script with 'install' to install Hoarder and 'update' to update Hoarder" && exit 1+ echo -e "Run script with 'install' to install Karakeep and 'update' to update Karakeep" && exit 1ficase "$command" in