One-command server migration for Apache + PM2 Ubuntu/Debian servers
npm install @degreesign/migrateOne-command migration for Ubuntu servers running Apache + PM2 + Node.js apps
Migrates everything safely and exactly:
- Apache config
- Web files
- SSL certificates
- PM2 apps (original paths preserved via dump.pm2)
- Global npm packages
- 10 automated steps
License: Apache-2.0 LICENSE
``bashInstall migration package
yarn add @degreesign/migrate
$3
Edit .env with your server details and paths
IMPORTANT:
* FOLLOWING DETAILS ARE JUST PLACEHOLDERS
* REVIEW AND UPDATE REQUIRED BEFORE USE`env
Node.js
NODE_VERSION=24SSH details
OLD_USER='old_username'
OLD_IP='0.0.0.0'
NEW_USER='new_username'
NEW_IP='1.1.1.1'Comma-separated – no spaces after commas
MIGRATE_DIRS='/root/pm2_files,/var/www,/etc/letsencrypt'
MIGRATE_FILES='/etc/apache2/apache2.conf,/etc/ssh/sshd_config'
`
Run
Run the migration`bash
npx @degreesign/migrate
`Features
- Real-time progress bar
- Direct old → new server streaming
- Automatic local backup (./migration_data/`)