Skip to content
EmdashDeploy v1.6.0-hi.6·MIT · HiEmDash Companion

Deploy EmDash 1.6 to Your Own VPS in One Command

EmdashDeploy (web-casa/EmdashDeploy) unifies a native systemd + Caddy HTTPS installer and a coexistence-first multi-arch Docker Compose kit — with mainland China 16s accelerated builds and 16 lifecycle commands via emdashctl.

16–19s
China Mirror Build
Down from ~120s timeout
2 Modes
Native & Docker
Bidirectional migration
16 CLIs
emdashctl Ops
Backup, S3, upgrade, AI diag
x64 & ARM
Verified OS Matrix
Debian 13 / Ubuntu / EL 9-10

Interactive Deployment Command Builder

Configure your VPS runtime, database, HTTPS, and region mirror — copy and run directly on your server.

Synced from Stack BuilderRuntime, database, template, mirror preset & plugins are pre-filled below.
Edit in Stack Builder
Appended ATProto plugins:
Install Flow
Starter Template
Database Engine
bash (Debian 13 / Ubuntu 24-26 / EL 9-10)
EMDASH_INSTALL_USE_CADDY=1 \
EMDASH_INSTALL_ENABLE_HTTPS=1 \
EMDASH_INSTALL_DOMAIN=blog.example.com \
EMDASH_INSTALL_ADMIN_EMAIL=ops@example.com \
curl -fsSL https://raw.githubusercontent.com/web-casa/EmdashDeploy/main/bootstrap.sh \
  | sudo -E bash -s -- --lang=en --non-interactive --activate

# Install 1 audited ATProto plugin(s) from Stack Builder:
cd /data/emdash/app/site
emdash plugin install @mrhandsome39.bsky.social/empty-block-review
emdashctl restart app
Already installed? Zero-downtime CLI update:curl -fsSL https://raw.githubusercontent.com/web-casa/EmdashDeploy/main/bootstrap.sh | sudo bash -s -- --update-cli

Choose Your Deployment Mode: Native VPS vs. Docker Compose

Both modes live on main and share the exact same EmDash 1.6 config patcher, workerd plugin sandbox, and migration gates.

