Add Anki Sync Server addon (self-hosted flashcard sync)

Installs the official self-hosted anki-sync-server (python -m
anki.syncserver from PyPI's anki package, no Qt/GUI deps) as a
systemd service under $KIOSK_USER, same shape as the Web UI addon:
venv under $ANKI_SYNC_DIR, EnvironmentFile under $ANKI_SYNC_ENV_DIR
(chmod 600 since it holds plaintext sync passwords), multi-user
support via SYNC_USER1/2/... Lets Anki desktop/AnkiDroid clients on
the LAN sync flashcards against this kiosk instead of AnkiWeb.

Added to the existing Addons menu rather than a new top-level
category - Addons is already a flat mix of unrelated self-hosted
services (printing, telephony, media server, remote access), so one
more service fits that pattern instead of fragmenting the menu
structure for a single item.

Wired into complete_uninstall.sh, clone_settings.sh's addon
detection/checklist, and the webui helper script's source list (which
documents itself as mirroring install.sh's sources exactly).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NoqDrsMq2dazAwGU1AodNc
This commit is contained in:
Claude
2026-09-09 13:47:43 +00:00
parent 08b33ef823
commit 75baab8914
7 changed files with 335 additions and 4 deletions
+11
View File
@@ -1291,6 +1291,17 @@ terminal menu and the web UI, so they can't drift apart).
steps, so any code or hardware-config change picked up by the pull
actually takes effect. Also offers an on-demand Electron version
check. See "Recent Updates (v2.15.0)" below.
- `menus/addon_anki_sync.sh` — **Anki Sync Server** (Addons): installs
the official self-hosted Anki sync server (`python -m
anki.syncserver`, from the `anki` PyPI package, no Qt/GUI deps) in
its own venv under `$ANKI_SYNC_DIR`, run as a systemd service under
`$KIOSK_USER`, same shape as the Web UI's Node app. Lets Anki desktop/
AnkiDroid clients on the LAN sync flashcards (simple vocab/math-fact
decks or complex custom note types) against this kiosk instead of
AnkiWeb; supports multiple sync accounts (`SYNC_USER1`, `SYNC_USER2`,
...). Quizlet sets still go through Anki's own tab-separated import
first — this server only syncs the resulting collection, same as it
would with AnkiWeb.
- `webui/` + `menus/addon_webui.sh` — **Web UI** (Addons, installed by
default during provisioning): a small Node/Express app running as a
systemd service under `$KIOSK_USER` with zero ambient `sudo`, giving