From 6598e2b7b1e8a0e9657decae5e6724a59a6efba3 Mon Sep 17 00:00:00 2001 From: uchouT Date: Sat, 14 Nov 2026 09:35:15 +0000 Subject: [PATCH] openlist: declare Alpine install method, align with guidelines - json: add the alpine install method (512 MB / 4 GB, Alpine 3.24) the ct script already offers; drop the update-mechanics note - install: random_password instead of a hand-rolled generator, heredoc for the creds file - ct: closing block down to one extra line Co-Authored-By: Claude Opus 5.5 --- ct/openlist.sh | 3 +-- install/openlist-install.sh | 13 ++++++------- json/openlist.json | 16 ++++++++++++---- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ct/openlist.sh b/ct/openlist.sh index 101051c01c..e19755edaa 100755 --- a/ct/openlist.sh +++ b/ct/openlist.sh @@ -92,5 +92,4 @@ msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW}Access it using the following URL:${CL}" echo -e "${GATEWAY}${BGN}http://${IP}:5244${CL}" -echo -e "${INFO}${YW}Credentials saved in:${CL}" -echo -e "${TAB}/root/openlist.creds" +echo -e "${INFO}${YW}Credentials: /root/openlist.creds (inside the container)${CL}" diff --git a/install/openlist-install.sh b/install/openlist-install.sh index 1ad0a7f317..0c69eac607 100755 --- a/install/openlist-install.sh +++ b/install/openlist-install.sh @@ -16,18 +16,17 @@ update_os fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz" msg_info "Setting up OpenList" -ADMIN_PASS="$(head -c 256 /dev/urandom | tr -dc 'A-Za-z0-9')" -ADMIN_PASS="${ADMIN_PASS:0:16}" +ADMIN_PASS="$(random_password 16)" $STD /opt/openlist/openlist --data /opt/openlist_data admin set "$ADMIN_PASS" if [[ ! -f /opt/openlist_data/data.db ]]; then msg_error "OpenList did not initialise its database" exit 1 fi -{ - echo "OpenList Credentials" - echo "Username: admin" - echo "Password: ${ADMIN_PASS}" -} >~/openlist.creds +cat <~/openlist.creds +OpenList Credentials +Username: admin +Password: ${ADMIN_PASS} +EOF chmod 600 ~/openlist.creds msg_ok "Set up OpenList" diff --git a/json/openlist.json b/json/openlist.json index b4efe18907..e2a2ef8303 100644 --- a/json/openlist.json +++ b/json/openlist.json @@ -31,6 +31,18 @@ "os": "Debian", "version": "13" } + }, + { + "type": "alpine", + "script": "ct/openlist.sh", + "config_path": "/opt/openlist_data/config.json", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "Alpine", + "version": "3.24" + } } ], "default_credentials": { @@ -41,10 +53,6 @@ { "text": "The admin password is generated during the installation and saved to /root/openlist.creds inside the container. Change it with `/opt/openlist/openlist --data /opt/openlist_data admin set `.", "type": "info" - }, - { - "text": "Config, database, logs and search index live in /opt/openlist_data, outside the directory an update replaces, so updating never touches them.", - "type": "info" } ] }