Skip to content

Commit 0f58a90

Browse files
authored
Merge pull request #2195 from uchouT/add-openlist
feat(ct): openlist
2 parents 5240660 + beaa67e commit 0f58a90

4 files changed

Lines changed: 251 additions & 0 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

‎ct/openlist.sh‎

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/usr/bin/env bash
2+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
3+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
4+
# Copyright (c) 2021-2026 community-scripts ORG
5+
# Author: uchouT (uchouT)
6+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
7+
# Source: https://github.com/OpenListTeam/OpenList/
8+
9+
APP="OpenList"
10+
var_tags="${var_tags:-files;storage}"
11+
var_cpu="${var_cpu:-1}"
12+
var_arm64="${var_arm64:-yes}"
13+
var_unprivileged="${var_unprivileged:-1}"
14+
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
15+
var_os=$(msg_menu "Choose the container OS" \
16+
"debian" "Debian 13" \
17+
"alpine" "Alpine 3.24 (smaller)")
18+
fi
19+
20+
if [[ "${var_os:-}" == "alpine" ]]; then
21+
var_ram="${var_ram:-512}"
22+
var_disk="${var_disk:-4}"
23+
var_version="${var_version:-3.24}"
24+
else
25+
var_ram="${var_ram:-1024}"
26+
var_disk="${var_disk:-6}"
27+
var_version="${var_version:-13}"
28+
fi
29+
30+
header_info "$APP"
31+
variables
32+
color
33+
catch_errors
34+
35+
function update_script() {
36+
header_info
37+
check_container_storage
38+
check_container_resources
39+
run_os_update
40+
}
41+
42+
update_deb_based() {
43+
if [[ ! -f /opt/openlist/openlist ]]; then
44+
msg_error "No OpenList Installation Found!"
45+
exit 1
46+
fi
47+
48+
if check_for_gh_release "openlist" "OpenListTeam/OpenList"; then
49+
msg_info "Stopping OpenList"
50+
systemctl stop openlist
51+
msg_ok "Stopped OpenList"
52+
53+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz"
54+
55+
msg_info "Starting OpenList"
56+
systemctl start openlist
57+
msg_ok "Started OpenList"
58+
msg_ok "Updated successfully!"
59+
fi
60+
}
61+
62+
update_alpine() {
63+
if [[ ! -f /opt/openlist/openlist ]]; then
64+
msg_error "No OpenList Installation Found!"
65+
exit 1
66+
fi
67+
68+
msg_info "Updating Alpine Packages"
69+
$STD apk -U upgrade
70+
msg_ok "Updated Alpine Packages"
71+
72+
if check_for_gh_release "openlist" "OpenListTeam/OpenList"; then
73+
msg_info "Stopping OpenList"
74+
$STD rc-service openlist stop
75+
msg_ok "Stopped OpenList"
76+
77+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz"
78+
79+
msg_info "Starting OpenList"
80+
$STD rc-service openlist start
81+
msg_ok "Started OpenList"
82+
msg_ok "Updated successfully!"
83+
fi
84+
}
85+
86+
start
87+
build_container
88+
description
89+
90+
msg_ok "Completed Successfully!\n"
91+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
92+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
93+
echo -e "${GATEWAY}${BGN}http://${IP}:5244${CL}"
94+
echo -e "${INFO}${YW}Credentials saved in:${CL}"
95+
echo -e "${TAB}/root/openlist.creds"

