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.
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.
Configure your VPS runtime, database, HTTPS, and region mirror — copy and run directly on your server.
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/schema-drift-compare
emdashctl restart appcurl -fsSL https://raw.githubusercontent.com/web-casa/EmdashDeploy/main/bootstrap.sh | sudo bash -s -- --update-cliBoth modes live on main and share the exact same EmDash 1.6 config patcher, workerd plugin sandbox, and migration gates.
| Dimension | Native VPS (install.sh + emdashctl) | Docker Compose Kit (docker/) |
|---|---|---|
| Best for | Dedicated VPS, lowest RAM overhead, direct systemd + host Caddy | Shared VPS alongside Nginx / Traefik / 1Panel / other containers |
| Runtime stack | Host Node.js 24, systemd, Caddy, SQLite / PostgreSQL 18, Valkey | Prebuilt multi-arch GHCR images (linux/amd64 + linux/arm64) + workerd |
| Host ports | Optional managed Caddy (80/443 HTTPS) or internal APP_PORT | Does NOT bind 80/443 by default (127.0.0.1:3000 loopback only) |
| Multi-site on 1 VPS | Native --instance <name> with isolated PG DB, systemd & sites.d/*.caddy | Separate COMPOSE_PROJECT_NAME + APP_PORT or compose.proxy-net.yml |
| Custom & AI edits | Default preserve mode never overwrites /data/emdash/app/site | Immutable custom builds via docker/Dockerfile.custom |
| Backup & Restore | emdashctl backup/restore with SHA-256, AES-256 encryption & S3 pruning | docker/backup.sh + docker/restore.sh with verified archive checks |
| Cross-mode migration | scripts/migrate-runtime.sh supports native-to-docker ↔ docker-to-native | Same bidirectional migration script preserving EMDASH_ENCRYPTION_KEY |
Every real-world self-hosting edge case solved out of the box for EmDash 1.6.x.
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.
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.
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.
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).
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.
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.
All instance-scoped commands accept --lang <code> and --instance <name>.
emdashctl instancesList all native instances with status, port, DB driver, and site URL
emdashctl status --jsonInspect runtime, app health, setup state, database, session, and Caddy
emdashctl doctor --deepRun permission, ownership, migration, and upstream emdash doctor checks
emdashctl diagnose --json --out /tmp/emdash-diag.jsonExport a fully redacted AI-ready diagnostic bundle (0600 permissions)
emdashctl logs app -fTail live systemd logs for app, postgres, redis, or caddy
emdashctl backup --full --encryptCreate a SHA-256 verified, AES-256 encrypted full backup (local + S3)
emdashctl backup --list-s3List managed remote S3 backup archives available for restore
emdashctl restore --from-s3 latest --yesVerify checksums & driver compatibility and restore latest S3 backup
emdashctl upgrade app --dry-runPreview non-destructive EmDash core upgrade plan before touching disk
emdashctl template diff --statRead-only diff against upstream EmDash starter template changes
emdashctl migrate-db sqlite-to-postgres --dry-runDry-run zero-dependency migration from SQLite to PostgreSQL 18
emdashctl rotate-encryption-key --statusInspect key IDs and safely perform two-phase EMDASH_ENCRYPTION_KEY rotation
End-to-end verified on PVE VMs, Linode VPS, SELinux Enforcing hosts, and multi-arch CI runners.
| Platform | Supported Versions | Architecture | Verification Evidence |
|---|---|---|---|
| Debian | 13 (trixie) | x86_64, ARM64 | Real PVE VM (2 GiB RAM + swap, PG 18, multi-instance, SQLite→PG) |
| Ubuntu LTS | 24.04 (noble), 26.04 (resolute) | x86_64, ARM64 | Real PVE / Linode VPS + GitHub Actions CI runners |
| Enterprise Linux | 9, 10 | x86_64, ARM64 | Rocky 9.9 / Rocky 10.3 / Alma 10.3 with SELinux Enforcing enabled |
| Docker / GHCR | ghcr.io/web-casa/emdash-deploy:1.6.0-hi.6 | linux/amd64, linux/arm64 | Native x64 & ARM64 smoke tests with SBOM & provenance attestations |
Browse 20 official & community Astro templates with real previews.
Audit declaredAccess capabilities across 300+ ATProto registry plugins.
Connect Claude Code / Cursor via EmDash's built-in MCP server & skills.