vps-pilot
v1.0.5
Published
Setup wizard for VPS: configure projects, generate deploy scripts, ecosystem.config.js, and nginx configs
Maintainers
Readme
vps-pilot
A setup wizard that runs on any VPS to configure projects, generate deploy scripts, ecosystem.config.js, and nginx configs interactively.
Installation
npm install -g vps-pilotUsage
vps-pilotRequirements
- Node.js 18+
- PM2 (optional, for process management)
- Nginx (optional, for reverse proxy)
- Ubuntu/Debian VPS (scripts use
bash,systemctlfor nginx)
What it does
- Config – Saves your choices to
~/.vps-pilot.jsonso you can re-run the wizard later to add or update projects. - Per project you can:
- Set name, path, type (Next.js, Vite, Strapi, Express/Node), PM2 name, port, git branch.
- Enable build step, Nginx, DB backup (MySQL/PostgreSQL).
- Generate
ecosystem.config.js, deploy script, nginx site config. - Register in PM2 and optionally install a
deploy-<name>command in/usr/local/bin.
- Deploy scripts – Bash scripts with error handling: DB backup (with warning prompt), git pull (with conflict handling: stash / force / abort),
npm install,npm run build,pm2 restart, nginx reload. - Deploy groups – Optionally create a single script (e.g.
deploy-all) that runs multiple project deploy scripts in order.
Writing to system paths
- Nginx configs are written to
/etc/nginx/sites-available/. You may be prompted forsudoif the process doesn’t have permission. - Installing a command in
/usr/local/binusessudo cpandsudo chmod +x; you may be prompted for your password.
License
ISC