‎install/openlist-install.sh‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: uchouT (uchouT)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/OpenListTeam/OpenList/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
fetch_and_deploy_gh_release "openlist" "OpenListTeam/OpenList" "prebuild" "latest" "/opt/openlist" "openlist-linux-musl-$(arch_resolve "amd64" "arm64").tar.gz"
17+
18+
msg_info "Setting up OpenList"
19+
ADMIN_PASS="$(head -c 256 /dev/urandom | tr -dc 'A-Za-z0-9')"
20+
ADMIN_PASS="${ADMIN_PASS:0:16}"
21+
$STD /opt/openlist/openlist --data /opt/openlist_data admin set "$ADMIN_PASS"
22+
if [[ ! -f /opt/openlist_data/data.db ]]; then
23+
msg_error "OpenList did not initialise its database"
24+
exit 1
25+
fi
26+
{
27+
echo "OpenList Credentials"
28+
echo "Username: admin"
29+
echo "Password: ${ADMIN_PASS}"
30+
} >~/openlist.creds
31+
chmod 600 ~/openlist.creds
32+
msg_ok "Set up OpenList"
33+
34+
setup_deb_based() {
35+
msg_info "Creating OpenList Service"
36+
cat <<EOF >/etc/systemd/system/openlist.service
37+
[Unit]
38+
Description=OpenList
39+
After=network.target
40+
41+
[Service]
42+
Type=simple
43+
User=root
44+
WorkingDirectory=/opt/openlist
45+
ExecStart=/opt/openlist/openlist server --data /opt/openlist_data
46+
Restart=on-failure
47+
RestartSec=5
48+
49+
[Install]
50+
WantedBy=multi-user.target
51+
EOF
52+
systemctl enable -q --now openlist
53+
msg_ok "Created OpenList Service"
54+
}
55+
56+
setup_alpine() {
57+
msg_info "Creating OpenList Service"
58+
cat <<'EOF' >/etc/init.d/openlist
59+
#!/sbin/openrc-run
60+
name="OpenList"
61+
description="OpenList - a file list program that supports multiple storages"
62+
63+
command="/opt/openlist/openlist"
64+
command_args="server --data /opt/openlist_data"
65+
supervisor=supervise-daemon
66+
directory="/opt/openlist"
67+
output_log="/var/log/openlist.log"
68+
error_log="/var/log/openlist.log"
69+
respawn_delay=10
70+
71+
depend() {
72+
need net
73+
after firewall
74+
}
75+
76+
start_pre() {
77+
checkpath -f -m 0640 "$output_log"
78+
}
79+
EOF
80+
chmod +x /etc/init.d/openlist
81+
$STD rc-update add openlist default
82+
$STD rc-service openlist start
83+
msg_ok "Created OpenList Service"
84+
}
85+
86+
run_os_setup
87+
88+
motd_ssh
89+
customize
90+
cleanup_lxc

‎json/openlist.json‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "OpenList",
3+
"slug": "openlist",
4+
"categories": [
5+
11
6+
],
7+
"date_created": "2026-08-18",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"architectures": [
12+
"amd64",
13+
"arm64"
14+
],
15+
"interface_port": 5244,
16+
"documentation": "https://doc.oplist.org/",
17+
"website": "https://oplist.org/",
18+
"repository": "https://github.com/OpenListTeam/OpenList",
19+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/openlist.webp",
20+
"description": "OpenList is a file list program that mounts many storage backends - S3, WebDAV, OneDrive, Google Drive, SFTP, local disks and more - behind one web UI, and serves them again over WebDAV, FTP and S3. It is the community-driven fork of AList.",
21+
"install_methods": [
22+
{
23+
"type": "default",
24+
"script": "ct/openlist.sh",
25+
"config_path": "/opt/openlist_data/config.json",
26+
"resources": {
27+
"cpu": 1,
28+
"ram": 1024,
29+
"hdd": 6,
30+
"os": "Debian",
31+
"version": "13"
32+
}
33+
},
34+
{
35+
"type": "alpine",
36+
"script": "ct/openlist.sh",
37+
"config_path": "/opt/openlist_data/config.json",
38+
"resources": {
39+
"cpu": 1,
40+
"ram": 512,
41+
"hdd": 4,
42+
"os": "Alpine",
43+
"version": "3.24"
44+
}
45+
}
46+
],
47+
"default_credentials": {
48+
"username": "admin",
49+
"password": null
50+
},
51+
"notes": [
52+
{
53+
"text": "One script serves both variants: the installer asks for the container OS, or pass var_os=alpine to pick Alpine unattended.",
54+
"type": "info"
55+
},
56+
{
57+
"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 <password>`.",
58+
"type": "info"
59+
},
60+
{
61+
"text": "Config, database, logs and search index live in /opt/openlist_data, outside the directory an update replaces, so updating never touches them.",
62+
"type": "info"
63+
}
64+
]
65+
}

0 commit comments

Comments
 (0)