Compare commits

...
Author SHA1 Message Date
CanbiZ (MickLesk) e4c786d333 Clean up comments in anki-sync-server.sh
Removed comments about local core checkout and credential storage.
2026-09-21 17:14:09 +02:00
push-app-to-main[bot] dda4a4b0e5 Add anki-sync-server (ct) 2026-09-21 14:59:01 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 011cb8b4f1 Update CHANGELOG.md (#17414)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-21 13:46:05 +00:00
maksimtechandClaude Opus 5 84b272c6bc fix(portabase): meet the default admin password rules (#17384)
Portabase creates the default admin from AUTH_DEFAULT_PASSWORD and checks it
with assertValidPassword (src/utils/password.ts): at least 8 characters, an
uppercase letter, a lowercase letter, a number and a special character. The
generated password is alphanumeric only, so the first start fails with
"Password must contain at least 1 special character".

Generate until each class is present rather than appending fixed characters,
and leave #, $, quotes and backticks out of the charset, because the value is
written unquoted into .env.

Fixes #17370

Co-authored-by: Claude Opus 5 <claude-opus-5@anthropic.com>
2026-09-21 15:45:35 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] e24b690307 Update CHANGELOG.md (#17413)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-21 13:44:35 +00:00
CanbiZ (MickLesk) 1ca4284ac3 truenas-vm: strip the G before the storage allocation (#17407)
storage:N wants a plain number; vm_prompt_disk_size returns 32G, so the
advanced path failed with "unable to parse zfs volume name '32G'".
2026-09-21 15:44:05 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 977db91cbe Update CHANGELOG.md (#17412)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-21 12:54:27 +00:00
Dopch 2e5df311e6 Fix local snmpd community string setup (#17363)
snmpd sed placement for community string is using the wrong variable RANDOMSTRINGHERE need to be RANDOMSTRINGGOESHERE
2026-09-21 14:54:02 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] a6cd257253 Update CHANGELOG.md (#17411)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-21 12:53:59 +00:00
Curious, aren't we? af047da360 fix(iventoy): preserve release data and migrate legacy service launchers (#17161) 2026-09-21 14:53:29 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 67f62f8c76 Update CHANGELOG.md (#17409)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-21 11:18:55 +00:00
8 changed files with 176 additions and 8 deletions
+6 -1
View File
@@ -552,11 +552,16 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
- #### 🐞 Bug Fixes
- fix(portabase): meet the default admin password rules [@maksimtech](https://github.com/maksimtech) ([#17384](https://github.com/community-scripts/ProxmoxVE/pull/17384))
- truenas-vm: strip the G before the storage allocation [@MickLesk](https://github.com/MickLesk) ([#17407](https://github.com/community-scripts/ProxmoxVE/pull/17407))
- Librenms - Fix local snmpd community string setup [@dopch](https://github.com/dopch) ([#17363](https://github.com/community-scripts/ProxmoxVE/pull/17363))
- fix(iventoy): preserve release data and migrate legacy service launchers [@Msprg](https://github.com/Msprg) ([#17161](https://github.com/community-scripts/ProxmoxVE/pull/17161))
- xyops: bump Node.js from 22 to 24 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17398](https://github.com/community-scripts/ProxmoxVE/pull/17398))
### 💾 Core
- general: prune old Rust toolchains [@MickLesk](https://github.com/MickLesk) ([core#52](https://github.com/community-scripts/core/pull/52))
- github-api: take the release the maintainer marked as latest [@MickLesk](https://github.com/MickLesk) ([core#55](https://github.com/community-scripts/core/pull/55))
- general: prune old Rust toolchains [@MickLesk](https://github.com/MickLesk) ([core#52](https://github.com/community-scripts/core/pull/52))
- Ask when the preselected storage cannot hold the content [@MickLesk](https://github.com/MickLesk) ([core#51](https://github.com/community-scripts/core/pull/51))
## 2026-09-20
+66
View File
@@ -0,0 +1,66 @@
#!/usr/bin/env bash
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/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: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://docs.ankiweb.net/sync-server.html
APP="Anki-Sync-Server"
var_tags="${var_tags:-anki;flashcards;sync}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /opt/anki-sync-server/.env ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "anki-sync-server" "ankitects/anki"; then
msg_info "Stopping Service"
systemctl stop anki-sync-server
msg_ok "Stopped Service"
create_backup /opt/anki-sync-server/.env /opt/anki-sync-server/data
msg_info "Updating Anki Sync Server"
$STD uv pip install --python /opt/anki-sync-server/venv/bin/python "anki==$(get_latest_github_release "ankitects/anki")"
cat <<EOF >~/.anki-sync-server
$(get_latest_github_release "ankitects/anki")
EOF
msg_ok "Updated Anki Sync Server"
restore_backup
msg_info "Starting Service"
systemctl start anki-sync-server
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}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:8080${CL}"
+6
View File
@@ -0,0 +1,6 @@
___ __ _ _____ _____
/ | ____ / /__(_) / ___/__ ______ _____ / ___/___ ______ _____ _____
/ /| | / __ \/ //_/ /_____\__ \/ / / / __ \/ ___/_____\__ \/ _ \/ ___/ | / / _ \/ ___/
/ ___ |/ / / / ,< / /_____/__/ / /_/ / / / / /__/_____/__/ / __/ / | |/ / __/ /
/_/ |_/_/ /_/_/|_/_/ /____/\__, /_/ /_/\___/ /____/\___/_/ |___/\___/_/
/____/
+31 -3
View File
@@ -33,15 +33,43 @@ function update_script() {
if check_for_gh_release "iventoy" "ventoy/PXE"; then
msg_info "Stopping iVentoy"
$STD /opt/iventoy/iventoy.sh stop
systemctl stop iventoy
msg_ok "Stopped iVentoy"
create_backup /opt/iventoy/data /opt/iventoy/iso
# Only preserve user state; data/iventoy.dat must match the new executable.
create_backup /opt/iventoy/data/config.dat /opt/iventoy/iso /opt/iventoy/user
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "iventoy" "ventoy/PXE" "prebuild" "latest" "/opt/iventoy" "iventoy-*-linux-$(arch_resolve x86_64-free arm64-trial).tar.gz"
restore_backup
# Migrate existing services that invoke the Bash launcher with sh.
mkdir -p /etc/systemd/system/iventoy.service.d
cat <<EOF >/etc/systemd/system/iventoy.service.d/launcher.conf
[Service]
ExecStart=
ExecStart=/bin/bash /opt/iventoy/iventoy.sh -R start
ExecStop=
ExecStop=/bin/bash /opt/iventoy/iventoy.sh stop
PIDFile=/run/iventoy.pid
RestartSec=5
EOF
systemctl daemon-reload
msg_info "Starting iVentoy"
$STD /opt/iventoy/iventoy.sh -R start
systemctl reset-failed iventoy
systemctl start iventoy
# The launcher can return success before the daemon fails initialization.
local i ready=0
for ((i = 0; i < 90; i++)); do
if systemctl is-active --quiet iventoy && curl -fsS --max-time 2 "${IVENTOY_HEALTH_URL:-http://127.0.0.1:26000/}" >/dev/null 2>&1; then
ready=1
break
fi
sleep 2
done
if [[ "$ready" -ne 1 ]]; then
msg_error "iVentoy did not become ready; check journalctl -u iventoy and /opt/iventoy/log/log.txt"
exit 1
fi
msg_ok "Started iVentoy"
msg_ok "Updated Successfully"
fi
+60
View File
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://docs.ankiweb.net/sync-server.html
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
UV_PYTHON="3.12" setup_uv
msg_info "Installing Anki Sync Server"
$STD uv venv --python 3.12 /opt/anki-sync-server/venv
$STD uv pip install --python /opt/anki-sync-server/venv/bin/python "anki==$(get_latest_github_release "ankitects/anki")"
cat <<EOF >~/.anki-sync-server
$(get_latest_github_release "ankitects/anki")
EOF
msg_ok "Installed Anki Sync Server"
msg_info "Configuring Anki Sync Server"
mkdir -p /opt/anki-sync-server/data
cat <<EOF >/opt/anki-sync-server/.env
SYNC_USER1=anki:$(tr -d '-' </proc/sys/kernel/random/uuid)
SYNC_BASE=/opt/anki-sync-server/data
SYNC_HOST=0.0.0.0
SYNC_PORT=8080
EOF
chmod 600 /opt/anki-sync-server/.env
msg_ok "Configured Anki Sync Server"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/anki-sync-server.service
[Unit]
Description=Anki Sync Server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/anki-sync-server
EnvironmentFile=/opt/anki-sync-server/.env
ExecStart=/opt/anki-sync-server/venv/bin/python -m anki.syncserver
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now anki-sync-server
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
+1 -1
View File
@@ -129,7 +129,7 @@ $STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms db:seed --force"
$STD su - librenms -s /bin/bash -c "cd /opt/librenms && lnms user:add -p ${APP_PASSWORD} ${APP_USER} --role=admin"
RANDOM_STRING=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9')
sed -i "s/RANDOMSTRINGHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
sed -i "s/RANDOMSTRINGGOESHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
echo "SNMP Community String: $RANDOM_STRING" >>~/librenms.creds
curl -qso /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
chmod +x /usr/bin/distro
+4 -1
View File
@@ -33,7 +33,10 @@ mv -f "/opt/tusd/tusd_linux_$(arch_resolve)/tusd" /opt/tusd/tusd
rm -rf "/opt/tusd/tusd_linux_$(arch_resolve)"
chmod +x /opt/tusd/tusd
PROJECT_SECRET=$(openssl rand -hex 32)
ADMIN_PASSWORD=$(openssl rand -base64 18 | tr -dc 'A-Za-z0-9' | head -c 16)
ADMIN_PASSWORD=""
until [[ "$ADMIN_PASSWORD" =~ [a-z] && "$ADMIN_PASSWORD" =~ [A-Z] && "$ADMIN_PASSWORD" =~ [0-9] && "$ADMIN_PASSWORD" =~ [^a-zA-Z0-9] ]]; do
ADMIN_PASSWORD=$(head -c 256 /dev/urandom | LC_ALL=C tr -dc 'A-Za-z0-9@%+=_-' | head -c 16)
done
cat <<EOF >/opt/portabase/.env
LOG_LEVEL=info
DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@127.0.0.1:5432/${PG_DB_NAME}
+2 -2
View File
@@ -81,7 +81,7 @@ function default_settings() {
VMID=$(get_valid_nextid)
ISO_DEFAULT="latest stable"
vm_apply_machine_type "q35"
DISK_SIZE="16"
DISK_SIZE="16G"
DISK_CACHE=""
HN="truenas"
CPU_TYPE=" -cpu host"
@@ -161,7 +161,7 @@ msg_info "Creating TrueNAS VM shell"
qm create "$VMID"${MACHINE} -bios ovmf -agent enabled=1 -tablet 0 -localtime 1${CPU_TYPE} \
-cores "$CORE_COUNT" -memory "$RAM_SIZE" -balloon 0 -name "$HN" -tags community-script \
-net0 "virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU" -onboot 1 -ostype l26 \
-efidisk0 $STORAGE:1,efitype=4m,pre-enrolled-keys=0 -sata0 $STORAGE:$DISK_SIZE,ssd=1 \
-efidisk0 $STORAGE:1,efitype=4m,pre-enrolled-keys=0 -sata0 ${STORAGE}:${DISK_SIZE%G},ssd=1 \
-scsihw virtio-scsi-single -cdrom local:iso/$ISO_NAME -boot order='sata0;ide2' -vga virtio >/dev/null
msg_ok "Created VM shell"