DimensionNative VPS (install.sh + emdashctl)Docker Compose Kit (docker/)
Best forDedicated VPS, lowest RAM overhead, direct systemd + host CaddyShared VPS alongside Nginx / Traefik / 1Panel / other containers
Runtime stackHost Node.js 24, systemd, Caddy, SQLite / PostgreSQL 18, ValkeyPrebuilt multi-arch GHCR images (linux/amd64 + linux/arm64) + workerd
Host portsOptional managed Caddy (80/443 HTTPS) or internal APP_PORTDoes NOT bind 80/443 by default (127.0.0.1:3000 loopback only)
Multi-site on 1 VPSNative --instance <name> with isolated PG DB, systemd & sites.d/*.caddySeparate COMPOSE_PROJECT_NAME + APP_PORT or compose.proxy-net.yml
Custom & AI editsDefault preserve mode never overwrites /data/emdash/app/siteImmutable custom builds via docker/Dockerfile.custom
Backup & Restoreemdashctl backup/restore with SHA-256, AES-256 encryption & S3 pruningdocker/backup.sh + docker/restore.sh with verified archive checks
Cross-mode migrationscripts/migrate-runtime.sh supports native-to-docker ↔ docker-to-nativeSame bidirectional migration script preserving EMDASH_ENCRYPTION_KEY

Production Operations Built In — Not Bolted On

Every real-world self-hosting edge case solved out of the box for EmDash 1.6.x.

MULTI-INSTANCE

Run Multiple EmDash Sites on One VPS

Each named instance gets its own /data/emdash-<name>, auto-allocated port, isolated systemd unit, cron job, and PostgreSQL role. Modular sites.d/*.caddy preserves your custom conf.d/*.caddy across upgrades.

CN ACCELERATION

Cut Astro Builds from 120s Timeouts to ~16s

EMDASH_MIRROR_PRESET=cn configures npmmirror for Corepack & pnpm 11 and enables build-time Google Fonts fast-fail without mutating your host OS APT/DNF sources.

SAFE UPGRADES

Upgrade EmDash Core Without Losing Custom Code

emdashctl upgrade app acquires an exclusive flock, takes a verified backup, bumps only emdash/@emdash-cms/* packages, enforces explicit migrations, and leaves custom pages & astro.config.mjs untouched.

AI DIAGNOSTICS

Share Redacted Health Bundles with AI Agents

Exports host metadata, doctor --deep results, migration state, and bounded journalctl logs as JSON while recursively redacting passwords, DB URLs, JWTs, cookies, and emdash_enc_v1_* keys (0600 atomic write).

BACKUP & S3

Verified Local + S3 Backups with Retention

Uses sqlite3.backup() + PRAGMA integrity_check or pg_dump -Fc + pg_restore --list, SHA-256 manifests, optional AES-256-CBC PBKDF2 encryption, S3 retention pruning (BACKUP_KEEP_S3), and one-command restore --from-s3.

ZERO-DEP MIGRATION

Grow from SQLite to PostgreSQL 18 Smoothly

Built-in zero-dependency Python migrator handles FK topological sorting, preserves $emdash encrypted envelopes, auto-creates dynamic ec_* collection tables in PG 18, verifies every table count, and rolls back on error.

emdashctl Operations Cheatsheet

All instance-scoped commands accept --lang <code> and --instance <name>.

emdashctl instances

List all native instances with status, port, DB driver, and site URL

emdashctl status --json

Inspect runtime, app health, setup state, database, session, and Caddy

emdashctl doctor --deep

Run permission, ownership, migration, and upstream emdash doctor checks

emdashctl diagnose --json --out /tmp/emdash-diag.json

Export a fully redacted AI-ready diagnostic bundle (0600 permissions)

emdashctl logs app -f

Tail live systemd logs for app, postgres, redis, or caddy

emdashctl backup --full --encrypt

Create a SHA-256 verified, AES-256 encrypted full backup (local + S3)

emdashctl backup --list-s3

List managed remote S3 backup archives available for restore

emdashctl restore --from-s3 latest --yes

Verify checksums & driver compatibility and restore latest S3 backup

emdashctl upgrade app --dry-run

Preview non-destructive EmDash core upgrade plan before touching disk

emdashctl template diff --stat

Read-only diff against upstream EmDash starter template changes

emdashctl migrate-db sqlite-to-postgres --dry-run

Dry-run zero-dependency migration from SQLite to PostgreSQL 18

emdashctl rotate-encryption-key --status

Inspect key IDs and safely perform two-phase EMDASH_ENCRYPTION_KEY rotation

Verified Platforms & Real-VM Test Matrix

End-to-end verified on PVE VMs, Linode VPS, SELinux Enforcing hosts, and multi-arch CI runners.

VPS-TEST-PLAN.md
PlatformSupported VersionsArchitectureVerification Evidence
Debian13 (trixie)x86_64, ARM64Real PVE VM (2 GiB RAM + swap, PG 18, multi-instance, SQLite→PG)
Ubuntu LTS24.04 (noble), 26.04 (resolute)x86_64, ARM64Real PVE / Linode VPS + GitHub Actions CI runners
Enterprise Linux9, 10x86_64, ARM64Rocky 9.9 / Rocky 10.3 / Alma 10.3 with SELinux Enforcing enabled
Docker / GHCRghcr.io/web-casa/emdash-deploy:1.6.0-hi.6linux/amd64, linux/arm64Native x64 & ARM64 smoke tests with SBOM & provenance attestations
Pick an EmDash Theme

Browse 20 official & community Astro templates with real previews.

Install Sandboxed Plugins

Audit declaredAccess capabilities across 300+ ATProto registry plugins.

Explore AI & MCP Tools

Connect Claude Code / Cursor via EmDash's built-in MCP server & skills.