Changelog
All notable changes to Tusk are documented in this file.
[Unreleased]
Added
- Vertical Scale-Up Presets & Per-Role Guardrails: Parameterized
PG_MAX_CONNECTIONS,PG_SHARED_BUFFERS,PG_EFFECTIVE_CACHE_SIZE,PG_WORK_MEM,PG_MAINTENANCE_WORK_MEM,PGB_MAX_CLIENT_CONN,PGB_DEFAULT_POOL_SIZE(default15), andPGB_RESERVE_POOL_SIZEindocker-compose.yml&.env.example. Added per-instanceconnection_limit(CONNECTION LIMIT) andstatement_timeout_secenforcement (PATCH /api/instances/:id/limits). - Lightweight Time-Series Metrics & Capacity Advisories: Added SQLite migration
v2(scale_up_v2_3) withmetrics_samplessampled every 5 minutes (14-day retention),GET /api/monitor/history, inline SVG sparklines (24h/7d) on Dashboard, and automatic pool/cache/disk/RAM saturation advisories on/api/monitor/overview. - Scale-Out Migration Wizard & Remote Management: Added
POST /api/instances/:id/migrate/preflight, streamingpg_dump | pg_restoremigration (POST /api/instances/:id/migrateover SSEjobStream.ts), and Promote to Remote (remote_admin_url_enc) so Tusk can keep managing migrated external PostgreSQL nodes. - Per-Instance
backup_cron& Auto Zstd Compression: Replaced hardcoded0 2 * * *backup dispatch with per-instance 5-field cron evaluation (PATCH /api/instances/:id/schedule), and automaticpg_dump --compress=zstd:3capability detection (fallback--compress=6). - Bidirectional Primary & Layer 2 Standby: Added SQLite migration
v3(bidirectional_layer2_v2_4),layer2.tsservice,POST /api/instances/external(companion local standby pre-provisioning),PUT/DELETE /api/instances/:id/layer2,after_backupautomatic mirroring, and 1-click bidirectionalPOST /api/instances/:id/layer2/switch(Promote External ↔ Failback Tusk Local). - Comprehensive Documentation: Added docs/ARCHITECTURE.md and docs/API.md, and expanded README.md & docs/DEPLOYMENT.md.
Reliability & Redeploy Safety
- Graceful Shutdown & Container Stop Buffers: Added
stop_grace_period(60spostgres,30spg-panel,15spgbouncer),pg-panelDocker healthcheck,SIGTERM/SIGINTactive-job draining (beginShutdownAndDrain), and clean SQLite WAL checkpoint/close (checkpointAndCloseSqlite). - Zero-Data-Loss SQLite Migrations & Startup Reconciliation: Added
schema_migrations,PRAGMA synchronous = FULL, automatic transactionalVACUUM INTO *.pre-vN.baksnapshots prior to schema migrations, andreconcileInterruptedJobsOnStartup()(marks interrupted'running'backups failed, prunes*.tmp, preserves valid backups, and unlocksactive_restore:*locks left by mid-restore crashes). - Key Mismatch & Retention Guards: Enforced minimum
retention_days(MAX(1, retention_days)and route validation1..3650) and graceful handling ofMASTER_KEYdecryption mismatches in/api/instances/:id/connections.
[v2.2.0] - 2026-11-27
Added
- Dokploy & Zero-Config Container Initialization: Dynamic
scripts/init-auth-query.shentrypoint script and automatic PgBounceruserlist.txt+ self-signed TLS certificate generation onpgbouncer_tlsvolume. - Base64 Admin Hash Support: Added
PANEL_ADMIN_PASSWORD_HASH_B64to prevent$variable interpolation issues in Docker Compose / Dokploy UIs. - Trash Undelete & Immediate Purge: Added
POST /api/instances/:id/undelete,DELETE /api/instances/:id?purge=1, and a Sampah (Trash) tab in the Databases UI. - CI/CD & Open Source Release Pipeline: Added Husky (
pre-commit,pre-push) hooks, GitHub Actions CI, multi-arch (linux/amd64,linux/arm64) GHCR Docker builds, and automated GitHub Releases.
Security & Reliability
- Removed
/var/run/docker.sockMount: Panel now runs completely unprivileged using native PostgreSQL SQL isolation. - Fail-Closed Auth & Master Key: Enforced strict
MASTER_KEYandPANEL_ADMIN_PASSWORD_HASHvalidation in production, added login rate limiting (429), server-side session revocation on logout (revoked_tokens), andOrigin/Sec-Fetch-SiteCSRF validation. - Streaming Backup & Download Anti-OOM: Streamed
pg_dump, S3 transfers, and OpenSSL decryption directly without buffering entire archives in RAM; fixed SSEReadableStreamcleanup (cancel()). - Safe Database Pause & Restore: Preserved superuser access during pause/restore (
REVOKE CONNECT+NOLOGINinstead ofALLOW_CONNECTIONS = false) and added--roleownership preservation duringpg_restore. - Table Inspector Compatibility: Added
assertPgObjectNameto inspect_prisma_migrations,__drizzle_migrations, and CamelCase tables safely.
Removed
- Pruned premature enterprise/bloat components:
docker/postgres-walg, dedicated container Docker orchestration, speculative PostgreSQL 18 option, duplicatepgbouncer-sessiondaemon, and in-stack WireGuard container.