From c9feb4bffebde7bbf948b4a6e3331efa2178eb56 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 14 Sep 2026 20:45:15 -0500 Subject: [PATCH 1/4] Add AIOMetadata LXC Stremio metadata addon (cedya77/aiometadata) aggregating TMDB, TVDB, Fanart.tv, MyAnimeList/Jikan, AniList, Trakt and SimKL into one configurable catalog/metadata source. Built from source (npm) like AIOStreams, with a local password-protected Redis cache and SQLite for config/auth storage relocated to /opt/aiometadata_data so updates (CLEAN_INSTALL wipes /opt/aiometadata) never touch it - no create_backup/restore_backup needed. Verified against the actual v2.17.2 release tag (not the dev branch, which is mid-rewrite on v5.x): confirmed via source that DATABASE_URI accepts an absolute sqlite:// path, Redis is a soft dependency (logs errors, doesn't crash without it, per addon/lib/redisClient.ts), and no build toolchain is needed (upstream's own Dockerfile builds on Alpine with plain `npm ci`, no python3/make/g++, and ghcr.io publishes official multi-arch amd64+arm64 images) - hence var_arm64=yes here too, on the same "official multi-arch, not independently verified by this script's author" basis as AIOStreams. Note: upstream is at 452 GitHub stars as of this commit, below this repo's 600-star bar for new script PRs - flagging for whoever reviews this before it goes upstream. Co-Authored-By: Claude Sonnet 5 --- ct/aiometadata.sh | 67 ++++++++++++++++++++++++++++++ install/aiometadata-install.sh | 75 ++++++++++++++++++++++++++++++++++ json/aiometadata.json | 54 ++++++++++++++++++++++++ 3 files changed, 196 insertions(+) create mode 100644 ct/aiometadata.sh create mode 100644 install/aiometadata-install.sh create mode 100644 json/aiometadata.json diff --git a/ct/aiometadata.sh b/ct/aiometadata.sh new file mode 100644 index 0000000000..df8073b2d8 --- /dev/null +++ b/ct/aiometadata.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# Engine comes from community-scripts/core; this repo only ships the scripts. +# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core), +# so a fork or branch of core can be tested without editing this file. +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MrNRod +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/cedya77/aiometadata | Docs: https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md + +APP="AIOMetadata" +var_tags="${var_tags:-media;streaming;stremio}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_arm64="${var_arm64:-yes}" # upstream ships official multi-arch (amd64+arm64) images built with no native-compile toolchain; not independently verified on arm64 hardware by this script's author +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/aiometadata ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "aiometadata" "cedya77/aiometadata" "" "" "v"; then + msg_info "Stopping Service" + systemctl stop aiometadata + msg_ok "Stopped Service" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "aiometadata" "cedya77/aiometadata" "tarball" "latest" "" "" "v" + + msg_info "Building Application (Patience)" + cd /opt/aiometadata + $STD npm ci + $STD npm run build + $STD npm run build:backend + msg_ok "Built Application" + + msg_info "Starting Service" + systemctl start aiometadata + msg_ok "Started Service" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Configure page (add to Stremio from here):${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3232/configure${CL}" +echo -e "${INFO}${YW} Env file (API keys, admin key, Redis/DB config):${CL} ${BGN}/opt/aiometadata_data/.env${CL}" diff --git a/install/aiometadata-install.sh b/install/aiometadata-install.sh new file mode 100644 index 0000000000..f0df33edfc --- /dev/null +++ b/install/aiometadata-install.sh @@ -0,0 +1,75 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MrNRod +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/cedya77/aiometadata | Docs: https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt install -y redis-server +msg_ok "Installed Dependencies" + +NODE_VERSION="24" setup_nodejs + +fetch_and_deploy_gh_release "aiometadata" "cedya77/aiometadata" "tarball" "latest" "" "" "v" + +msg_info "Configuring Redis" +REDIS_PASS=$(openssl rand -hex 24) +sed -i "s/^# requirepass foobared/requirepass ${REDIS_PASS}/" /etc/redis/redis.conf +systemctl enable -q --now redis-server +systemctl restart redis-server +msg_ok "Configured Redis" + +msg_info "Building Application (Patience)" +cd /opt/aiometadata +$STD npm ci +$STD npm run build +$STD npm run build:backend +msg_ok "Built Application" + +msg_info "Configuring Application" +mkdir -p /opt/aiometadata_data +cp /opt/aiometadata/.env.example /opt/aiometadata_data/.env +ADMIN_KEY=$(openssl rand -hex 24) +sed -i \ + -e "s|^HOST_NAME=.*|HOST_NAME=http://${LOCAL_IP}:3232|" \ + -e "s|^NODE_ENV=.*|NODE_ENV=production|" \ + -e "s|^DATABASE_URI=sqlite://addon/data/db.sqlite|DATABASE_URI=sqlite:///opt/aiometadata_data/db.sqlite|" \ + -e "s|^REDIS_URL=.*|REDIS_URL=redis://:${REDIS_PASS}@127.0.0.1:6379|" \ + -e "s|^# ADMIN_KEY=.*|ADMIN_KEY=${ADMIN_KEY}|" \ + /opt/aiometadata_data/.env +msg_ok "Configured Application" + +msg_info "Creating Service" +cat </etc/systemd/system/aiometadata.service +[Unit] +Description=AIOMetadata +After=network.target redis-server.service +Requires=redis-server.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/aiometadata +EnvironmentFile=/opt/aiometadata_data/.env +ExecStart=/usr/bin/node dist/server/server.js +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now aiometadata +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc diff --git a/json/aiometadata.json b/json/aiometadata.json new file mode 100644 index 0000000000..9850401884 --- /dev/null +++ b/json/aiometadata.json @@ -0,0 +1,54 @@ +{ + "name": "AIOMetadata", + "slug": "aiometadata", + "categories": [ + 13 + ], + "date_created": "2026-09-14", + "type": "ct", + "updateable": true, + "privileged": false, + "architectures": ["amd64", "arm64"], + "interface_port": 3232, + "documentation": "https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md", + "website": "https://github.com/cedya77/aiometadata", + "repository": "https://github.com/cedya77/aiometadata", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/aiometadata.webp", + "description": "AIOMetadata is a Stremio metadata addon that aggregates movie, series, and anime data from TMDB, TVDB, Fanart.tv, MyAnimeList/Jikan, AniList, Trakt, SimKL and others into one configurable catalog and metadata source, with per-user API keys, poster/art proxying, and background cache warming. This installs it with a local Redis cache and SQLite for config/auth storage; users bring their own provider API keys from the /configure dashboard.", + "install_methods": [ + { + "type": "default", + "script": "ct/aiometadata.sh", + "config_path": "/opt/aiometadata_data/.env", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": "No login by default. An ADMIN_KEY protecting the dashboard's admin endpoints is generated during installation, see /opt/aiometadata_data/.env" + }, + "notes": [ + { + "text": "No provider API keys are set by default. Add your own TMDB/TVDB/Fanart.tv/RPDB/etc. keys from the /configure page (per-user) or set the BUILT_IN_* variants in /opt/aiometadata_data/.env to fund keys for every user of this instance.", + "type": "warning" + }, + { + "text": "TMDB_API_KEY, TVDB_API_KEY, FANART_API_KEY, RPDB_API_KEY, MDBLIST_API_KEY and GEMINI_API_KEY (if set directly, not as BUILT_IN_*) are served in full to any visitor via /api/config so the configure page can prefill them - this is intentional upstream behavior, not a bug, but means those specific variables are not appropriate secrets on a shared instance.", + "type": "warning" + }, + { + "text": "Config/auth data lives in SQLite at /opt/aiometadata_data/db.sqlite by default; edit DATABASE_URI in the .env to point at PostgreSQL instead. Redis (local, password-protected) is used only as a cache - the app logs errors and keeps running if Redis is unreachable, it does not depend on it to start.", + "type": "info" + }, + { + "text": "The public Jikan (MyAnimeList) API this addon uses by default is shut down by upstream on 2026-10-01. Self-host a Jikan instance and point JIKAN_API_BASE at it before that date to keep MAL/anime metadata working - see the project's self-hosted-jikan docs.", + "type": "warning" + } + ] +} From 000bf015a2f46aae85b765d89490c64aa1a38480 Mon Sep 17 00:00:00 2001 From: Noel Date: Thu, 17 Sep 2026 20:38:40 -0500 Subject: [PATCH 2/4] Match AIOMetadata's systemd unit to upstream's own runtime env vars Checked every AIOStreams PR-review lesson against AIOMetadata before assuming it applies: no corepack (npm, not pnpm), no jq usage anywhere in this script, no build toolchain needed (confirmed again - upstream's Dockerfile still builds on plain Alpine with no compiler), and no FUSE feature exists in this codebase, so var_fuse doesn't apply here. Data persistence and the check_for_gh_release/fetch_and_deploy_gh_release "v" tag_prefix pattern were already done correctly from the start. One real miss, found by rereading upstream's Dockerfile with the same scrutiny that caught AIOStreams' NODE_OPTIONS gap: it sets UV_THREADPOOL_SIZE=16 (libuv thread pool size - this addon does a lot of concurrent I/O: cache warming, MAL/TMDB/Trakt fetches, image proxying) and DOTENV_CONFIG_QUIET=true (every addon/lib/*.ts file calls require('dotenv').config() with no path override, so with no .env at cwd - our .env lives in /opt/aiometadata_data, not /opt/aiometadata - this suppresses dotenv's log noise the same way it does in upstream's own container, which also injects env vars rather than shipping a physical .env file). Added both to the systemd unit. Co-Authored-By: Claude Sonnet 5 --- install/aiometadata-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/aiometadata-install.sh b/install/aiometadata-install.sh index f0df33edfc..15ac41370b 100644 --- a/install/aiometadata-install.sh +++ b/install/aiometadata-install.sh @@ -60,6 +60,8 @@ Type=simple User=root WorkingDirectory=/opt/aiometadata EnvironmentFile=/opt/aiometadata_data/.env +Environment="UV_THREADPOOL_SIZE=16" +Environment="DOTENV_CONFIG_QUIET=true" ExecStart=/usr/bin/node dist/server/server.js Restart=on-failure RestartSec=5 From 8ea732bcfc0626ad0bb4f948401e113ec50c248a Mon Sep 17 00:00:00 2001 From: Noel Rodriguez-Lebron Date: Thu, 5 Nov 2026 23:43:48 -0600 Subject: [PATCH 3/4] Update AIOMetadata metadata and build settings --- ct/aiometadata.sh | 22 ++++++++++------------ install/aiometadata-install.sh | 13 ++++++------- json/aiometadata.json | 19 +++++-------------- 3 files changed, 21 insertions(+), 33 deletions(-) diff --git a/ct/aiometadata.sh b/ct/aiometadata.sh index df8073b2d8..3a35d03687 100644 --- a/ct/aiometadata.sh +++ b/ct/aiometadata.sh @@ -1,13 +1,11 @@ #!/usr/bin/env bash -# Engine comes from community-scripts/core; this repo only ships the scripts. -# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core), -# so a fork or branch of core can be tested without editing this file. +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" _cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") # Copyright (c) 2021-2026 community-scripts ORG # Author: MrNRod -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/cedya77/aiometadata | Docs: https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://github.com/cedya77/aiometadata APP="AIOMetadata" var_tags="${var_tags:-media;streaming;stremio}" @@ -16,7 +14,7 @@ var_ram="${var_ram:-2048}" var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-13}" -var_arm64="${var_arm64:-yes}" # upstream ships official multi-arch (amd64+arm64) images built with no native-compile toolchain; not independently verified on arm64 hardware by this script's author +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified var_unprivileged="${var_unprivileged:-1}" header_info "$APP" @@ -35,22 +33,22 @@ function update_script() { fi if check_for_gh_release "aiometadata" "cedya77/aiometadata" "" "" "v"; then - msg_info "Stopping Service" + msg_info "Stopping AIOMetadata" systemctl stop aiometadata - msg_ok "Stopped Service" + msg_ok "Stopped AIOMetadata" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "aiometadata" "cedya77/aiometadata" "tarball" "latest" "" "" "v" - msg_info "Building Application (Patience)" + msg_info "Building AIOMetadata" cd /opt/aiometadata $STD npm ci $STD npm run build $STD npm run build:backend - msg_ok "Built Application" + msg_ok "Built AIOMetadata" - msg_info "Starting Service" + msg_info "Starting AIOMetadata" systemctl start aiometadata - msg_ok "Started Service" + msg_ok "Started AIOMetadata" msg_ok "Updated successfully!" fi exit diff --git a/install/aiometadata-install.sh b/install/aiometadata-install.sh index 15ac41370b..b99c100558 100644 --- a/install/aiometadata-install.sh +++ b/install/aiometadata-install.sh @@ -2,8 +2,8 @@ # Copyright (c) 2021-2026 community-scripts ORG # Author: MrNRod -# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE -# Source: https://github.com/cedya77/aiometadata | Docs: https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://github.com/cedya77/aiometadata source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color @@ -24,18 +24,17 @@ fetch_and_deploy_gh_release "aiometadata" "cedya77/aiometadata" "tarball" "lates msg_info "Configuring Redis" REDIS_PASS=$(openssl rand -hex 24) sed -i "s/^# requirepass foobared/requirepass ${REDIS_PASS}/" /etc/redis/redis.conf -systemctl enable -q --now redis-server systemctl restart redis-server msg_ok "Configured Redis" -msg_info "Building Application (Patience)" +msg_info "Building AIOMetadata" cd /opt/aiometadata $STD npm ci $STD npm run build $STD npm run build:backend -msg_ok "Built Application" +msg_ok "Built AIOMetadata" -msg_info "Configuring Application" +msg_info "Configuring AIOMetadata" mkdir -p /opt/aiometadata_data cp /opt/aiometadata/.env.example /opt/aiometadata_data/.env ADMIN_KEY=$(openssl rand -hex 24) @@ -46,7 +45,7 @@ sed -i \ -e "s|^REDIS_URL=.*|REDIS_URL=redis://:${REDIS_PASS}@127.0.0.1:6379|" \ -e "s|^# ADMIN_KEY=.*|ADMIN_KEY=${ADMIN_KEY}|" \ /opt/aiometadata_data/.env -msg_ok "Configured Application" +msg_ok "Configured AIOMetadata" msg_info "Creating Service" cat </etc/systemd/system/aiometadata.service diff --git a/json/aiometadata.json b/json/aiometadata.json index 9850401884..d87ee43670 100644 --- a/json/aiometadata.json +++ b/json/aiometadata.json @@ -8,13 +8,12 @@ "type": "ct", "updateable": true, "privileged": false, - "architectures": ["amd64", "arm64"], "interface_port": 3232, "documentation": "https://github.com/cedya77/aiometadata/blob/dev/docs/ENVIRONMENT_VARIABLES.md", "website": "https://github.com/cedya77/aiometadata", "repository": "https://github.com/cedya77/aiometadata", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/aiometadata.webp", - "description": "AIOMetadata is a Stremio metadata addon that aggregates movie, series, and anime data from TMDB, TVDB, Fanart.tv, MyAnimeList/Jikan, AniList, Trakt, SimKL and others into one configurable catalog and metadata source, with per-user API keys, poster/art proxying, and background cache warming. This installs it with a local Redis cache and SQLite for config/auth storage; users bring their own provider API keys from the /configure dashboard.", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/aiometadata-light.webp", + "description": "AIOMetadata is a Stremio metadata addon that aggregates movie, series and anime data from TMDB, TVDB, Fanart.tv, MyAnimeList, AniList, Trakt and more into one configurable catalog, with per-user API keys, poster proxying and cache warming.", "install_methods": [ { "type": "default", @@ -31,23 +30,15 @@ ], "default_credentials": { "username": null, - "password": "No login by default. An ADMIN_KEY protecting the dashboard's admin endpoints is generated during installation, see /opt/aiometadata_data/.env" + "password": null }, "notes": [ { - "text": "No provider API keys are set by default. Add your own TMDB/TVDB/Fanart.tv/RPDB/etc. keys from the /configure page (per-user) or set the BUILT_IN_* variants in /opt/aiometadata_data/.env to fund keys for every user of this instance.", + "text": "No provider API keys are preset. Add your TMDB/TVDB/Fanart.tv keys on the /configure page, or set the BUILT_IN_* variables in /opt/aiometadata_data/.env to cover every user.", "type": "warning" }, { - "text": "TMDB_API_KEY, TVDB_API_KEY, FANART_API_KEY, RPDB_API_KEY, MDBLIST_API_KEY and GEMINI_API_KEY (if set directly, not as BUILT_IN_*) are served in full to any visitor via /api/config so the configure page can prefill them - this is intentional upstream behavior, not a bug, but means those specific variables are not appropriate secrets on a shared instance.", - "type": "warning" - }, - { - "text": "Config/auth data lives in SQLite at /opt/aiometadata_data/db.sqlite by default; edit DATABASE_URI in the .env to point at PostgreSQL instead. Redis (local, password-protected) is used only as a cache - the app logs errors and keeps running if Redis is unreachable, it does not depend on it to start.", - "type": "info" - }, - { - "text": "The public Jikan (MyAnimeList) API this addon uses by default is shut down by upstream on 2026-10-01. Self-host a Jikan instance and point JIKAN_API_BASE at it before that date to keep MAL/anime metadata working - see the project's self-hosted-jikan docs.", + "text": "An ADMIN_KEY for the admin endpoints was generated in /opt/aiometadata_data/.env. API keys set directly (not BUILT_IN_*) are served to any visitor via /api/config.", "type": "warning" } ] From 174c1a6b1e9094d77aec566a7cbbf4321975249b Mon Sep 17 00:00:00 2001 From: Noel Rodriguez-Lebron Date: Thu, 5 Nov 2026 23:44:58 -0600 Subject: [PATCH 4/4] Clarify Integration Setup and Admin Key Usage --- json/aiometadata.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/json/aiometadata.json b/json/aiometadata.json index d87ee43670..855816397a 100644 --- a/json/aiometadata.json +++ b/json/aiometadata.json @@ -38,7 +38,11 @@ "type": "warning" }, { - "text": "An ADMIN_KEY for the admin endpoints was generated in /opt/aiometadata_data/.env. API keys set directly (not BUILT_IN_*) are served to any visitor via /api/config.", + "text": "To enable the Trakt, Simkl, AniList and MyAnimeList integrations, add their client ID and secret to /opt/aiometadata_data/.env, then restart the aiometadata service.", + "type": "info" + }, + { + "text": "Use the generated ADMIN_KEY from /opt/aiometadata_data/.env to access the dashboard. Keys set directly (not BUILT_IN_*) are served to any visitor via /api/config.", "type": "warning" } ]