Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

feat(docker): opt-in "Update now" via a Watchtower sidecar; stop cleanly on SIGTERM (#1427)

Tashfeen0df6d4d9e1ae
diff --git a/.env.example b/.env.example
index eae8e6f1..8337c34f 100644
--- a/.env.example
+++ b/.env.example
@@ -331,6 +331,10 @@ REQUEST_ANALYTICS_MAX_ROWS=100000
# FREELLMAPI_UPDATE_GITHUB_TOKEN=
# FREELLMAPI_COMMIT_SHA and FREELLMAPI_INSTALL_METHOD are injected by official
# Docker and desktop builds and normally should not be set in .env.
+# Docker "Update now" (Settings > Check for updates). Set a long random token,
+# e.g. `openssl rand -hex 32`, then start with
+# `docker compose --profile autoupdate up -d`. See docker-compose.yml.
+# WATCHTOWER_TOKEN=
# Comma-separated extra origins allowed to call the API from a browser.
# localhost:5173, 127.0.0.1:5173, [::1]:5173 are allowed by default for the
diff --git a/client/src/components/docker-update.tsx b/client/src/components/docker-update.tsx
new file mode 100644
index 00000000..24e7cc59
--- /dev/null
+++ b/client/src/components/docker-update.tsx
@@ -0,0 +1,66 @@
+import { useState } from 'react'
+import { Loader2, RotateCw } from 'lucide-react'
+import { apiFetch } from '@/lib/api'
+import { fetchLatestIndex, isNewBuild, loadedEntryScript } from '@/lib/new-build'
+import { useI18n } from '@/i18n'
+
+const POLL_MS = 3000
+const GIVE_UP_MS = 5 * 60 * 1000
+
+type Phase = 'idle' | 'starting' | 'waiting' | 'failed' | 'timeout'
+
+/**
+ * Docker "Update now": the server asks its Watchtower sidecar to pull the new
+ * image and recreate the container (POST /api/update/apply), which takes this
+ * server down mid-session. The page then polls for index.html and reloads
+ * once the server is back — on a new build, or after it was seen restarting.
+ */
+export function DockerUpdateNow() {
+ const { t } = useI18n()
+ const [phase, setPhase] = useState<Phase>('idle')
+
+ async function start() {
+ setPhase('starting')
+ try {
+ await apiFetch('/api/update/apply', { method: 'POST' })
+ } catch {
+ setPhase('failed')
+ return
+ }
+ setPhase('waiting')
+ const loaded = loadedEntryScript()
+ const started = Date.now()
+ let wentDown = false
+ while (Date.now() - started < GIVE_UP_MS) {
+ await new Promise(resolve => setTimeout(resolve, POLL_MS))
+ try {
+ const html = await fetchLatestIndex()
+ if (isNewBuild(loaded, html) || wentDown) {
+ window.location.reload()
+ return
+ }
+ } catch {
+ wentDown = true
+ }
+ }
+ setPhase('timeout')
+ }
+
+ const busy = phase === 'starting' || phase === 'waiting'
+ return (
+ <div className="space-y-2">
+ <button
+ type="button"
+ onClick={() => void start()}
+ disabled={busy}
+ className="inline-flex items-center justify-center gap-1.5 rounded-lg bg-primary px-3.5 py-2 text-sm font-medium text-primary-foreground outline-none transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-60"
+ >
+ {busy ? <Loader2 className="size-4 animate-spin" aria-hidden /> : <RotateCw className="size-4" aria-hidden />}
+ {t('settings.updateNow')}
+ </button>
+ {phase === 'waiting' && <p className="text-[11px] text-muted-foreground">{t('settings.updatingContainer')}</p>}
+ {phase === 'failed' && <p role="alert" className="text-xs text-destructive">{t('settings.updateNowFailed')}</p>}
+ {phase === 'timeout' && <p role="alert" className="text-xs text-destructive">{t('settings.updateNowTimeout')}</p>}
+ </div>
+ )
+}
diff --git a/client/src/components/new-build-prompt.tsx b/client/src/components/new-build-prompt.tsx
index ff741961..a9b45db5 100644
--- a/client/src/components/new-build-prompt.tsx
+++ b/client/src/components/new-build-prompt.tsx
@@ -1,18 +1,13 @@
import { useEffect, useState } from 'react'
import { RotateCw } from 'lucide-react'
import { useI18n } from '@/i18n'
-import { isNewBuild } from '@/lib/new-build'
+import { fetchLatestIndex, isNewBuild, loadedEntryScript } from '@/lib/new-build'
/** At most one same-origin index.html fetch per minute, however often the tab
* regains focus; a tab left in the foreground re-checks every five. */
const MIN_GAP_MS = 60 * 1000
const POLL_MS = 5 * 60 * 1000
-function loadedEntry(): string | null {
- const script = document.querySelector<HTMLScriptElement>('script[type="module"][src]')
- return script?.src ?? null
-}
-
/**
* "A newer dashboard is installed — Reload." The server can be replaced under
* an open tab (docker compose pull, a source rebuild, a demo-box deploy); the
@@ -25,7 +20,7 @@ export function NewBuildPrompt() {
const [stale, setStale] = useState(false)
useEffect(() => {
- const loaded = loadedEntry()
+ const loaded = loadedEntryScript()
if (!loaded || !loaded.includes('/assets/')) return // dev server
let lastCheck = Date.now()
let cancelled = false
@@ -35,9 +30,8 @@ export function NewBuildPrompt() {
if (Date.now() - lastCheck < MIN_GAP_MS) return
lastCheck = Date.now()
try {
- const response = await fetch(import.meta.env.BASE_URL, { cache: 'no-store', headers: { Accept: 'text/html' } })
- if (!response.ok) return
- if (!cancelled && isNewBuild(loaded, await response.text())) setStale(true)
+ const html = await fetchLatestIndex()
+ if (!cancelled && isNewBuild(loaded, html)) setStale(true)
} catch { /* server restarting — try again on the next focus */ }
}
diff --git a/client/src/components/settings-dialog.tsx b/client/src/components/settings-dialog.tsx
index c8abbe2e..8c8231f0 100644
--- a/client/src/components/settings-dialog.tsx
+++ b/client/src/components/settings-dialog.tsx
@@ -30,6 +30,7 @@ import {
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
import { UPDATE_CHECK_CHANGED_EVENT } from '@/components/update-reminder'
import { DesktopUpdateActions } from '@/components/desktop-update'
+import { DockerUpdateNow } from '@/components/docker-update'
import { useDesktopUpdater } from '@/lib/desktop-updater'
import { Switch } from '@/components/ui/switch'
import { Tooltip } from '@/components/tooltip'
@@ -600,6 +601,8 @@ interface UpdateStatusInfo {
lastChecked: string | null
/** The release this build is, or null when it cannot be established honestly. */
version: string | null
+ /** A Docker install wired to its updater sidecar ("Update now"). */
+ selfUpdate?: boolean
}
interface UpdateCheckInfo {
@@ -608,6 +611,7 @@ interface UpdateCheckInfo {
localSha: string | null
checkedAt: string
version: string | null
+ selfUpdate?: boolean
remoteSha?: string
remoteDate?: string
remoteMessage?: string
@@ -953,6 +957,7 @@ function UpdateChecker({ active }: { active: boolean }) {
</div>
)}
+ {info.installation === 'docker' && info.selfUpdate && <DockerUpdateNow />}
{info.installation === 'docker' && (
<div className="flex gap-2 rounded-xl border bg-muted/30 p-3">
<SquareTerminal className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.json
index 27d96907..8b5741f3 100644
--- a/client/src/i18n/locales/am.json
+++ b/client/src/i18n/locales/am.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "በማውረድ ላይ… {percent}%",
"restartToUpdate": "ለማዘመን እንደገና አስጀምር",
"updateReadyHint": "ወርዷል። FreeLLMAPI ውሂብዎን ያስቀምጣል፣ እንደገና ይጀምራል እና አዲሱን ስሪት ይከፍታል።",
- "updateInstallFailed": "ዝማኔው ሊጫን አልቻለም።"
+ "updateInstallFailed": "ዝማኔው ሊጫን አልቻለም።",
+ "updateNow": "አሁን አዘምን",
+ "updatingContainer": "አዲሱን ምስል እያወረደ እንደገና በመጀመር ላይ። FreeLLMAPI ሲመለስ ይህ ገጽ እንደገና ይጫናል።",
+ "updateNowFailed": "አዘማኙ ጥያቄውን አልተቀበለም። የwatchtower ኮንቴይነር እየሰራ መሆኑን ያረጋግጡ።",
+ "updateNowTimeout": "FreeLLMAPI ከ5 ደቂቃ በኋላም እንደገና አልጀመረም። የwatchtower ኮንቴይነርን ምዝግብ ማስታወሻዎች ይመልከቱ።"
},
"models": {
"title": "ሞዴሎች",
diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json
index 5c32f67a..67bb0e6e 100644
--- a/client/src/i18n/locales/ar.json
+++ b/client/src/i18n/locales/ar.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "جارٍ التنزيل… {percent}%",
"restartToUpdate": "أعد التشغيل للتحديث",
"updateReadyHint": "اكتمل التنزيل. يحفظ FreeLLMAPI نسخة احتياطية من بياناتك ثم يعيد التشغيل ويفتح الإصدار الجديد.",
- "updateInstallFailed": "تعذّر تثبيت التحديث."
+ "updateInstallFailed": "تعذّر تثبيت التحديث.",
+ "updateNow": "حدّث الآن",
+ "updatingContainer": "جارٍ سحب الصورة الجديدة وإعادة التشغيل. ستُعاد تحميل هذه الصفحة عند عودة FreeLLMAPI.",
+ "updateNowFailed": "لم يقبل المحدِّث الطلب. تحقّق من أن حاوية watchtower تعمل.",
+ "updateNowTimeout": "لم يُعد FreeLLMAPI التشغيل بعد 5 دقائق. راجع سجلات حاوية watchtower."
},
"models": {
"title": "نماذج",
diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.json
index a5195107..8e70489f 100644
--- a/client/src/i18n/locales/az.json
+++ b/client/src/i18n/locales/az.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Endirilir… {percent}%",
"restartToUpdate": "Yeniləmək üçün yenidən başlat",
"updateReadyHint": "Endirildi. FreeLLMAPI məlumatlarınızın ehtiyat nüsxəsini çıxarır, yenidən başlayır və yeni versiyanı açır.",
- "updateInstallFailed": "Yeniləmə quraşdırıla bilmədi."
+ "updateInstallFailed": "Yeniləmə quraşdırıla bilmədi.",
+ "updateNow": "İndi yenilə",
+ "updatingContainer": "Yeni şəkil endirilir və yenidən başladılır. FreeLLMAPI qayıdanda bu səhifə yenilənəcək.",
+ "updateNowFailed": "Yeniləyici sorğunu qəbul etmədi. watchtower konteynerinin işlədiyini yoxlayın.",
+ "updateNowTimeout": "FreeLLMAPI 5 dəqiqədən sonra da yenidən başlamayıb. watchtower konteynerinin jurnallarına baxın."
},
"models": {
"title": "Modellər",
diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.json
index d347de80..23348f25 100644
--- a/client/src/i18n/locales/bg.json
+++ b/client/src/i18n/locales/bg.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Изтегляне… {percent}%",
"restartToUpdate": "Рестартирай за актуализиране",
"updateReadyHint": "Изтеглено. FreeLLMAPI архивира данните ви, рестартира и отваря новата версия.",
- "updateInstallFailed": "Актуализацията не можа да се инсталира."
+ "updateInstallFailed": "Актуализацията не можа да се инсталира.",
+ "updateNow": "Актуализирай сега",
+ "updatingContainer": "Изтегля се новият образ и се рестартира. Страницата ще се презареди, когато FreeLLMAPI се върне.",
+ "updateNowFailed": "Актуализаторът не прие заявката. Проверете дали контейнерът watchtower работи.",
+ "updateNowTimeout": "FreeLLMAPI не се е рестартирал след 5 минути. Проверете логовете на контейнера watchtower."
},
"models": {
"title": "Модели",
diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.json
index 661b15ca..aeaecc0e 100644
--- a/client/src/i18n/locales/bn.json
+++ b/client/src/i18n/locales/bn.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ডাউনলোড হচ্ছে… {percent}%",
"restartToUpdate": "আপডেট করতে রিস্টার্ট করুন",
"updateReadyHint": "ডাউনলোড হয়েছে। FreeLLMAPI আপনার ডেটার ব্যাকআপ নেয়, রিস্টার্ট করে এবং নতুন সংস্করণ খোলে।",
- "updateInstallFailed": "আপডেট ইনস্টল করা যায়নি।"
+ "updateInstallFailed": "আপডেট ইনস্টল করা যায়নি।",
+ "updateNow": "এখনই আপডেট করুন",
+ "updatingContainer": "নতুন ইমেজ টেনে আনা হচ্ছে এবং রিস্টার্ট হচ্ছে। FreeLLMAPI ফিরে এলে এই পেজ রিলোড হবে।",
+ "updateNowFailed": "আপডেটার অনুরোধটি গ্রহণ করেনি। watchtower কন্টেইনার চলছে কিনা দেখুন।",
+ "updateNowTimeout": "৫ মিনিট পরও FreeLLMAPI রিস্টার্ট হয়নি। watchtower কন্টেইনারের লগ দেখুন।"
},
"models": {
"title": "মডেল",
diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.json
index 536003c1..124b3eec 100644
--- a/client/src/i18n/locales/cs.json
+++ b/client/src/i18n/locales/cs.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Stahování… {percent} %",
"restartToUpdate": "Restartovat a aktualizovat",
"updateReadyHint": "Staženo. FreeLLMAPI zálohuje vaše data, restartuje se a otevře novou verzi.",
- "updateInstallFailed": "Aktualizaci se nepodařilo nainstalovat."
+ "updateInstallFailed": "Aktualizaci se nepodařilo nainstalovat.",
+ "updateNow": "Aktualizovat nyní",
+ "updatingContainer": "Stahuje se nový obraz a probíhá restart. Stránka se znovu načte, až bude FreeLLMAPI zpět.",
+ "updateNowFailed": "Aktualizátor požadavek nepřijal. Zkontrolujte, že kontejner watchtower běží.",
+ "updateNowTimeout": "FreeLLMAPI se ani po 5 minutách nerestartoval. Zkontrolujte logy kontejneru watchtower."
},
"models": {
"title": "Modely",
diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.json
index bf2b349c..df10965d 100644
--- a/client/src/i18n/locales/da.json
+++ b/client/src/i18n/locales/da.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Henter… {percent} %",
"restartToUpdate": "Genstart for at opdatere",
"updateReadyHint": "Hentet. FreeLLMAPI tager backup af dine data, genstarter og åbner den nye version.",
- "updateInstallFailed": "Opdateringen kunne ikke installeres."
+ "updateInstallFailed": "Opdateringen kunne ikke installeres.",
+ "updateNow": "Opdater nu",
+ "updatingContainer": "Henter det nye image og genstarter. Siden genindlæses, når FreeLLMAPI er tilbage.",
+ "updateNowFailed": "Opdateringstjenesten afviste anmodningen. Tjek at watchtower-containeren kører.",
+ "updateNowTimeout": "FreeLLMAPI er ikke genstartet efter 5 minutter. Tjek logfilerne for watchtower-containeren."
},
"models": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index 756949bd..dd18371e 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Wird heruntergeladen… {percent} %",
"restartToUpdate": "Neu starten und aktualisieren",
"updateReadyHint": "Heruntergeladen. FreeLLMAPI sichert Ihre Daten, startet neu und öffnet die neue Version.",
- "updateInstallFailed": "Das Update konnte nicht installiert werden."
+ "updateInstallFailed": "Das Update konnte nicht installiert werden.",
+ "updateNow": "Jetzt aktualisieren",
+ "updatingContainer": "Das neue Image wird geladen und neu gestartet. Die Seite lädt neu, sobald FreeLLMAPI wieder da ist.",
+ "updateNowFailed": "Der Updater hat die Anfrage nicht angenommen. Prüfen Sie, ob der watchtower-Container läuft.",
+ "updateNowTimeout": "FreeLLMAPI ist nach 5 Minuten nicht neu gestartet. Prüfen Sie die Logs des watchtower-Containers."
},
"models": {
"title": "Modelle",
diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.json
index f2eb54b1..7b82b975 100644
--- a/client/src/i18n/locales/el.json
+++ b/client/src/i18n/locales/el.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Λήψη… {percent}%",
"restartToUpdate": "Επανεκκίνηση για ενημέρωση",
"updateReadyHint": "Η λήψη ολοκληρώθηκε. Το FreeLLMAPI δημιουργεί αντίγραφο ασφαλείας των δεδομένων σας, επανεκκινείται και ανοίγει τη νέα έκδοση.",
- "updateInstallFailed": "Η ενημέρωση δεν ήταν δυνατό να εγκατασταθεί."
+ "updateInstallFailed": "Η ενημέρωση δεν ήταν δυνατό να εγκατασταθεί.",
+ "updateNow": "Ενημέρωση τώρα",
+ "updatingContainer": "Λήψη της νέας εικόνας και επανεκκίνηση. Η σελίδα θα φορτωθεί ξανά όταν επιστρέψει το FreeLLMAPI.",
+ "updateNowFailed": "Το πρόγραμμα ενημέρωσης δεν δέχτηκε το αίτημα. Ελέγξτε ότι εκτελείται το κοντέινερ watchtower.",
+ "updateNowTimeout": "Το FreeLLMAPI δεν έχει επανεκκινηθεί μετά από 5 λεπτά. Ελέγξτε τα αρχεία καταγραφής του κοντέινερ watchtower."
},
"models": {
"title": "Μοντέλα",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index 4cb8c991..24d76cc4 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Downloading… {percent}%",
"restartToUpdate": "Restart to update",
"updateReadyHint": "Downloaded. FreeLLMAPI backs up your data, restarts and opens the new version.",
- "updateInstallFailed": "The update could not be installed."
+ "updateInstallFailed": "The update could not be installed.",
+ "updateNow": "Update now",
+ "updatingContainer": "Pulling the new image and restarting. This page reloads when FreeLLMAPI is back.",
+ "updateNowFailed": "The updater did not accept the request. Check that the watchtower container is running.",
+ "updateNowTimeout": "FreeLLMAPI has not restarted after 5 minutes. Check the watchtower container's logs."
},
"models": {
"title": "Models",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index ea8d07e9..c71ece58 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Descargando… {percent} %",
"restartToUpdate": "Reiniciar para actualizar",
"updateReadyHint": "Descargada. FreeLLMAPI hace una copia de seguridad de tus datos, se reinicia y abre la nueva versión.",
- "updateInstallFailed": "No se pudo instalar la actualización."
+ "updateInstallFailed": "No se pudo instalar la actualización.",
+ "updateNow": "Actualizar ahora",
+ "updatingContainer": "Descargando la nueva imagen y reiniciando. Esta página se recargará cuando FreeLLMAPI vuelva.",
+ "updateNowFailed": "El actualizador no aceptó la solicitud. Comprueba que el contenedor watchtower está en marcha.",
+ "updateNowTimeout": "FreeLLMAPI no se ha reiniciado tras 5 minutos. Revisa los registros del contenedor watchtower."
},
"models": {
"title": "Modelos",
diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.json
index 07ad4dad..e56535c1 100644
--- a/client/src/i18n/locales/fa.json
+++ b/client/src/i18n/locales/fa.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "در حال دانلود… {percent}٪",
"restartToUpdate": "راه‌اندازی مجدد برای به‌روزرسانی",
"updateReadyHint": "دانلود شد. FreeLLMAPI از داده‌های شما پشتیبان می‌گیرد، دوباره راه‌اندازی می‌شود و نسخهٔ جدید را باز می‌کند.",
- "updateInstallFailed": "به‌روزرسانی نصب نشد."
+ "updateInstallFailed": "به‌روزرسانی نصب نشد.",
+ "updateNow": "اکنون به‌روزرسانی کن",
+ "updatingContainer": "در حال دریافت ایمیج جدید و راه‌اندازی مجدد. وقتی FreeLLMAPI برگردد این صفحه دوباره بارگذاری می‌شود.",
+ "updateNowFailed": "به‌روزرسان درخواست را نپذیرفت. بررسی کنید کانتینر watchtower در حال اجراست.",
+ "updateNowTimeout": "FreeLLMAPI پس از ۵ دقیقه دوباره راه‌اندازی نشده است. گزارش‌های کانتینر watchtower را بررسی کنید."
},
"models": {
"title": "مدل ها",
diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.json
index 27acd1af..0837496f 100644
--- a/client/src/i18n/locales/fi.json
+++ b/client/src/i18n/locales/fi.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Ladataan… {percent} %",
"restartToUpdate": "Käynnistä uudelleen päivittääksesi",
"updateReadyHint": "Ladattu. FreeLLMAPI varmuuskopioi tietosi, käynnistyy uudelleen ja avaa uuden version.",
- "updateInstallFailed": "Päivitystä ei voitu asentaa."
+ "updateInstallFailed": "Päivitystä ei voitu asentaa.",
+ "updateNow": "Päivitä nyt",
+ "updatingContainer": "Ladataan uutta imagea ja käynnistetään uudelleen. Sivu latautuu uudelleen, kun FreeLLMAPI palaa.",
+ "updateNowFailed": "Päivittäjä ei hyväksynyt pyyntöä. Tarkista, että watchtower-kontti on käynnissä.",
+ "updateNowTimeout": "FreeLLMAPI ei ole käynnistynyt uudelleen 5 minuutissa. Tarkista watchtower-kontin lokit."
},
"models": {
"title": "Mallit",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index d55714a5..9dfcc3d7 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Téléchargement… {percent} %",
"restartToUpdate": "Redémarrer pour mettre à jour",
"updateReadyHint": "Téléchargée. FreeLLMAPI sauvegarde vos données, redémarre et ouvre la nouvelle version.",
- "updateInstallFailed": "La mise à jour n’a pas pu être installée."
+ "updateInstallFailed": "La mise à jour n’a pas pu être installée.",
+ "updateNow": "Mettre à jour maintenant",
+ "updatingContainer": "Téléchargement de la nouvelle image et redémarrage. Cette page se recharge quand FreeLLMAPI est de retour.",
+ "updateNowFailed": "Le service de mise à jour a refusé la demande. Vérifiez que le conteneur watchtower tourne.",
+ "updateNowTimeout": "FreeLLMAPI n’a pas redémarré après 5 minutes. Consultez les journaux du conteneur watchtower."
},
"models": {
"title": "Modèles",
diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.json
index 61ab1a34..c10bbe2d 100644
--- a/client/src/i18n/locales/gu.json
+++ b/client/src/i18n/locales/gu.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ડાઉનલોડ થઈ રહ્યું છે… {percent}%",
"restartToUpdate": "અપડેટ કરવા ફરી શરૂ કરો",
"updateReadyHint": "ડાઉનલોડ થયું. FreeLLMAPI તમારા ડેટાનો બેકઅપ લે છે, ફરી શરૂ થાય છે અને નવું સંસ્કરણ ખોલે છે.",
- "updateInstallFailed": "અપડેટ ઇન્સ્ટોલ થઈ શક્યું નહીં."
+ "updateInstallFailed": "અપડેટ ઇન્સ્ટોલ થઈ શક્યું નહીં.",
+ "updateNow": "હમણાં અપડેટ કરો",
+ "updatingContainer": "નવી ઇમેજ ખેંચી રહ્યા છીએ અને ફરી શરૂ કરી રહ્યા છીએ. FreeLLMAPI પાછું આવે ત્યારે આ પેજ ફરી લોડ થશે.",
+ "updateNowFailed": "અપડેટરે વિનંતી સ્વીકારી નહીં. watchtower કન્ટેનર ચાલુ છે કે નહીં તે તપાસો.",
+ "updateNowTimeout": "5 મિનિટ પછી પણ FreeLLMAPI ફરી શરૂ થયું નથી. watchtower કન્ટેનરના લૉગ તપાસો."
},
"models": {
"title": "મોડલ્સ",
diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.json
index c1ae9bc8..2ed901c4 100644
--- a/client/src/i18n/locales/ha.json
+++ b/client/src/i18n/locales/ha.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Ana saukewa… {percent}%",
"restartToUpdate": "Sake farawa don sabuntawa",
"updateReadyHint": "An sauke. FreeLLMAPI yana adana bayananka, sai ya sake farawa ya buɗe sabon sigar.",
- "updateInstallFailed": "Ba a iya shigar da sabuntawar ba."
+ "updateInstallFailed": "Ba a iya shigar da sabuntawar ba.",
+ "updateNow": "Sabunta yanzu",
+ "updatingContainer": "Ana jan sabon hoto ana sake farawa. Wannan shafin zai sake lodawa idan FreeLLMAPI ya dawo.",
+ "updateNowFailed": "Mai sabuntawa bai karɓi buƙatar ba. Duba ko kwantena watchtower yana aiki.",
+ "updateNowTimeout": "FreeLLMAPI bai sake farawa ba bayan minti 5. Duba bayanan log na kwantena watchtower."
},
"models": {
"title": "Samfura",
diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.json
index 8d158c91..d154ba07 100644
--- a/client/src/i18n/locales/he.json
+++ b/client/src/i18n/locales/he.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "מוריד… {percent}%",
"restartToUpdate": "הפעלה מחדש לעדכון",
"updateReadyHint": "ההורדה הושלמה. FreeLLMAPI מגבה את הנתונים שלך, מופעל מחדש ופותח את הגרסה החדשה.",
- "updateInstallFailed": "לא ניתן היה להתקין את העדכון."
+ "updateInstallFailed": "לא ניתן היה להתקין את העדכון.",
+ "updateNow": "עדכן עכשיו",
+ "updatingContainer": "מושך את האימג׳ החדש ומפעיל מחדש. הדף ייטען מחדש כש-FreeLLMAPI יחזור.",
+ "updateNowFailed": "המעדכן לא קיבל את הבקשה. ודאו שמכולת watchtower פועלת.",
+ "updateNowTimeout": "FreeLLMAPI לא הופעל מחדש אחרי 5 דקות. בדקו את היומנים של מכולת watchtower."
},
"models": {
"title": "דגמים",
diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.json
index 9c552b91..5dbe3dd9 100644
--- a/client/src/i18n/locales/hi.json
+++ b/client/src/i18n/locales/hi.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "डाउनलोड हो रहा है… {percent}%",
"restartToUpdate": "अपडेट के लिए रीस्टार्ट करें",
"updateReadyHint": "डाउनलोड हो गया। FreeLLMAPI आपके डेटा का बैकअप लेता है, रीस्टार्ट होता है और नया संस्करण खोलता है।",
- "updateInstallFailed": "अपडेट इंस्टॉल नहीं हो सका।"
+ "updateInstallFailed": "अपडेट इंस्टॉल नहीं हो सका।",
+ "updateNow": "अभी अपडेट करें",
+ "updatingContainer": "नई इमेज खींची जा रही है और रीस्टार्ट हो रहा है। FreeLLMAPI वापस आने पर यह पेज रीलोड होगा।",
+ "updateNowFailed": "अपडेटर ने अनुरोध स्वीकार नहीं किया। जाँचें कि watchtower कंटेनर चल रहा है।",
+ "updateNowTimeout": "5 मिनट बाद भी FreeLLMAPI रीस्टार्ट नहीं हुआ। watchtower कंटेनर के लॉग देखें।"
},
"models": {
"title": "मॉडल",
diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.json
index 1921c23a..3618c12b 100644
--- a/client/src/i18n/locales/hr.json
+++ b/client/src/i18n/locales/hr.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Preuzimanje… {percent} %",
"restartToUpdate": "Ponovno pokreni za ažuriranje",
"updateReadyHint": "Preuzeto. FreeLLMAPI sigurnosno kopira vaše podatke, ponovno se pokreće i otvara novu verziju.",
- "updateInstallFailed": "Ažuriranje se nije moglo instalirati."
+ "updateInstallFailed": "Ažuriranje se nije moglo instalirati.",
+ "updateNow": "Ažuriraj sada",
+ "updatingContainer": "Preuzimanje nove slike i ponovno pokretanje. Stranica će se ponovno učitati kad se FreeLLMAPI vrati.",
+ "updateNowFailed": "Ažurirač nije prihvatio zahtjev. Provjerite radi li kontejner watchtower.",
+ "updateNowTimeout": "FreeLLMAPI se nije ponovno pokrenuo nakon 5 minuta. Provjerite zapise kontejnera watchtower."
},
"models": {
"title": "Modeli",
diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.json
index ed44c8ba..8fbaf559 100644
--- a/client/src/i18n/locales/hu.json
+++ b/client/src/i18n/locales/hu.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Letöltés… {percent}%",
"restartToUpdate": "Újraindítás a frissítéshez",
"updateReadyHint": "Letöltve. A FreeLLMAPI biztonsági mentést készít az adatairól, újraindul, és megnyitja az új verziót.",
- "updateInstallFailed": "A frissítést nem sikerült telepíteni."
+ "updateInstallFailed": "A frissítést nem sikerült telepíteni.",
+ "updateNow": "Frissítés most",
+ "updatingContainer": "Az új image letöltése és újraindítás. Az oldal újratöltődik, amikor a FreeLLMAPI visszatér.",
+ "updateNowFailed": "A frissítő nem fogadta el a kérést. Ellenőrizze, hogy fut-e a watchtower konténer.",
+ "updateNowTimeout": "A FreeLLMAPI 5 perc után sem indult újra. Nézze meg a watchtower konténer naplóit."
},
"models": {
"title": "Modellek",
diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.json
index d73fc4a4..f159ff07 100644
--- a/client/src/i18n/locales/id.json
+++ b/client/src/i18n/locales/id.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Mengunduh… {percent}%",
"restartToUpdate": "Mulai ulang untuk memperbarui",
"updateReadyHint": "Selesai diunduh. FreeLLMAPI mencadangkan data Anda, memulai ulang, lalu membuka versi baru.",
- "updateInstallFailed": "Pembaruan tidak dapat dipasang."
+ "updateInstallFailed": "Pembaruan tidak dapat dipasang.",
+ "updateNow": "Perbarui sekarang",
+ "updatingContainer": "Menarik image baru dan memulai ulang. Halaman ini dimuat ulang saat FreeLLMAPI kembali.",
+ "updateNowFailed": "Pembaru tidak menerima permintaan. Pastikan kontainer watchtower berjalan.",
+ "updateNowTimeout": "FreeLLMAPI belum dimulai ulang setelah 5 menit. Periksa log kontainer watchtower."
},
"models": {
"title": "Model",
diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.json
index 43aa5bb4..e864efa1 100644
--- a/client/src/i18n/locales/ig.json
+++ b/client/src/i18n/locales/ig.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Na-ebudata… {percent}%",
"restartToUpdate": "Malitegharịa ka imelite",
"updateReadyHint": "Ebudatala. FreeLLMAPI na-echekwa data gị, malitegharịa ma mepee ụdị ọhụrụ.",
- "updateInstallFailed": "Enweghị ike itinye mmelite ahụ."
+ "updateInstallFailed": "Enweghị ike itinye mmelite ahụ.",
+ "updateNow": "Melite ugbu a",
+ "updatingContainer": "Na-adọta onyonyo ọhụrụ ma na-amalitegharị. Ibe a ga-ebugharị mgbe FreeLLMAPI lọghachiri.",
+ "updateNowFailed": "Onye mmelite anabataghị arịrịọ ahụ. Lelee ma akpa watchtower na-arụ ọrụ.",
+ "updateNowTimeout": "FreeLLMAPI amalitegharịbeghị mgbe nkeji 5 gachara. Lelee ndekọ akpa watchtower."
},
"models": {
"title": "Ụdị",
diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.json
index 11e159e3..0c27615f 100644
--- a/client/src/i18n/locales/it.json
+++ b/client/src/i18n/locales/it.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Download in corso… {percent}%",
"restartToUpdate": "Riavvia per aggiornare",
"updateReadyHint": "Scaricato. FreeLLMAPI esegue il backup dei tuoi dati, si riavvia e apre la nuova versione.",
- "updateInstallFailed": "Impossibile installare l’aggiornamento."
+ "updateInstallFailed": "Impossibile installare l’aggiornamento.",
+ "updateNow": "Aggiorna ora",
+ "updatingContainer": "Download della nuova immagine e riavvio in corso. La pagina si ricarica quando FreeLLMAPI torna disponibile.",
+ "updateNowFailed": "Il servizio di aggiornamento non ha accettato la richiesta. Verifica che il container watchtower sia in esecuzione.",
+ "updateNowTimeout": "FreeLLMAPI non si è riavviato dopo 5 minuti. Controlla i log del container watchtower."
},
"models": {
"title": "Modelli",
diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.json
index bbeb6eae..6757574c 100644
--- a/client/src/i18n/locales/ja.json
+++ b/client/src/i18n/locales/ja.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ダウンロード中… {percent}%",
"restartToUpdate": "再起動してアップデート",
"updateReadyHint": "ダウンロード完了。FreeLLMAPI はデータをバックアップしてから再起動し、新しいバージョンを開きます。",
- "updateInstallFailed": "アップデートをインストールできませんでした。"
+ "updateInstallFailed": "アップデートをインストールできませんでした。",
+ "updateNow": "今すぐアップデート",
+ "updatingContainer": "新しいイメージを取得して再起動しています。FreeLLMAPI が戻るとこのページは再読み込みされます。",
+ "updateNowFailed": "アップデーターがリクエストを受け付けませんでした。watchtower コンテナが動いているか確認してください。",
+ "updateNowTimeout": "5 分経っても FreeLLMAPI が再起動していません。watchtower コンテナのログを確認してください。"
},
"models": {
"title": "モデル",
diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.json
index ae549d99..f2fb0a57 100644
--- a/client/src/i18n/locales/ka.json
+++ b/client/src/i18n/locales/ka.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "იტვირთება… {percent}%",
"restartToUpdate": "გადატვირთვა განახლებისთვის",
"updateReadyHint": "ჩამოიტვირთა. FreeLLMAPI ქმნის თქვენი მონაცემების სარეზერვო ასლს, გადაიტვირთება და გახსნის ახალ ვერსიას.",
- "updateInstallFailed": "განახლების დაყენება ვერ მოხერხდა."
+ "updateInstallFailed": "განახლების დაყენება ვერ მოხერხდა.",
+ "updateNow": "ახლავე განახლება",
+ "updatingContainer": "ახალი იმიჯის ჩამოტვირთვა და გადატვირთვა. გვერდი გადაიტვირთება, როცა FreeLLMAPI დაბრუნდება.",
+ "updateNowFailed": "განახლების სერვისმა მოთხოვნა არ მიიღო. შეამოწმეთ, მუშაობს თუ არა watchtower კონტეინერი.",
+ "updateNowTimeout": "FreeLLMAPI 5 წუთის შემდეგაც არ გადაიტვირთა. შეამოწმეთ watchtower კონტეინერის ჟურნალები."
},
"models": {
"title": "მოდელები",
diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.json
index a9b02c66..2eac67b3 100644
--- a/client/src/i18n/locales/km.json
+++ b/client/src/i18n/locales/km.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "កំពុងទាញយក… {percent}%",
"restartToUpdate": "ចាប់ផ្ដើមឡើងវិញដើម្បីធ្វើបច្ចុប្បន្នភាព",
"updateReadyHint": "បានទាញយករួច។ FreeLLMAPI បម្រុងទុកទិន្នន័យរបស់អ្នក ចាប់ផ្ដើមឡើងវិញ ហើយបើកកំណែថ្មី។",
- "updateInstallFailed": "មិនអាចដំឡើងបច្ចុប្បន្នភាពបានទេ។"
+ "updateInstallFailed": "មិនអាចដំឡើងបច្ចុប្បន្នភាពបានទេ។",
+ "updateNow": "ធ្វើបច្ចុប្បន្នភាពឥឡូវនេះ",
+ "updatingContainer": "កំពុងទាញរូបភាពថ្មី ហើយចាប់ផ្ដើមឡើងវិញ។ ទំព័រនេះនឹងផ្ទុកឡើងវិញពេល FreeLLMAPI ត្រឡប់មកវិញ។",
+ "updateNowFailed": "កម្មវិធីធ្វើបច្ចុប្បន្នភាពមិនបានទទួលសំណើទេ។ ពិនិត្យថា container watchtower កំពុងដំណើរការ។",
+ "updateNowTimeout": "FreeLLMAPI មិនទាន់ចាប់ផ្ដើមឡើងវិញក្រោយ ៥ នាទី។ ពិនិត្យកំណត់ហេតុរបស់ container watchtower។"
},
"models": {
"title": "ម៉ូដែល",
diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.json
index 24468f2d..a78ff29e 100644
--- a/client/src/i18n/locales/kn.json
+++ b/client/src/i18n/locales/kn.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ಡೌನ್‌ಲೋಡ್ ಆಗುತ್ತಿದೆ… {percent}%",
"restartToUpdate": "ಅಪ್‌ಡೇಟ್ ಮಾಡಲು ಮರುಪ್ರಾರಂಭಿಸಿ",
"updateReadyHint": "ಡೌನ್‌ಲೋಡ್ ಆಗಿದೆ. FreeLLMAPI ನಿಮ್ಮ ಡೇಟಾದ ಬ್ಯಾಕಪ್ ತೆಗೆದು, ಮರುಪ್ರಾರಂಭಿಸಿ ಹೊಸ ಆವೃತ್ತಿಯನ್ನು ತೆರೆಯುತ್ತದೆ.",
- "updateInstallFailed": "ಅಪ್‌ಡೇಟ್ ಅನ್ನು ಸ್ಥಾಪಿಸಲಾಗಲಿಲ್ಲ."
+ "updateInstallFailed": "ಅಪ್‌ಡೇಟ್ ಅನ್ನು ಸ್ಥಾಪಿಸಲಾಗಲಿಲ್ಲ.",
+ "updateNow": "ಈಗಲೇ ಅಪ್‌ಡೇಟ್ ಮಾಡಿ",
+ "updatingContainer": "ಹೊಸ ಇಮೇಜ್ ಎಳೆಯಲಾಗುತ್ತಿದೆ ಮತ್ತು ಮರುಪ್ರಾರಂಭಿಸಲಾಗುತ್ತಿದೆ. FreeLLMAPI ಮರಳಿದಾಗ ಈ ಪುಟ ಮರುಲೋಡ್ ಆಗುತ್ತದೆ.",
+ "updateNowFailed": "ಅಪ್‌ಡೇಟರ್ ವಿನಂತಿಯನ್ನು ಸ್ವೀಕರಿಸಲಿಲ್ಲ. watchtower ಕಂಟೇನರ್ ಚಾಲನೆಯಲ್ಲಿದೆಯೇ ಎಂದು ಪರಿಶೀಲಿಸಿ.",
+ "updateNowTimeout": "5 ನಿಮಿಷಗಳ ನಂತರವೂ FreeLLMAPI ಮರುಪ್ರಾರಂಭವಾಗಿಲ್ಲ. watchtower ಕಂಟೇನರ್ ಲಾಗ್‌ಗಳನ್ನು ಪರಿಶೀಲಿಸಿ."
},
"models": {
"title": "ಮಾದರಿಗಳು",
diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.json
index e0288635..d38c9019 100644
--- a/client/src/i18n/locales/ko.json
+++ b/client/src/i18n/locales/ko.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "다운로드 중… {percent}%",
"restartToUpdate": "재시작하여 업데이트",
"updateReadyHint": "다운로드 완료. FreeLLMAPI가 데이터를 백업한 뒤 재시작하고 새 버전을 엽니다.",
- "updateInstallFailed": "업데이트를 설치하지 못했습니다."
+ "updateInstallFailed": "업데이트를 설치하지 못했습니다.",
+ "updateNow": "지금 업데이트",
+ "updatingContainer": "새 이미지를 받아 재시작하는 중입니다. FreeLLMAPI가 돌아오면 이 페이지가 새로고침됩니다.",
+ "updateNowFailed": "업데이터가 요청을 받지 않았습니다. watchtower 컨테이너가 실행 중인지 확인하세요.",
+ "updateNowTimeout": "5분이 지나도 FreeLLMAPI가 재시작되지 않았습니다. watchtower 컨테이너 로그를 확인하세요."
},
"models": {
"title": "모델",
diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.json
index 60fae82a..9e44cdee 100644
--- a/client/src/i18n/locales/lt.json
+++ b/client/src/i18n/locales/lt.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Atsisiunčiama… {percent} %",
"restartToUpdate": "Paleisti iš naujo ir atnaujinti",
"updateReadyHint": "Atsisiųsta. FreeLLMAPI padaro jūsų duomenų atsarginę kopiją, pasileidžia iš naujo ir atidaro naują versiją.",
- "updateInstallFailed": "Naujinimo įdiegti nepavyko."
+ "updateInstallFailed": "Naujinimo įdiegti nepavyko.",
+ "updateNow": "Atnaujinti dabar",
+ "updatingContainer": "Atsisiunčiamas naujas atvaizdas ir paleidžiama iš naujo. Puslapis įsikels iš naujo, kai FreeLLMAPI grįš.",
+ "updateNowFailed": "Atnaujintuvas nepriėmė užklausos. Patikrinkite, ar veikia watchtower konteineris.",
+ "updateNowTimeout": "FreeLLMAPI per 5 minutes nepasileido iš naujo. Peržiūrėkite watchtower konteinerio žurnalus."
},
"models": {
"title": "Modeliai",
diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.json
index 1b0dc575..95c7321a 100644
--- a/client/src/i18n/locales/ml.json
+++ b/client/src/i18n/locales/ml.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ഡൗൺലോഡ് ചെയ്യുന്നു… {percent}%",
"restartToUpdate": "അപ്‌ഡേറ്റിനായി റീസ്റ്റാർട്ട് ചെയ്യുക",
"updateReadyHint": "ഡൗൺലോഡ് ചെയ്തു. FreeLLMAPI നിങ്ങളുടെ ഡാറ്റ ബാക്കപ്പ് ചെയ്ത് റീസ്റ്റാർട്ട് ചെയ്ത് പുതിയ പതിപ്പ് തുറക്കും.",
- "updateInstallFailed": "അപ്‌ഡേറ്റ് ഇൻസ്റ്റാൾ ചെയ്യാനായില്ല."
+ "updateInstallFailed": "അപ്‌ഡേറ്റ് ഇൻസ്റ്റാൾ ചെയ്യാനായില്ല.",
+ "updateNow": "ഇപ്പോൾ അപ്‌ഡേറ്റ് ചെയ്യുക",
+ "updatingContainer": "പുതിയ ഇമേജ് എടുത്ത് റീസ്റ്റാർട്ട് ചെയ്യുന്നു. FreeLLMAPI തിരിച്ചെത്തുമ്പോൾ ഈ പേജ് റീലോഡ് ചെയ്യും.",
+ "updateNowFailed": "അപ്‌ഡേറ്റർ അഭ്യർത്ഥന സ്വീകരിച്ചില്ല. watchtower കണ്ടെയ്‌നർ പ്രവർത്തിക്കുന്നുണ്ടോ എന്ന് പരിശോധിക്കുക.",
+ "updateNowTimeout": "5 മിനിറ്റിനുശേഷവും FreeLLMAPI റീസ്റ്റാർട്ട് ആയില്ല. watchtower കണ്ടെയ്‌നറിന്റെ ലോഗുകൾ പരിശോധിക്കുക."
},
"models": {
"title": "മോഡലുകൾ",
diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.json
index 85d11229..6b9f4355 100644
--- a/client/src/i18n/locales/mr.json
+++ b/client/src/i18n/locales/mr.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "डाउनलोड होत आहे… {percent}%",
"restartToUpdate": "अपडेटसाठी रीस्टार्ट करा",
"updateReadyHint": "डाउनलोड झाले. FreeLLMAPI तुमच्या डेटाचा बॅकअप घेते, रीस्टार्ट होते आणि नवीन आवृत्ती उघडते.",
- "updateInstallFailed": "अपडेट इंस्टॉल होऊ शकले नाही."
+ "updateInstallFailed": "अपडेट इंस्टॉल होऊ शकले नाही.",
+ "updateNow": "आता अपडेट करा",
+ "updatingContainer": "नवीन इमेज ओढली जात आहे आणि रीस्टार्ट होत आहे. FreeLLMAPI परत आल्यावर हे पेज रीलोड होईल.",
+ "updateNowFailed": "अपडेटरने विनंती स्वीकारली नाही. watchtower कंटेनर चालू आहे का ते तपासा.",
+ "updateNowTimeout": "५ मिनिटांनंतरही FreeLLMAPI रीस्टार्ट झाले नाही. watchtower कंटेनरचे लॉग तपासा."
},
"models": {
"title": "मॉडेल्स",
diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.json
index 20d63b69..17fc198f 100644
--- a/client/src/i18n/locales/ms.json
+++ b/client/src/i18n/locales/ms.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Memuat turun… {percent}%",
"restartToUpdate": "Mulakan semula untuk mengemas kini",
"updateReadyHint": "Selesai dimuat turun. FreeLLMAPI menyandarkan data anda, bermula semula dan membuka versi baharu.",
- "updateInstallFailed": "Kemas kini tidak dapat dipasang."
+ "updateInstallFailed": "Kemas kini tidak dapat dipasang.",
+ "updateNow": "Kemas kini sekarang",
+ "updatingContainer": "Menarik imej baharu dan memulakan semula. Halaman ini dimuat semula apabila FreeLLMAPI kembali.",
+ "updateNowFailed": "Pengemas kini tidak menerima permintaan. Semak bahawa kontena watchtower sedang berjalan.",
+ "updateNowTimeout": "FreeLLMAPI belum bermula semula selepas 5 minit. Semak log kontena watchtower."
},
"models": {
"title": "Model",
diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.json
index 54b56f25..7ece71ee 100644
--- a/client/src/i18n/locales/my.json
+++ b/client/src/i18n/locales/my.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ဒေါင်းလုဒ်လုပ်နေသည်… {percent}%",
"restartToUpdate": "အပ်ဒိတ်လုပ်ရန် ပြန်စတင်ပါ",
"updateReadyHint": "ဒေါင်းလုဒ်ပြီးပါပြီ။ FreeLLMAPI သည် သင့်ဒေတာကို အရန်သိမ်းပြီး ပြန်စတင်ကာ ဗားရှင်းအသစ်ကို ဖွင့်ပါမည်။",
- "updateInstallFailed": "အပ်ဒိတ်ကို ထည့်သွင်း၍ မရပါ။"
+ "updateInstallFailed": "အပ်ဒိတ်ကို ထည့်သွင်း၍ မရပါ။",
+ "updateNow": "ယခု အပ်ဒိတ်လုပ်ရန်",
+ "updatingContainer": "image အသစ်ကို ဆွဲယူပြီး ပြန်စတင်နေသည်။ FreeLLMAPI ပြန်လာသောအခါ ဤစာမျက်နှာ ပြန်ဖွင့်ပါမည်။",
+ "updateNowFailed": "အပ်ဒိတ်လုပ်သူက တောင်းဆိုမှုကို မလက်ခံပါ။ watchtower container လည်ပတ်နေကြောင်း စစ်ဆေးပါ။",
+ "updateNowTimeout": "၅ မိနစ်ကြာသော်လည်း FreeLLMAPI ပြန်မစတင်သေးပါ။ watchtower container ၏ မှတ်တမ်းများကို စစ်ဆေးပါ။"
},
"models": {
"title": "မော်ဒယ်များ",
diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.json
index e697349e..2324b21c 100644
--- a/client/src/i18n/locales/ne.json
+++ b/client/src/i18n/locales/ne.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "डाउनलोड हुँदैछ… {percent}%",
"restartToUpdate": "अपडेट गर्न पुनः सुरु गर्नुहोस्",
"updateReadyHint": "डाउनलोड भयो। FreeLLMAPI ले तपाईंको डेटाको ब्याकअप लिन्छ, पुनः सुरु हुन्छ र नयाँ संस्करण खोल्छ।",
- "updateInstallFailed": "अपडेट इन्स्टल हुन सकेन।"
+ "updateInstallFailed": "अपडेट इन्स्टल हुन सकेन।",
+ "updateNow": "अहिले अपडेट गर्नुहोस्",
+ "updatingContainer": "नयाँ इमेज तानिँदै र पुनः सुरु हुँदैछ। FreeLLMAPI फर्केपछि यो पेज पुनः लोड हुन्छ।",
+ "updateNowFailed": "अपडेटरले अनुरोध स्वीकार गरेन। watchtower कन्टेनर चलिरहेको छ कि छैन जाँच गर्नुहोस्।",
+ "updateNowTimeout": "५ मिनेटपछि पनि FreeLLMAPI पुनः सुरु भएको छैन। watchtower कन्टेनरका लगहरू हेर्नुहोस्।"
},
"models": {
"title": "नमूनाहरू",
diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.json
index 2f4ce4d5..9c06822c 100644
--- a/client/src/i18n/locales/nl.json
+++ b/client/src/i18n/locales/nl.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Downloaden… {percent}%",
"restartToUpdate": "Herstarten om bij te werken",
"updateReadyHint": "Gedownload. FreeLLMAPI maakt een back-up van je gegevens, herstart en opent de nieuwe versie.",
- "updateInstallFailed": "De update kon niet worden geïnstalleerd."
+ "updateInstallFailed": "De update kon niet worden geïnstalleerd.",
+ "updateNow": "Nu bijwerken",
+ "updatingContainer": "De nieuwe image wordt opgehaald en herstart. Deze pagina laadt opnieuw zodra FreeLLMAPI terug is.",
+ "updateNowFailed": "De updater heeft het verzoek niet geaccepteerd. Controleer of de watchtower-container draait.",
+ "updateNowTimeout": "FreeLLMAPI is na 5 minuten niet herstart. Bekijk de logs van de watchtower-container."
},
"models": {
"title": "Modellen",
diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.json
index 88d20e4b..10df3232 100644
--- a/client/src/i18n/locales/no.json
+++ b/client/src/i18n/locales/no.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Laster ned… {percent} %",
"restartToUpdate": "Start på nytt for å oppdatere",
"updateReadyHint": "Lastet ned. FreeLLMAPI tar sikkerhetskopi av dataene dine, starter på nytt og åpner den nye versjonen.",
- "updateInstallFailed": "Oppdateringen kunne ikke installeres."
+ "updateInstallFailed": "Oppdateringen kunne ikke installeres.",
+ "updateNow": "Oppdater nå",
+ "updatingContainer": "Henter det nye imaget og starter på nytt. Siden lastes inn på nytt når FreeLLMAPI er tilbake.",
+ "updateNowFailed": "Oppdateringstjenesten godtok ikke forespørselen. Sjekk at watchtower-containeren kjører.",
+ "updateNowTimeout": "FreeLLMAPI har ikke startet på nytt etter 5 minutter. Sjekk loggene til watchtower-containeren."
},
"models": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.json
index 17e25fca..d4d81f0a 100644
--- a/client/src/i18n/locales/or.json
+++ b/client/src/i18n/locales/or.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ଡାଉନଲୋଡ୍ ହେଉଛି… {percent}%",
"restartToUpdate": "ଅପଡେଟ୍ ପାଇଁ ପୁନଃ ଆରମ୍ଭ କରନ୍ତୁ",
"updateReadyHint": "ଡାଉନଲୋଡ୍ ହୋଇଗଲା। FreeLLMAPI ଆପଣଙ୍କ ଡାଟାର ବ୍ୟାକଅପ୍ ନେଇ, ପୁନଃ ଆରମ୍ଭ ହୋଇ ନୂଆ ସଂସ୍କରଣ ଖୋଲେ।",
- "updateInstallFailed": "ଅପଡେଟ୍ ଇନଷ୍ଟଲ୍ ହୋଇପାରିଲା ନାହିଁ।"
+ "updateInstallFailed": "ଅପଡେଟ୍ ଇନଷ୍ଟଲ୍ ହୋଇପାରିଲା ନାହିଁ।",
+ "updateNow": "ବର୍ତ୍ତମାନ ଅପଡେଟ୍ କରନ୍ତୁ",
+ "updatingContainer": "ନୂଆ ଇମେଜ୍ ଟାଣାଯାଉଛି ଏବଂ ପୁନଃ ଆରମ୍ଭ ହେଉଛି। FreeLLMAPI ଫେରିଲେ ଏହି ପୃଷ୍ଠା ପୁନଃ ଲୋଡ୍ ହେବ।",
+ "updateNowFailed": "ଅପଡେଟର ଅନୁରୋଧ ଗ୍ରହଣ କଲା ନାହିଁ। watchtower କଣ୍ଟେନର ଚାଲୁଛି କି ନାହିଁ ଯାଞ୍ଚ କରନ୍ତୁ।",
+ "updateNowTimeout": "୫ ମିନିଟ ପରେ ମଧ୍ୟ FreeLLMAPI ପୁନଃ ଆରମ୍ଭ ହୋଇନାହିଁ। watchtower କଣ୍ଟେନରର ଲଗ୍ ଦେଖନ୍ତୁ।"
},
"models": {
"title": "ମଡେଲଗୁଡିକ",
diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.json
index 06d50119..ecf27bb5 100644
--- a/client/src/i18n/locales/pa.json
+++ b/client/src/i18n/locales/pa.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ਡਾਊਨਲੋਡ ਹੋ ਰਿਹਾ ਹੈ… {percent}%",
"restartToUpdate": "ਅੱਪਡੇਟ ਲਈ ਮੁੜ ਚਾਲੂ ਕਰੋ",
"updateReadyHint": "ਡਾਊਨਲੋਡ ਹੋ ਗਿਆ। FreeLLMAPI ਤੁਹਾਡੇ ਡੇਟਾ ਦਾ ਬੈਕਅੱਪ ਲੈਂਦਾ ਹੈ, ਮੁੜ ਚਾਲੂ ਹੁੰਦਾ ਹੈ ਅਤੇ ਨਵਾਂ ਸੰਸਕਰਣ ਖੋਲ੍ਹਦਾ ਹੈ।",
- "updateInstallFailed": "ਅੱਪਡੇਟ ਇੰਸਟਾਲ ਨਹੀਂ ਹੋ ਸਕਿਆ।"
+ "updateInstallFailed": "ਅੱਪਡੇਟ ਇੰਸਟਾਲ ਨਹੀਂ ਹੋ ਸਕਿਆ।",
+ "updateNow": "ਹੁਣੇ ਅੱਪਡੇਟ ਕਰੋ",
+ "updatingContainer": "ਨਵੀਂ ਇਮੇਜ ਖਿੱਚੀ ਜਾ ਰਹੀ ਹੈ ਅਤੇ ਮੁੜ ਚਾਲੂ ਹੋ ਰਿਹਾ ਹੈ। FreeLLMAPI ਵਾਪਸ ਆਉਣ 'ਤੇ ਇਹ ਪੰਨਾ ਮੁੜ ਲੋਡ ਹੋਵੇਗਾ।",
+ "updateNowFailed": "ਅੱਪਡੇਟਰ ਨੇ ਬੇਨਤੀ ਸਵੀਕਾਰ ਨਹੀਂ ਕੀਤੀ। ਜਾਂਚੋ ਕਿ watchtower ਕੰਟੇਨਰ ਚੱਲ ਰਿਹਾ ਹੈ।",
+ "updateNowTimeout": "5 ਮਿੰਟ ਬਾਅਦ ਵੀ FreeLLMAPI ਮੁੜ ਚਾਲੂ ਨਹੀਂ ਹੋਇਆ। watchtower ਕੰਟੇਨਰ ਦੇ ਲੌਗ ਵੇਖੋ।"
},
"models": {
"title": "ਮਾਡਲ",
diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.json
index 9cb63b81..67f920af 100644
--- a/client/src/i18n/locales/pl.json
+++ b/client/src/i18n/locales/pl.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Pobieranie… {percent}%",
"restartToUpdate": "Uruchom ponownie, aby zaktualizować",
"updateReadyHint": "Pobrano. FreeLLMAPI tworzy kopię zapasową danych, uruchamia się ponownie i otwiera nową wersję.",
- "updateInstallFailed": "Nie udało się zainstalować aktualizacji."
+ "updateInstallFailed": "Nie udało się zainstalować aktualizacji.",
+ "updateNow": "Aktualizuj teraz",
+ "updatingContainer": "Pobieranie nowego obrazu i ponowne uruchamianie. Strona odświeży się, gdy FreeLLMAPI wróci.",
+ "updateNowFailed": "Aktualizator nie przyjął żądania. Sprawdź, czy kontener watchtower działa.",
+ "updateNowTimeout": "FreeLLMAPI nie uruchomił się ponownie po 5 minutach. Sprawdź logi kontenera watchtower."
},
"models": {
"title": "Modele",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index ca346f0b..5618c1cb 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Baixando… {percent}%",
"restartToUpdate": "Reiniciar para atualizar",
"updateReadyHint": "Baixada. O FreeLLMAPI faz backup dos seus dados, reinicia e abre a nova versão.",
- "updateInstallFailed": "Não foi possível instalar a atualização."
+ "updateInstallFailed": "Não foi possível instalar a atualização.",
+ "updateNow": "Atualizar agora",
+ "updatingContainer": "Baixando a nova imagem e reiniciando. Esta página recarrega quando o FreeLLMAPI voltar.",
+ "updateNowFailed": "O atualizador não aceitou a solicitação. Verifique se o contêiner watchtower está em execução.",
+ "updateNowTimeout": "O FreeLLMAPI não reiniciou após 5 minutos. Verifique os logs do contêiner watchtower."
},
"models": {
"title": "Modelos",
diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.json
index 7afdda21..a9c3953a 100644
--- a/client/src/i18n/locales/pt-PT.json
+++ b/client/src/i18n/locales/pt-PT.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "A transferir… {percent}%",
"restartToUpdate": "Reiniciar para atualizar",
"updateReadyHint": "Transferida. O FreeLLMAPI faz uma cópia de segurança dos seus dados, reinicia e abre a nova versão.",
- "updateInstallFailed": "Não foi possível instalar a atualização."
+ "updateInstallFailed": "Não foi possível instalar a atualização.",
+ "updateNow": "Atualizar agora",
+ "updatingContainer": "A transferir a nova imagem e a reiniciar. Esta página recarrega quando o FreeLLMAPI voltar.",
+ "updateNowFailed": "O atualizador não aceitou o pedido. Verifique se o contentor watchtower está em execução.",
+ "updateNowTimeout": "O FreeLLMAPI não reiniciou ao fim de 5 minutos. Verifique os registos do contentor watchtower."
},
"models": {
"title": "Modelos",
diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.json
index 580ad521..2e8e6423 100644
--- a/client/src/i18n/locales/ro.json
+++ b/client/src/i18n/locales/ro.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Se descarcă… {percent}%",
"restartToUpdate": "Repornește pentru actualizare",
"updateReadyHint": "Descărcat. FreeLLMAPI face o copie de rezervă a datelor, repornește și deschide noua versiune.",
- "updateInstallFailed": "Actualizarea nu a putut fi instalată."
+ "updateInstallFailed": "Actualizarea nu a putut fi instalată.",
+ "updateNow": "Actualizează acum",
+ "updatingContainer": "Se descarcă noua imagine și se repornește. Pagina se reîncarcă când FreeLLMAPI revine.",
+ "updateNowFailed": "Actualizatorul nu a acceptat cererea. Verifică dacă containerul watchtower rulează.",
+ "updateNowTimeout": "FreeLLMAPI nu a repornit după 5 minute. Verifică jurnalele containerului watchtower."
},
"models": {
"title": "Modele",
diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.json
index 23ab8e99..1cfa8af9 100644
--- a/client/src/i18n/locales/ru.json
+++ b/client/src/i18n/locales/ru.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Загрузка… {percent}%",
"restartToUpdate": "Перезапустить для обновления",
"updateReadyHint": "Загружено. FreeLLMAPI создаёт резервную копию данных, перезапускается и открывает новую версию.",
- "updateInstallFailed": "Не удалось установить обновление."
+ "updateInstallFailed": "Не удалось установить обновление.",
+ "updateNow": "Обновить сейчас",
+ "updatingContainer": "Загружается новый образ и выполняется перезапуск. Страница перезагрузится, когда FreeLLMAPI вернётся.",
+ "updateNowFailed": "Служба обновления не приняла запрос. Проверьте, что контейнер watchtower запущен.",
+ "updateNowTimeout": "FreeLLMAPI не перезапустился за 5 минут. Проверьте журналы контейнера watchtower."
},
"models": {
"title": "Модели",
diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.json
index a4c334f9..d1b59730 100644
--- a/client/src/i18n/locales/si.json
+++ b/client/src/i18n/locales/si.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "බාගනිමින්… {percent}%",
"restartToUpdate": "යාවත්කාලීන කිරීමට නැවත අරඹන්න",
"updateReadyHint": "බාගත විය. FreeLLMAPI ඔබගේ දත්ත උපස්ථ කර, නැවත ආරම්භ වී නව අනුවාදය විවෘත කරයි.",
- "updateInstallFailed": "යාවත්කාලීනය ස්ථාපනය කළ නොහැකි විය."
+ "updateInstallFailed": "යාවත්කාලීනය ස්ථාපනය කළ නොහැකි විය.",
+ "updateNow": "දැන් යාවත්කාලීන කරන්න",
+ "updatingContainer": "නව image එක ලබාගෙන නැවත ආරම්භ කරමින්. FreeLLMAPI නැවත පැමිණි විට මෙම පිටුව නැවත පූරණය වේ.",
+ "updateNowFailed": "යාවත්කාලීනකරු ඉල්ලීම පිළිගත්තේ නැත. watchtower container එක ධාවනය වන්නේදැයි පරීක්ෂා කරන්න.",
+ "updateNowTimeout": "මිනිත්තු 5කට පසුවත් FreeLLMAPI නැවත ආරම්භ වී නැත. watchtower container හි ලොග් පරීක්ෂා කරන්න."
},
"models": {
"title": "ආකෘති",
diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.json
index bf2351d1..cfa5f444 100644
--- a/client/src/i18n/locales/sk.json
+++ b/client/src/i18n/locales/sk.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Sťahuje sa… {percent} %",
"restartToUpdate": "Reštartovať a aktualizovať",
"updateReadyHint": "Stiahnuté. FreeLLMAPI zálohuje vaše údaje, reštartuje sa a otvorí novú verziu.",
- "updateInstallFailed": "Aktualizáciu sa nepodarilo nainštalovať."
+ "updateInstallFailed": "Aktualizáciu sa nepodarilo nainštalovať.",
+ "updateNow": "Aktualizovať teraz",
+ "updatingContainer": "Sťahuje sa nový obraz a prebieha reštart. Stránka sa znova načíta, keď bude FreeLLMAPI späť.",
+ "updateNowFailed": "Aktualizátor žiadosť neprijal. Skontrolujte, či kontajner watchtower beží.",
+ "updateNowTimeout": "FreeLLMAPI sa ani po 5 minútach nereštartoval. Skontrolujte logy kontajnera watchtower."
},
"models": {
"title": "Modely",
diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.json
index c51bcc51..4b5db7b3 100644
--- a/client/src/i18n/locales/sr.json
+++ b/client/src/i18n/locales/sr.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Преузимање… {percent}%",
"restartToUpdate": "Поново покрени ради ажурирања",
"updateReadyHint": "Преузето. FreeLLMAPI прави резервну копију ваших података, поново се покреће и отвара нову верзију.",
- "updateInstallFailed": "Ажурирање није могло да се инсталира."
+ "updateInstallFailed": "Ажурирање није могло да се инсталира.",
+ "updateNow": "Ажурирај сада",
+ "updatingContainer": "Преузима се нова слика и поново се покреће. Страница ће се поново учитати када се FreeLLMAPI врати.",
+ "updateNowFailed": "Ажурирач није прихватио захтев. Проверите да ли контејнер watchtower ради.",
+ "updateNowTimeout": "FreeLLMAPI се није поново покренуо након 5 минута. Проверите логове контејнера watchtower."
},
"models": {
"title": "Модели",
diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.json
index 0daa0a35..1360acb3 100644
--- a/client/src/i18n/locales/sv.json
+++ b/client/src/i18n/locales/sv.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Hämtar… {percent} %",
"restartToUpdate": "Starta om för att uppdatera",
"updateReadyHint": "Hämtad. FreeLLMAPI säkerhetskopierar dina data, startar om och öppnar den nya versionen.",
- "updateInstallFailed": "Uppdateringen kunde inte installeras."
+ "updateInstallFailed": "Uppdateringen kunde inte installeras.",
+ "updateNow": "Uppdatera nu",
+ "updatingContainer": "Hämtar den nya avbildningen och startar om. Sidan laddas om när FreeLLMAPI är tillbaka.",
+ "updateNowFailed": "Uppdateraren tog inte emot begäran. Kontrollera att watchtower-containern körs.",
+ "updateNowTimeout": "FreeLLMAPI har inte startat om efter 5 minuter. Kontrollera loggarna för watchtower-containern."
},
"models": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.json
index d329b36c..7fdd348b 100644
--- a/client/src/i18n/locales/sw.json
+++ b/client/src/i18n/locales/sw.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Inapakua… {percent}%",
"restartToUpdate": "Anzisha upya ili kusasisha",
"updateReadyHint": "Imepakuliwa. FreeLLMAPI huhifadhi nakala ya data yako, huanza upya na kufungua toleo jipya.",
- "updateInstallFailed": "Sasisho halikuweza kusakinishwa."
+ "updateInstallFailed": "Sasisho halikuweza kusakinishwa.",
+ "updateNow": "Sasisha sasa",
+ "updatingContainer": "Inavuta picha mpya na kuanza upya. Ukurasa huu utapakia upya FreeLLMAPI itakaporudi.",
+ "updateNowFailed": "Kisasishaji hakikukubali ombi. Hakikisha kontena la watchtower linafanya kazi.",
+ "updateNowTimeout": "FreeLLMAPI haijaanza upya baada ya dakika 5. Angalia kumbukumbu za kontena la watchtower."
},
"models": {
"title": "Mifano",
diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.json
index c431fbdf..784c2704 100644
--- a/client/src/i18n/locales/ta.json
+++ b/client/src/i18n/locales/ta.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "பதிவிறக்குகிறது… {percent}%",
"restartToUpdate": "புதுப்பிக்க மறுதொடக்கம் செய்",
"updateReadyHint": "பதிவிறக்கப்பட்டது. FreeLLMAPI உங்கள் தரவைக் காப்புப்பிரதி எடுத்து, மறுதொடக்கம் செய்து புதிய பதிப்பைத் திறக்கும்.",
- "updateInstallFailed": "புதுப்பிப்பை நிறுவ முடியவில்லை."
+ "updateInstallFailed": "புதுப்பிப்பை நிறுவ முடியவில்லை.",
+ "updateNow": "இப்போது புதுப்பி",
+ "updatingContainer": "புதிய image-ஐப் பெற்று மறுதொடக்கம் செய்கிறது. FreeLLMAPI திரும்பியதும் இந்தப் பக்கம் மீண்டும் ஏற்றப்படும்.",
+ "updateNowFailed": "புதுப்பிப்பான் கோரிக்கையை ஏற்கவில்லை. watchtower கொள்கலன் இயங்குகிறதா எனச் சரிபார்க்கவும்.",
+ "updateNowTimeout": "5 நிமிடங்களுக்குப் பிறகும் FreeLLMAPI மறுதொடக்கம் ஆகவில்லை. watchtower கொள்கலனின் பதிவுகளைப் பார்க்கவும்."
},
"models": {
"title": "மாதிரிகள்",
diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.json
index deb73405..aab67392 100644
--- a/client/src/i18n/locales/te.json
+++ b/client/src/i18n/locales/te.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "డౌన్‌లోడ్ అవుతోంది… {percent}%",
"restartToUpdate": "అప్‌డేట్ కోసం రీస్టార్ట్ చేయండి",
"updateReadyHint": "డౌన్‌లోడ్ అయింది. FreeLLMAPI మీ డేటాను బ్యాకప్ చేసి, రీస్టార్ట్ అయి కొత్త వెర్షన్‌ను తెరుస్తుంది.",
- "updateInstallFailed": "అప్‌డేట్‌ను ఇన్‌స్టాల్ చేయలేకపోయాము."
+ "updateInstallFailed": "అప్‌డేట్‌ను ఇన్‌స్టాల్ చేయలేకపోయాము.",
+ "updateNow": "ఇప్పుడే అప్‌డేట్ చేయండి",
+ "updatingContainer": "కొత్త ఇమేజ్‌ను తెచ్చి రీస్టార్ట్ అవుతోంది. FreeLLMAPI తిరిగి వచ్చాక ఈ పేజీ రీలోడ్ అవుతుంది.",
+ "updateNowFailed": "అప్‌డేటర్ అభ్యర్థనను అంగీకరించలేదు. watchtower కంటైనర్ నడుస్తోందో లేదో చూడండి.",
+ "updateNowTimeout": "5 నిమిషాల తర్వాత కూడా FreeLLMAPI రీస్టార్ట్ కాలేదు. watchtower కంటైనర్ లాగ్‌లను చూడండి."
},
"models": {
"title": "మోడల్స్",
diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.json
index 8d364861..b271d8b8 100644
--- a/client/src/i18n/locales/th.json
+++ b/client/src/i18n/locales/th.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "กำลังดาวน์โหลด… {percent}%",
"restartToUpdate": "รีสตาร์ตเพื่ออัปเดต",
"updateReadyHint": "ดาวน์โหลดแล้ว FreeLLMAPI จะสำรองข้อมูลของคุณ รีสตาร์ต และเปิดเวอร์ชันใหม่",
- "updateInstallFailed": "ไม่สามารถติดตั้งอัปเดตได้"
+ "updateInstallFailed": "ไม่สามารถติดตั้งอัปเดตได้",
+ "updateNow": "อัปเดตตอนนี้",
+ "updatingContainer": "กำลังดึงอิมเมจใหม่และรีสตาร์ต หน้านี้จะโหลดใหม่เมื่อ FreeLLMAPI กลับมา",
+ "updateNowFailed": "ตัวอัปเดตไม่รับคำขอ ตรวจสอบว่าคอนเทนเนอร์ watchtower กำลังทำงาน",
+ "updateNowTimeout": "FreeLLMAPI ยังไม่รีสตาร์ตหลังผ่านไป 5 นาที ตรวจสอบบันทึกของคอนเทนเนอร์ watchtower"
},
"models": {
"title": "โมเดล",
diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.json
index 494ca05b..f4e37266 100644
--- a/client/src/i18n/locales/tl.json
+++ b/client/src/i18n/locales/tl.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Nagda-download… {percent}%",
"restartToUpdate": "I-restart para mag-update",
"updateReadyHint": "Na-download na. Iba-backup ng FreeLLMAPI ang iyong data, magre-restart, at bubuksan ang bagong bersyon.",
- "updateInstallFailed": "Hindi ma-install ang update."
+ "updateInstallFailed": "Hindi ma-install ang update.",
+ "updateNow": "I-update ngayon",
+ "updatingContainer": "Kinukuha ang bagong image at nagre-restart. Magre-reload ang page na ito kapag bumalik ang FreeLLMAPI.",
+ "updateNowFailed": "Hindi tinanggap ng updater ang request. Tingnan kung tumatakbo ang watchtower container.",
+ "updateNowTimeout": "Hindi pa nagre-restart ang FreeLLMAPI pagkalipas ng 5 minuto. Tingnan ang logs ng watchtower container."
},
"models": {
"title": "Mga Modelo",
diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.json
index c08bf9d2..44a332f0 100644
--- a/client/src/i18n/locales/tr.json
+++ b/client/src/i18n/locales/tr.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "İndiriliyor… %{percent}",
"restartToUpdate": "Güncellemek için yeniden başlat",
"updateReadyHint": "İndirildi. FreeLLMAPI verilerinizi yedekler, yeniden başlar ve yeni sürümü açar.",
- "updateInstallFailed": "Güncelleme yüklenemedi."
+ "updateInstallFailed": "Güncelleme yüklenemedi.",
+ "updateNow": "Şimdi güncelle",
+ "updatingContainer": "Yeni imaj çekiliyor ve yeniden başlatılıyor. FreeLLMAPI geri geldiğinde bu sayfa yenilenecek.",
+ "updateNowFailed": "Güncelleyici isteği kabul etmedi. watchtower konteynerinin çalıştığından emin olun.",
+ "updateNowTimeout": "FreeLLMAPI 5 dakika sonra hâlâ yeniden başlamadı. watchtower konteynerinin günlüklerine bakın."
},
"models": {
"title": "Modeller",
diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.json
index 5e15a238..6a746551 100644
--- a/client/src/i18n/locales/uk.json
+++ b/client/src/i18n/locales/uk.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Завантаження… {percent}%",
"restartToUpdate": "Перезапустити для оновлення",
"updateReadyHint": "Завантажено. FreeLLMAPI створює резервну копію даних, перезапускається й відкриває нову версію.",
- "updateInstallFailed": "Не вдалося встановити оновлення."
+ "updateInstallFailed": "Не вдалося встановити оновлення.",
+ "updateNow": "Оновити зараз",
+ "updatingContainer": "Завантажується новий образ і виконується перезапуск. Сторінка перезавантажиться, коли FreeLLMAPI повернеться.",
+ "updateNowFailed": "Служба оновлення не прийняла запит. Перевірте, що контейнер watchtower запущено.",
+ "updateNowTimeout": "FreeLLMAPI не перезапустився за 5 хвилин. Перегляньте журнали контейнера watchtower."
},
"models": {
"title": "Моделі",
diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.json
index 6d0ff1c8..4ba944e9 100644
--- a/client/src/i18n/locales/ur.json
+++ b/client/src/i18n/locales/ur.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "ڈاؤن لوڈ ہو رہا ہے… {percent}%",
"restartToUpdate": "اپ ڈیٹ کے لیے دوبارہ شروع کریں",
"updateReadyHint": "ڈاؤن لوڈ ہو گیا۔ FreeLLMAPI آپ کے ڈیٹا کا بیک اپ لیتا ہے، دوبارہ شروع ہوتا ہے اور نیا ورژن کھولتا ہے۔",
- "updateInstallFailed": "اپ ڈیٹ انسٹال نہیں ہو سکا۔"
+ "updateInstallFailed": "اپ ڈیٹ انسٹال نہیں ہو سکا۔",
+ "updateNow": "ابھی اپ ڈیٹ کریں",
+ "updatingContainer": "نئی امیج کھینچی جا رہی ہے اور دوبارہ شروع ہو رہا ہے۔ FreeLLMAPI واپس آنے پر یہ صفحہ دوبارہ لوڈ ہوگا۔",
+ "updateNowFailed": "اپ ڈیٹر نے درخواست قبول نہیں کی۔ چیک کریں کہ watchtower کنٹینر چل رہا ہے۔",
+ "updateNowTimeout": "5 منٹ بعد بھی FreeLLMAPI دوبارہ شروع نہیں ہوا۔ watchtower کنٹینر کے لاگز دیکھیں۔"
},
"models": {
"title": "ماڈلز",
diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.json
index b15a518c..5a0213f4 100644
--- a/client/src/i18n/locales/uz.json
+++ b/client/src/i18n/locales/uz.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Yuklab olinmoqda… {percent}%",
"restartToUpdate": "Yangilash uchun qayta ishga tushirish",
"updateReadyHint": "Yuklab olindi. FreeLLMAPI maʼlumotlaringizning zaxira nusxasini oladi, qayta ishga tushadi va yangi versiyani ochadi.",
- "updateInstallFailed": "Yangilanishni o‘rnatib bo‘lmadi."
+ "updateInstallFailed": "Yangilanishni o‘rnatib bo‘lmadi.",
+ "updateNow": "Hozir yangilash",
+ "updatingContainer": "Yangi obraz yuklab olinmoqda va qayta ishga tushirilmoqda. FreeLLMAPI qaytganda bu sahifa qayta yuklanadi.",
+ "updateNowFailed": "Yangilovchi so‘rovni qabul qilmadi. watchtower konteyneri ishlayotganini tekshiring.",
+ "updateNowTimeout": "FreeLLMAPI 5 daqiqadan keyin ham qayta ishga tushmadi. watchtower konteyneri jurnallarini tekshiring."
},
"models": {
"title": "Modellar",
diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.json
index 3250ad65..2cd93a94 100644
--- a/client/src/i18n/locales/vi.json
+++ b/client/src/i18n/locales/vi.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Đang tải… {percent}%",
"restartToUpdate": "Khởi động lại để cập nhật",
"updateReadyHint": "Đã tải xong. FreeLLMAPI sao lưu dữ liệu của bạn, khởi động lại và mở phiên bản mới.",
- "updateInstallFailed": "Không thể cài đặt bản cập nhật."
+ "updateInstallFailed": "Không thể cài đặt bản cập nhật.",
+ "updateNow": "Cập nhật ngay",
+ "updatingContainer": "Đang kéo image mới và khởi động lại. Trang này sẽ tải lại khi FreeLLMAPI hoạt động trở lại.",
+ "updateNowFailed": "Trình cập nhật không chấp nhận yêu cầu. Hãy kiểm tra container watchtower đang chạy.",
+ "updateNowTimeout": "FreeLLMAPI chưa khởi động lại sau 5 phút. Hãy xem nhật ký của container watchtower."
},
"models": {
"title": "Người mẫu",
diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.json
index b3882c62..22e84ed9 100644
--- a/client/src/i18n/locales/yo.json
+++ b/client/src/i18n/locales/yo.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "Ń ṣe ìgbàsílẹ̀… {percent}%",
"restartToUpdate": "Tún bẹ̀rẹ̀ láti mú dójúìwọ̀n",
"updateReadyHint": "Ìgbàsílẹ̀ ti parí. FreeLLMAPI yóò ṣe àfẹ̀yìntì dátà rẹ, tún bẹ̀rẹ̀, yóò sì ṣí ẹ̀yà tuntun.",
- "updateInstallFailed": "A kò lè fi ìmúdójúìwọ̀n náà sí i."
+ "updateInstallFailed": "A kò lè fi ìmúdójúìwọ̀n náà sí i.",
+ "updateNow": "Ṣe ìmúdójúìwọ̀n báyìí",
+ "updatingContainer": "Ń fa àwòrán tuntun ó sì ń tún bẹ̀rẹ̀. Ojú-ìwé yìí yóò tún gbé nígbà tí FreeLLMAPI bá padà.",
+ "updateNowFailed": "Olùmúdójúìwọ̀n kò gba ìbéèrè náà. Ṣàyẹ̀wò pé àpótí watchtower ń ṣiṣẹ́.",
+ "updateNowTimeout": "FreeLLMAPI kò tíì tún bẹ̀rẹ̀ lẹ́yìn ìṣẹ́jú 5. Ṣàyẹ̀wò àkọsílẹ̀ àpótí watchtower."
},
"models": {
"title": "Awọn awoṣe",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index 8045c60d..a80c89c7 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "正在下载… {percent}%",
"restartToUpdate": "重启以更新",
"updateReadyHint": "已下载。FreeLLMAPI 会先备份你的数据,然后重启并打开新版本。",
- "updateInstallFailed": "无法安装更新。"
+ "updateInstallFailed": "无法安装更新。",
+ "updateNow": "立即更新",
+ "updatingContainer": "正在拉取新镜像并重启。FreeLLMAPI 恢复后此页面会自动重新加载。",
+ "updateNowFailed": "更新器未接受请求。请确认 watchtower 容器正在运行。",
+ "updateNowTimeout": "5 分钟后 FreeLLMAPI 仍未重启。请查看 watchtower 容器的日志。"
},
"models": {
"title": "模型",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index 2a3028b2..a3de3766 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -171,7 +171,11 @@
"downloadingUpdate": "正在下載… {percent}%",
"restartToUpdate": "重新啟動以更新",
"updateReadyHint": "已下載。FreeLLMAPI 會先備份你的資料,然後重新啟動並開啟新版本。",
- "updateInstallFailed": "無法安裝更新。"
+ "updateInstallFailed": "無法安裝更新。",
+ "updateNow": "立即更新",
+ "updatingContainer": "正在拉取新映像並重新啟動。FreeLLMAPI 恢復後此頁面會自動重新載入。",
+ "updateNowFailed": "更新器未接受請求。請確認 watchtower 容器正在執行。",
+ "updateNowTimeout": "5 分鐘後 FreeLLMAPI 仍未重新啟動。請查看 watchtower 容器的記錄。"
},
"models": {
"title": "模型",
diff --git a/client/src/lib/new-build.ts b/client/src/lib/new-build.ts
index 835a7c99..54eb9bd5 100644
--- a/client/src/lib/new-build.ts
+++ b/client/src/lib/new-build.ts
@@ -7,6 +7,19 @@
const ENTRY_SCRIPT = /<script\b[^>]*\btype=["']module["'][^>]*\bsrc=["']([^"']+)["']|<script\b[^>]*\bsrc=["']([^"']+)["'][^>]*\btype=["']module["']/i
+/** The entry script this tab is running, or null outside a browser. */
+export function loadedEntryScript(): string | null {
+ if (typeof document === 'undefined') return null
+ return document.querySelector<HTMLScriptElement>('script[type="module"][src]')?.src ?? null
+}
+
+/** Fetches this server's current index.html, uncached. Throws while it is down. */
+export async function fetchLatestIndex(): Promise<string> {
+ const response = await fetch(import.meta.env.BASE_URL, { cache: 'no-store', headers: { Accept: 'text/html' } })
+ if (!response.ok) throw new Error(`HTTP ${response.status}`)
+ return response.text()
+}
+
/** The module entry script an index.html loads, or null when it has none. */
export function entryScriptSrc(html: string): string | null {
const match = ENTRY_SCRIPT.exec(html)
diff --git a/docker-compose.yml b/docker-compose.yml
index 9a763f18..cf28e53e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -9,6 +9,16 @@ services:
environment:
NODE_ENV: production
PORT: 3001
+ # Settings → Check for updates → "Update now". Only active when the
+ # `autoupdate` profile below runs and WATCHTOWER_TOKEN is set in .env.
+ FREELLMAPI_SELF_UPDATE_URL: http://watchtower:8080
+ FREELLMAPI_SELF_UPDATE_TOKEN: ${WATCHTOWER_TOKEN:-}
+ labels:
+ # The updater below only ever touches containers carrying BOTH labels.
+ # The scope keeps it off containers other stacks have opted into their
+ # own Watchtower, and keeps theirs off this one.
+ com.centurylinklabs.watchtower.enable: "true"
+ com.centurylinklabs.watchtower.scope: freellmapi
# Bound to localhost by default — FreeLLMAPI is single-user and must not be
# exposed to the internet. Set HOST_BIND=0.0.0.0 to reach it from your LAN.
ports:
@@ -35,5 +45,28 @@ services:
start_period: 15s
retries: 3
+ # Opt-in self-update: `docker compose --profile autoupdate up -d` with
+ # WATCHTOWER_TOKEN set in .env. Watchtower (the maintained nicholas-fedor
+ # fork) runs with only its token-protected update endpoint, which the
+ # dashboard calls when you click "Update now"; it pulls the newer image and
+ # recreates the freellmapi container with the same volume and settings.
+ # Nothing happens on a schedule, no port is published, and no other
+ # container is touched. It needs the Docker socket, which is root-equivalent
+ # on the host — leave the profile off if that is not acceptable.
+ watchtower:
+ image: nickfedor/watchtower:1.22.3
+ profiles: ["autoupdate"]
+ environment:
+ WATCHTOWER_HTTP_API_ENDPOINTS: update
+ WATCHTOWER_HTTP_API_TOKEN: ${WATCHTOWER_TOKEN:-}
+ WATCHTOWER_LABEL_ENABLE: "true"
+ WATCHTOWER_SCOPE: freellmapi
+ WATCHTOWER_CLEANUP: "true"
+ labels:
+ com.centurylinklabs.watchtower.scope: freellmapi
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ restart: unless-stopped
+
volumes:
freellmapi-data:
diff --git a/docs/en/install/01-install.md b/docs/en/install/01-install.md
index ddf2040f..0716ea29 100644
--- a/docs/en/install/01-install.md
+++ b/docs/en/install/01-install.md
@@ -234,7 +234,7 @@ FreeLLMAPI publishes a single production image that contains the Express server
docker pull ghcr.io/tashfeenahmed/freellmapi:latest # or pin a release, e.g. :v1.2.3
```
-The image is multi-arch (`linux/amd64` + `linux/arm64`, so it runs on a Raspberry Pi). Published tags: `latest` (default branch), `v*.*.*` (git release tags), and `sha-<commit>`.
+The image is multi-arch (`linux/amd64` + `linux/arm64`, so it runs on a Raspberry Pi). Published tags: `latest` (the newest release), `main` (the default branch), `v*.*.*` (git release tags), and `sha-<commit>`.
The included `docker-compose.yml` is the recommended install path:
@@ -243,6 +243,14 @@ docker compose up -d
docker compose logs -f freellmapi
```
+**Updating:** `docker compose pull && docker compose up -d` (your volume and `.env` carry over). To update from the dashboard instead, set `WATCHTOWER_TOKEN` in `.env` (e.g. `openssl rand -hex 32`) and start with the opt-in profile:
+
+```bash
+docker compose --profile autoupdate up -d
+```
+
+Settings → **Check for updates** then shows **Update now** when a newer release exists: a [Watchtower](https://github.com/nicholas-fedor/watchtower) sidecar pulls the image and recreates the `freellmapi` container, and the dashboard reloads when it is back. Watchtower runs with only its token-protected update endpoint, never updates on a schedule, publishes no port and only touches the `freellmapi` container — but it mounts the Docker socket, which is root-equivalent on the host, so the profile stays off unless you start it.
+
By default the container's port is bound to `127.0.0.1` (localhost only). To reach the dashboard/API from another machine on your network, publish it on all interfaces with `HOST_BIND=0.0.0.0 docker compose up -d` — only on a trusted LAN, since the proxy is single-user.
Plain HTTP over a LAN address works as-is: the security headers that only apply to HTTPS (`upgrade-insecure-requests`, `Cross-Origin-Opener-Policy`, `Origin-Agent-Cluster`) are emitted only when the request actually arrived over TLS — or over loopback, which browsers already treat as a secure context. Behind an HTTPS reverse proxy they come back on automatically, as long as the proxy forwards `X-Forwarded-Proto`. `CSP_UPGRADE_INSECURE_REQUESTS=true|false` overrides the upgrade directive if your setup needs it.
diff --git a/docs/zh-cn/install/01-install.md b/docs/zh-cn/install/01-install.md
index 9b19c256..7f3b75ef 100644
--- a/docs/zh-cn/install/01-install.md
+++ b/docs/zh-cn/install/01-install.md
@@ -191,7 +191,7 @@ FreeLLMAPI 发布一个生产镜像,里面包含 Express 服务和构建好的
docker pull ghcr.io/tashfeenahmed/freellmapi:latest # 也可以固定到某个版本,例如 :v1.2.3
```
-镜像是多架构的(`linux/amd64` 和 `linux/arm64`,所以树莓派上也能跑)。发布的标签有:`latest`(默认分支)、`v*.*.*`(git 发布标签)和 `sha-<commit>`。
+镜像是多架构的(`linux/amd64` 和 `linux/arm64`,所以树莓派上也能跑)。发布的标签有:`latest`(最新发布版本)、`main`(默认分支)、`v*.*.*`(git 发布标签)和 `sha-<commit>`。
仓库里自带的 `docker-compose.yml` 是推荐的安装方式:
@@ -200,6 +200,14 @@ docker compose up -d
docker compose logs -f freellmapi
```
+**更新:** 运行 `docker compose pull && docker compose up -d`(数据卷和 `.env` 会保留)。如果想直接在仪表盘里更新,请在 `.env` 中设置 `WATCHTOWER_TOKEN`(例如 `openssl rand -hex 32`),并用可选的 profile 启动:
+
+```bash
+docker compose --profile autoupdate up -d
+```
+
+之后在 设置 → **检查更新** 中,有新版本时会出现 **立即更新**:一个 [Watchtower](https://github.com/nicholas-fedor/watchtower) 辅助容器会拉取镜像并重建 `freellmapi` 容器,仪表盘在服务恢复后自动重新加载。Watchtower 只开启受令牌保护的更新接口,不会定时更新,不对外暴露端口,也只处理 `freellmapi` 容器;但它需要挂载 Docker socket,这相当于宿主机的 root 权限,所以除非你主动启动该 profile,否则它不会运行。
+
容器端口默认绑定在 `127.0.0.1`(仅本机)。想从网络里的另一台机器访问仪表盘或 API,用 `HOST_BIND=0.0.0.0 docker compose up -d` 把它发布到所有网卡上。只在可信的局域网里这么做,因为这个代理是单用户的。
用局域网地址走纯 HTTP 是可以直接工作的:那些只对 HTTPS 生效的安全响应头(`upgrade-insecure-requests`、`Cross-Origin-Opener-Policy`、`Origin-Agent-Cluster`)只有在请求确实经由 TLS 到达时才会发出,或者是在 loopback 上,因为浏览器本来就把 loopback 当作安全上下文。放在 HTTPS 反向代理后面时它们会自动恢复,只要代理转发了 `X-Forwarded-Proto`。如果你的部署有特殊需要,`CSP_UPGRADE_INSECURE_REQUESTS=true|false` 可以强制开关那条升级指令。
diff --git a/server/src/__tests__/lib/graceful-shutdown.test.ts b/server/src/__tests__/lib/graceful-shutdown.test.ts
new file mode 100644
index 00000000..845f524e
--- /dev/null
+++ b/server/src/__tests__/lib/graceful-shutdown.test.ts
@@ -0,0 +1,49 @@
+import { EventEmitter } from 'node:events';
+import http from 'node:http';
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import { installGracefulShutdown } from '../../lib/graceful-shutdown.js';
+
+function fakeProcess() {
+ const emitter = new EventEmitter();
+ const exit = vi.fn();
+ return { proc: { once: emitter.once.bind(emitter), exit } as any, emitter, exit };
+}
+
+describe('installGracefulShutdown', () => {
+ afterEach(() => { vi.useRealTimers(); });
+
+ it('closes the server and the database on SIGTERM, then exits 0', async () => {
+ const server = http.createServer((_req, res) => res.end('ok'));
+ await new Promise<void>(resolve => server.listen(0, '127.0.0.1', resolve));
+ const { proc, emitter, exit } = fakeProcess();
+ const closeDb = vi.fn();
+ installGracefulShutdown({ servers: () => [server], closeDb, proc, logger: { log: vi.fn(), error: vi.fn() } });
+
+ emitter.emit('SIGTERM');
+ await vi.waitFor(() => expect(exit).toHaveBeenCalledWith(0));
+ expect(closeDb).toHaveBeenCalledTimes(1);
+ expect(server.listening).toBe(false);
+ });
+
+ it('exits non-zero when a request outlives the grace period', async () => {
+ vi.useFakeTimers();
+ const stuck = { close: vi.fn(), closeIdleConnections: vi.fn() } as unknown as http.Server;
+ const { proc, emitter, exit } = fakeProcess();
+ installGracefulShutdown({ servers: () => [stuck], closeDb: vi.fn(), proc, graceMs: 500, logger: { log: vi.fn(), error: vi.fn() } });
+
+ emitter.emit('SIGINT');
+ expect(exit).not.toHaveBeenCalled();
+ vi.advanceTimersByTime(500);
+ expect(exit).toHaveBeenCalledWith(1);
+ });
+
+ it('handles the second signal of a double Ctrl-C only once', async () => {
+ const { proc, emitter, exit } = fakeProcess();
+ const closeDb = vi.fn();
+ installGracefulShutdown({ servers: () => [], closeDb, proc, logger: { log: vi.fn(), error: vi.fn() } });
+ emitter.emit('SIGTERM');
+ emitter.emit('SIGINT');
+ expect(closeDb).toHaveBeenCalledTimes(1);
+ expect(exit).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/server/src/__tests__/lib/module-purity.test.ts b/server/src/__tests__/lib/module-purity.test.ts
index 082304ae..8b2c07e8 100644
--- a/server/src/__tests__/lib/module-purity.test.ts
+++ b/server/src/__tests__/lib/module-purity.test.ts
@@ -35,6 +35,8 @@ const PURE_MODULES = [
// Shared by the provider, media and embeddings request paths (#1331).
'credential.ts',
'error-classify.ts',
+ // Signal handling for the container's PID 1; the server, DB and process are injected.
+ 'graceful-shutdown.ts',
'header-value.ts',
// Learned output ceilings; the fallback loop and every route import it.
'output-cap.ts',
diff --git a/server/src/__tests__/routes/update-release.test.ts b/server/src/__tests__/routes/update-release.test.ts
index 67a97852..f7fb742b 100644
--- a/server/src/__tests__/routes/update-release.test.ts
+++ b/server/src/__tests__/routes/update-release.test.ts
@@ -54,7 +54,7 @@ function releaseBody(overrides: Record<string, unknown> = {}) {
function createTestApp(overrides: Parameters<typeof createUpdateRouter>[0] = {}) {
const app = express();
const fetchMock = overrides.fetch ?? vi.fn(async () => response(releaseBody()));
- const logger = overrides.logger ?? { error: vi.fn() };
+ const logger = overrides.logger ?? { error: vi.fn(), log: vi.fn() };
app.use('/api/update', createUpdateRouter({
env: {},
cwd: '/worktree/server',
diff --git a/server/src/__tests__/routes/update.test.ts b/server/src/__tests__/routes/update.test.ts
index e1b6eb9e..cc9e0fea 100644
--- a/server/src/__tests__/routes/update.test.ts
+++ b/server/src/__tests__/routes/update.test.ts
@@ -31,6 +31,25 @@ function httpGet(app: Express, path: string): Promise<{ status: number; body: an
});
}
+function httpPost(app: Express, path: string): Promise<{ status: number; body: any }> {
+ return new Promise((resolve, reject) => {
+ const server = app.listen(0, '127.0.0.1', () => {
+ const address = server.address();
+ if (!address || typeof address === 'string') return reject(new Error('No test server address'));
+ const req = http.request({ hostname: '127.0.0.1', port: address.port, path, method: 'POST' }, (res) => {
+ let data = '';
+ res.on('data', chunk => { data += chunk; });
+ res.on('end', () => {
+ server.close();
+ resolve({ status: res.statusCode!, body: JSON.parse(data) });
+ });
+ });
+ req.on('error', (error) => { server.close(); reject(error); });
+ req.end();
+ });
+ });
+}
+
function response(body: unknown, status = 200): Response {
return new Response(body === undefined ? undefined : JSON.stringify(body), {
status,
@@ -71,7 +90,7 @@ function createTestApp(overrides: Parameters<typeof createUpdateRouter>[0] = {})
const app = express();
const fetchMock = overrides.fetch ?? vi.fn(async () => response(compareBody('identical')));
const execMock = overrides.execFile ?? vi.fn(async () => ({ stdout: `${LOCAL_SHA}\n` }));
- const logger = overrides.logger ?? { error: vi.fn() };
+ const logger = overrides.logger ?? { error: vi.fn(), log: vi.fn() };
app.use('/api/update', createUpdateRouter({
env: {},
cwd: '/worktree/server',
@@ -116,7 +135,9 @@ describe('Update API', () => {
it('prefers a validated packaged-build identity and truncates commit messages', async () => {
const longMessage = 'x'.repeat(250);
- const fetchMock = vi.fn(async () => response(compareBody('ahead', longMessage)));
+ const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => (String(url).includes('/releases/latest')
+ ? response({ tag_name: 'v0.12.0', html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.12.0' })
+ : response(compareBody('ahead', longMessage))));
const execMock = vi.fn(async () => ({ stdout: `${REMOTE_SHA}\n` }));
const { app } = createTestApp({
env: {
@@ -161,90 +182,95 @@ describe('Update API', () => {
expect(request?.headers).not.toHaveProperty('Authorization');
});
- it('compares desktop installs against the latest release tag, not main', async () => {
- const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
- if (String(url).includes('/releases/latest')) {
- return response({
- tag_name: 'v0.11.0',
- html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.11.0',
- });
- }
- return response(compareBody('identical'));
- });
- const { app } = createTestApp({
- env: { FREELLMAPI_INSTALL_METHOD: 'desktop', FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
- fetch: fetchMock,
- });
-
- const result = await httpGet(app, '/api/update/check');
-
- expect(result.body).toMatchObject({ status: 'current', installation: 'desktop' });
- expect(fetchMock).toHaveBeenCalledWith(
- `https://api.github.com/repos/tashfeenahmed/freellmapi/compare/${LOCAL_SHA}...v0.11.0`,
- expect.any(Object),
- );
- // 'identical' against the tag: no update offered for untagged main commits.
- expect(result.body.remoteSha).toBe(LOCAL_SHA.slice(0, 7));
- });
-
- it('reports an update when a desktop install trails the latest tag', async () => {
- const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
- if (String(url).includes('/releases/latest')) {
- return response({
- tag_name: 'v0.12.0',
- html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.12.0',
- });
- }
- return response(compareBody('ahead'));
- });
- const { app } = createTestApp({
- env: { FREELLMAPI_INSTALL_METHOD: 'desktop', FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
- fetch: fetchMock,
- });
-
- const result = await httpGet(app, '/api/update/check');
-
- expect(result.body).toMatchObject({ status: 'available', installation: 'desktop' });
- });
-
- it('reports unknown for a desktop install when no release tag can be resolved', async () => {
- const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
- if (String(url).includes('/releases/latest')) return response({ message: 'no releases' }, 404);
- return response(compareBody('ahead'));
- });
- const { app } = createTestApp({
- env: { FREELLMAPI_INSTALL_METHOD: 'desktop', FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
- fetch: fetchMock,
- });
-
- const result = await httpGet(app, '/api/update/check');
-
- expect(result.body).toMatchObject({ status: 'unknown', installation: 'desktop' });
- // Without a tag to compare against, main must not be dialed at all.
- expect(fetchMock).toHaveBeenCalledTimes(1);
- });
-
- it('never falls back to the main-branch Atom feed for a desktop install', async () => {
- const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
- if (String(url).includes('/releases/latest')) {
- return response({
- tag_name: 'v0.11.0',
- html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.11.0',
- });
- }
- return response({ message: 'rate limited' }, 403);
+ // Both install a published release — an installer or the :latest image —
+ // so both compare against the newest tag; untagged main commits have
+ // nothing to install.
+ describe.each(['desktop', 'docker'] as const)('%s installs', (installation) => {
+ it('compares against the latest release tag, not main', async () => {
+ const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
+ if (String(url).includes('/releases/latest')) {
+ return response({
+ tag_name: 'v0.11.0',
+ html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.11.0',
+ });
+ }
+ return response(compareBody('identical'));
+ });
+ const { app } = createTestApp({
+ env: { FREELLMAPI_INSTALL_METHOD: installation, FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
+ fetch: fetchMock,
+ });
+
+ const result = await httpGet(app, '/api/update/check');
+
+ expect(result.body).toMatchObject({ status: 'current', installation });
+ expect(fetchMock).toHaveBeenCalledWith(
+ `https://api.github.com/repos/tashfeenahmed/freellmapi/compare/${LOCAL_SHA}...v0.11.0`,
+ expect.any(Object),
+ );
+ // 'identical' against the tag: no update offered for untagged main commits.
+ expect(result.body.remoteSha).toBe(LOCAL_SHA.slice(0, 7));
+ });
+
+ it('reports an update when the install trails the latest tag', async () => {
+ const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
+ if (String(url).includes('/releases/latest')) {
+ return response({
+ tag_name: 'v0.12.0',
+ html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.12.0',
+ });
+ }
+ return response(compareBody('ahead'));
+ });
+ const { app } = createTestApp({
+ env: { FREELLMAPI_INSTALL_METHOD: installation, FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
+ fetch: fetchMock,
+ });
+
+ const result = await httpGet(app, '/api/update/check');
+
+ expect(result.body).toMatchObject({ status: 'available', installation });
+ });
+
+ it('reports unknown when no release tag can be resolved', async () => {
+ const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
+ if (String(url).includes('/releases/latest')) return response({ message: 'no releases' }, 404);
+ return response(compareBody('ahead'));
+ });
+ const { app } = createTestApp({
+ env: { FREELLMAPI_INSTALL_METHOD: installation, FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
+ fetch: fetchMock,
+ });
+
+ const result = await httpGet(app, '/api/update/check');
+
+ expect(result.body).toMatchObject({ status: 'unknown', installation });
+ // Without a tag to compare against, main must not be dialed at all.
+ expect(fetchMock).toHaveBeenCalledTimes(1);
+ });
+
+ it('never falls back to the main-branch Atom feed', async () => {
+ const fetchMock = vi.fn(async (url: string | URL | RequestInfo) => {
+ if (String(url).includes('/releases/latest')) {
+ return response({
+ tag_name: 'v0.11.0',
+ html_url: 'https://github.com/tashfeenahmed/freellmapi/releases/tag/v0.11.0',
+ });
+ }
+ return response({ message: 'rate limited' }, 403);
+ });
+ const { app } = createTestApp({
+ env: { FREELLMAPI_INSTALL_METHOD: installation, FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
+ fetch: fetchMock,
+ });
+
+ const result = await httpGet(app, '/api/update/check');
+
+ // The Atom feed only tracks main; falling back to it would re-offer
+ // untagged commits, so the request must surface as an upstream error.
+ expect(result.status).toBe(502);
+ expect(fetchMock).toHaveBeenCalledTimes(2);
});
- const { app } = createTestApp({
- env: { FREELLMAPI_INSTALL_METHOD: 'desktop', FREELLMAPI_COMMIT_SHA: LOCAL_SHA },
- fetch: fetchMock,
- });
-
- const result = await httpGet(app, '/api/update/check');
-
- // The Atom feed only tracks main; falling back to it would re-offer
- // untagged commits, so the request must surface as an upstream error.
- expect(result.status).toBe(502);
- expect(fetchMock).toHaveBeenCalledTimes(2);
});
it('reports disabled without resolving Git identity or making a network request', async () => {
@@ -685,4 +711,59 @@ describe('Update API', () => {
expect((await httpGet(app, '/api/update/check')).status).toBe(502);
});
});
+
+ describe('POST /api/update/apply (Docker self-update)', () => {
+ const sidecar = {
+ FREELLMAPI_INSTALL_METHOD: 'docker',
+ FREELLMAPI_COMMIT_SHA: LOCAL_SHA,
+ FREELLMAPI_SELF_UPDATE_URL: 'http://watchtower:8080/',
+ FREELLMAPI_SELF_UPDATE_TOKEN: 'wt-token',
+ };
+
+ it.each([
+ ['a source install', { FREELLMAPI_SELF_UPDATE_URL: 'http://watchtower:8080', FREELLMAPI_SELF_UPDATE_TOKEN: 'wt-token' }],
+ ['a container without the sidecar', { FREELLMAPI_INSTALL_METHOD: 'docker', FREELLMAPI_COMMIT_SHA: LOCAL_SHA }],
+ ['a container with a URL but no token', { FREELLMAPI_INSTALL_METHOD: 'docker', FREELLMAPI_SELF_UPDATE_URL: 'http://watchtower:8080' }],
+ ])('refuses %s without calling anything', async (_label, env) => {
+ const fetchMock = vi.fn(async () => response({}, 202));
+ const { app } = createTestApp({ env, fetch: fetchMock });
+
+ const result = await httpPost(app, '/api/update/apply');
+
+ expect(result.status).toBe(409);
+ expect(result.body.error.type).toBe('not_configured');
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+
+ it('asks the sidecar for an async update with its token', async () => {
+ const fetchMock = vi.fn(async () => new Response(null, { status: 202 }));
+ const { app } = createTestApp({ env: sidecar, fetch: fetchMock });
+
+ const result = await httpPost(app, '/api/update/apply');
+
+ expect(result).toEqual({ status: 202, body: { started: true } });
+ expect(fetchMock).toHaveBeenCalledWith('http://watchtower:8080/v1/update?async=true', expect.objectContaining({
+ method: 'POST',
+ headers: { Authorization: 'Bearer wt-token' },
+ }));
+ });
+
+ it('reports a sidecar that refuses the request', async () => {
+ const fetchMock = vi.fn(async () => response({ error: 'unauthorized' }, 401));
+ const { app, logger } = createTestApp({ env: sidecar, fetch: fetchMock });
+
+ const result = await httpPost(app, '/api/update/apply');
+
+ expect(result.status).toBe(502);
+ expect(logger.error).toHaveBeenCalledWith(expect.stringContaining('HTTP 401'));
+ });
+
+ it('tells the dashboard the install can update itself', async () => {
+ const { app } = createTestApp({ env: sidecar });
+ expect((await httpGet(app, '/api/update/status')).body.selfUpdate).toBe(true);
+
+ const { app: plain } = createTestApp({ env: { FREELLMAPI_INSTALL_METHOD: 'docker', FREELLMAPI_COMMIT_SHA: LOCAL_SHA } });
+ expect((await httpGet(plain, '/api/update/status')).body).not.toHaveProperty('selfUpdate');
+ });
+ });
});
diff --git a/server/src/index.ts b/server/src/index.ts
index ef15e668..b477a045 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -21,6 +21,7 @@ import { warnOnRoutingOverrideDrift } from './services/model-weight-overrides.js
import { installLogRedaction } from './lib/log-redaction.js';
import { cleanupExpiredCooldowns } from './services/ratelimit.js';
import { loadCacheFromDb } from './services/cache.js';
+import { installGracefulShutdown } from './lib/graceful-shutdown.js';
// Before any other statement runs, so no provider key can reach stdout — users
// paste server output into bug reports. Module scope, not inside main(), so it
@@ -124,6 +125,8 @@ async function main() {
const server = app.listen(Number(PORT), HOST, onReady(HOST));
tuneKeepAlive(server);
+ const servers = [server];
+ installGracefulShutdown({ servers: () => servers.filter(s => s.listening), closeDb: () => getDb().close?.() });
server.on('error', (err: NodeJS.ErrnoException) => {
// The default '::' bind fails where IPv6 is disabled (kernel
// ipv6.disable=1 and the like) — retry IPv4-only rather than dying.
@@ -131,7 +134,9 @@ async function main() {
// fail-fast posture documented in main().catch below.
if (!process.env.HOST && (err.code === 'EAFNOSUPPORT' || err.code === 'EADDRNOTAVAIL')) {
console.warn('[server] IPv6 unavailable on this host — falling back to 0.0.0.0 (IPv4-only)');
- tuneKeepAlive(app.listen(Number(PORT), '0.0.0.0', onReady('0.0.0.0')));
+ const fallback = app.listen(Number(PORT), '0.0.0.0', onReady('0.0.0.0'));
+ tuneKeepAlive(fallback);
+ servers.push(fallback);
return;
}
console.error('\n[server] Failed to start:\n ' + (err?.message ?? err) + '\n');
diff --git a/server/src/lib/graceful-shutdown.ts b/server/src/lib/graceful-shutdown.ts
new file mode 100644
index 00000000..07043d6a
--- /dev/null
+++ b/server/src/lib/graceful-shutdown.ts
@@ -0,0 +1,57 @@
+import type { Server } from 'node:http';
+
+/**
+ * In a container the server is PID 1, and PID 1 gets no default action for
+ * SIGTERM: without a handler `docker stop` — and every Watchtower self-update —
+ * waits out its timeout and SIGKILLs the process mid-write. This stops taking
+ * connections, lets in-flight requests finish, closes the database cleanly and
+ * exits; a stuck request cannot hold the process past `graceMs`.
+ */
+export function installGracefulShutdown(options: {
+ servers: () => Server[];
+ closeDb: () => void;
+ graceMs?: number;
+ proc?: Pick<NodeJS.Process, 'once' | 'exit'>;
+ logger?: Pick<Console, 'log' | 'error'>;
+}): void {
+ const proc = options.proc ?? process;
+ const logger = options.logger ?? console;
+ const graceMs = options.graceMs ?? 8_000;
+ let stopping = false;
+
+ const shutdown = (signal: string) => {
+ if (stopping) return;
+ stopping = true;
+ logger.log(`[server] ${signal} received — finishing in-flight requests and shutting down`);
+ const force = setTimeout(() => {
+ logger.error(`[server] still busy after ${graceMs} ms — exiting anyway`);
+ proc.exit(1);
+ }, graceMs);
+ force.unref?.();
+
+ const servers = options.servers();
+ let open = servers.length;
+ const finish = () => {
+ try {
+ options.closeDb();
+ } catch (err) {
+ logger.error(`[server] closing the database failed: ${err instanceof Error ? err.message : String(err)}`);
+ }
+ clearTimeout(force);
+ proc.exit(0);
+ };
+ if (open === 0) return finish();
+ for (const server of servers) {
+ server.close(() => {
+ open -= 1;
+ if (open === 0) finish();
+ });
+ // Keep-alive sockets with no request in flight would otherwise hold
+ // close() open for the full 75 s keepAliveTimeout.
+ server.closeIdleConnections?.();
+ }
+ };
+
+ proc.once('SIGTERM', () => shutdown('SIGTERM'));
+ proc.once('SIGINT', () => shutdown('SIGINT'));
+}
diff --git a/server/src/routes/update.ts b/server/src/routes/update.ts
index ab276022..c482e98c 100644
--- a/server/src/routes/update.ts
+++ b/server/src/routes/update.ts
@@ -48,6 +48,8 @@ interface CheckResult {
checkedAt: string;
/** The release this build is (#703), or null when it cannot be established. */
version: string | null;
+ /** A Docker install wired to its updater sidecar can update itself (POST /apply). */
+ selfUpdate?: boolean;
remoteSha?: string;
remoteMessage?: string;
remoteDate?: string;
@@ -102,7 +104,7 @@ export interface UpdateRouterOptions {
env?: NodeJS.ProcessEnv;
cwd?: string;
now?: () => number;
- logger?: Pick<Console, 'error'>;
+ logger?: Pick<Console, 'error' | 'log'>;
version?: () => string | null;
/** Reads the opt-in flag; injectable so the endpoint is testable without a DB. */
autoCheckEnabled?: () => boolean;
@@ -342,6 +344,12 @@ export function createUpdateRouter(options: UpdateRouterOptions = {}): Router {
const autoCheckEnabled = options.autoCheckEnabled ?? isAutoUpdateCheckEnabled;
const updateCheckDisabled = env.FREELLMAPI_UPDATE_CHECK?.trim().toLowerCase() === 'off';
const githubToken = env.FREELLMAPI_UPDATE_GITHUB_TOKEN?.trim();
+ // docker-compose.yml's opt-in `autoupdate` profile runs a Watchtower sidecar
+ // with only its token-protected update endpoint enabled; these point at it.
+ const selfUpdateUrl = env.FREELLMAPI_SELF_UPDATE_URL?.trim().replace(/\/+$/, '');
+ const selfUpdateToken = env.FREELLMAPI_SELF_UPDATE_TOKEN?.trim();
+ const selfUpdateConfigured = Boolean(selfUpdateUrl && selfUpdateToken);
+ const canSelfUpdate = (installation: Installation) => installation === 'docker' && selfUpdateConfigured;
let identity: Identity | undefined;
let cache: CachedResult | null = null;
@@ -398,16 +406,19 @@ export function createUpdateRouter(options: UpdateRouterOptions = {}): Router {
const checkedAtMs = now();
const baseResult = {
installation: currentIdentity.installation,
+ ...(canSelfUpdate(currentIdentity.installation) ? { selfUpdate: true } : {}),
localSha: currentIdentity.sha!.slice(0, 7),
checkedAt: new Date(checkedAtMs).toISOString(),
version: appVersion(),
};
- // A desktop build can only be replaced by installing a published release,
- // so it must compare against the latest tag rather than `main` (#1270):
- // untagged commits on main have no installer, and offering them produced
- // an "Update available" that did nothing when clicked.
+ // A desktop build or a container can only be replaced by a published
+ // release — an installer, or the :latest image, which follows releases —
+ // so both compare against the latest tag rather than `main` (#1270):
+ // untagged commits on main have nothing to install, and offering them
+ // produced an "Update available" that did nothing when acted on.
+ const releaseOnly = currentIdentity.installation === 'desktop' || currentIdentity.installation === 'docker';
let compareTarget = 'main';
- if (currentIdentity.installation === 'desktop') {
+ if (releaseOnly) {
try {
compareTarget = (await latestRelease()).tagName;
} catch {
@@ -427,7 +438,7 @@ export function createUpdateRouter(options: UpdateRouterOptions = {}): Router {
if (response.status === 401 || response.status === 403 || response.status === 429) {
// The Atom feed tracks `main` only; for a desktop install it would
// reintroduce the bug this branch fixes, so let the rate limit surface.
- if (currentIdentity.installation === 'desktop') {
+ if (releaseOnly) {
throw new Error(`GitHub compare request returned HTTP ${response.status}`);
}
const atomResponse = await fetchImpl(`https://github.com/${REPOSITORY}/commits/main.atom`, {
@@ -624,12 +635,50 @@ export function createUpdateRouter(options: UpdateRouterOptions = {}): Router {
res.json({
status: currentIdentity.sha ? (cache?.result.status ?? 'idle') : 'unsupported',
installation: currentIdentity.installation,
+ ...(canSelfUpdate(currentIdentity.installation) ? { selfUpdate: true } : {}),
localSha: currentIdentity.sha?.slice(0, 7) ?? null,
lastChecked: cache?.result.checkedAt ?? null,
version: appVersion(),
});
});
+ /**
+ * Docker "Update now": asks the Watchtower sidecar to pull the newer image
+ * and recreate this container. `async=true` makes it answer 202 at once —
+ * the update replaces the very process handling this request, so a
+ * synchronous call could never return. The dashboard then waits for the
+ * server to come back on the new build.
+ */
+ router.post('/apply', async (_req: Request, res: Response) => {
+ const currentIdentity = await resolveIdentity();
+ if (!canSelfUpdate(currentIdentity.installation)) {
+ return res.status(409).json({
+ error: {
+ message: 'This install cannot update itself. Enable the autoupdate profile in docker-compose.yml.',
+ type: 'not_configured',
+ },
+ });
+ }
+ try {
+ const response = await fetchImpl(`${selfUpdateUrl}/v1/update?async=true`, {
+ method: 'POST',
+ headers: { Authorization: `Bearer ${selfUpdateToken}` },
+ signal: AbortSignal.timeout(10_000),
+ });
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
+ logger.log('[update] asked the updater sidecar to pull the latest image');
+ return res.status(202).json({ started: true });
+ } catch (err) {
+ logger.error(`[update] the updater sidecar did not accept the update: ${err instanceof Error ? err.message : String(err)}`);
+ return res.status(502).json({
+ error: {
+ message: 'The updater did not accept the request',
+ type: 'upstream_error',
+ },
+ });
+ }
+ });
+
return router;
}