Move A Self-Hosted Markdawn Deployment
Use this runbook to move a compatible Markdawn installation from one Linux server to another.
The goal is a new server with the same application services and persistent data. Keep the old server stopped until you have verified the new deployment.
The documented commands assume Fedora, rootless Podman, external DNS, and administrative access on both servers. If the source or destination uses Ubuntu, Docker Compose, or another container runtime, adapt the service and volume commands while preserving the same application services and persistent data.
Prepare The New Server
Section titled “Prepare The New Server”Clone the repository and copy the existing environment file:
sudo dnf install -y gitsudo mkdir -p /var/wwwsudo chown "$USER:$USER" /var/wwwgit clone https://github.com/atharva-again/Markdawn.git /var/www/markdawnscp old-server:/var/www/markdawn/.env /var/www/markdawn/.envcd /var/www/markdawn./deploy/setup.shVerify the new deployment, then stop its application services before restoring data.
Capture The Old Data
Section titled “Capture The Old Data”Stop writes before taking final snapshots:
systemctl --user stop markdawn-api.service markdawn-collab.servicepodman exec markdawn-postgres pg_dump -U markdawn -d markdawn \ --format=custom --no-owner > /tmp/markdawn-db.dumppodman volume export markdawn-data > /tmp/markdawn-data.tarCopy both snapshots to the new server.
Restore The Data
Section titled “Restore The Data”cat /tmp/markdawn-db.dump | podman exec -i markdawn-postgres \ pg_restore -U markdawn -d markdawn --clean --if-exists --no-ownerpodman volume import markdawn-data /tmp/markdawn-data.tarApply migrations and restart the services:
cd /var/www/markdawnpnpm --filter @markdawn/api db:migratesystemctl --user start markdawn-api.service markdawn-collab.servicecurl http://localhost:3001/api/healthCut Over DNS
Section titled “Cut Over DNS”- Point the domain’s DNS records to the new server.
- Restart Caddy.
- Check the public API and collaborative editing.
- Keep the old server stopped until the new server is confirmed healthy.
Keep the old server and both snapshots available until you have verified pages, uploads, login, sharing, and editing.
For routine updates instead of a server move, use Maintain a Self-Hosted Markdawn.