skill-deploy-vps
Skill2 starsChanged 7 months agoMITView on GitHub
Deploy Node.js applications to a Hostinger VPS with Nginx reverse proxy, PM2 process management, and SSL certificates. Use for deploying Express/Fastify backends, React/Vite dashboards, WhatsApp bots, and any Node.js app. Triggers on "deploy", "VPS", "servidor", "Nginx", "PM2", "SSL", "Hostinger", "subdominio", "publicar", "colocar no ar".
- Reads credentials
- Installs packages
In this repository70 other files it gives its agents.
- analise-anuncio-1000Skill
- anamnese-mentoradaSkill
- briefing-copy-360Skill
- calendario-imperatrizSkill
- cases-imperatrizSkill
- compliance-imperatrizSkill
- consultorialexSkill
- consultorrusselSkill
- criativos-dor-beneficioSkill
- criativos-mentorados-setupSkill
- criativos-qa-instagramSkill
- criativos-retargetingSkill
- criativos-urgenciaSkill
- crise-imperatrizSkill
- dashboard-imperatrizSkill
- deep-market-researchSkill
- dossie-mentoradaSkill
- evolucao-imperatrizSkill
- gates-imperatrizSkill
- glossariodatataSkill
- headline-imperatrizSkill
- hierarquia-imperatrizSkill
- imperatriz-das-vendasSkill
- imperatriz-multiagentesSkill
- imperio-agenteSkill
- imperio-diagnosticoSkill
- imperio-infraSkill
- imperio-memoriaSkill
- imperio-multiSkill
- imperio-negocioSkill
- imperio-qualidadeSkill
- lara-builderSkill
- linha-editorial-imperatrizSkill
- linkedin-empireSkill
- maestro-de-conteudoSkill
- maestro-trafegoSkill
- mapa-mental-imperatrizSkill
- marca-sistemica-imperatrizSkill
- mecanismo-unicoSkill
- perfil-mentoradaSkill
- pricing-dinamico-imperatrizSkill
- produtos-imperatrizSkill
- raci-imperatrizSkill
- reuniao-de-resultadoSkill
- skill-claude-md-builderSkill
- skill-copy-builderSkill
- skill-copy-transformerSkill
- skill-criativos-metaSkill
- skill-escala-adsSkill
- skill-expert-secretsSkill
- skill-funil-webinarSkill
- skill-historia-metodoSkill
- skill-lancamento-digitalSkill
- skill-mentoria-imperio-iaSkill
- skill-mentoria-tataSkill
- skill-oferta-irresistivelSkill
- skill-pagina-vendasSkill
- skill-persona-profundaSkill
- skill-pitch-high-ticketSkill
- skill-produto-entradaSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 59
Verify the build output exists (dist/, build/, or .next/).
- Very specific: line 63
Use SCP to transfer build artifacts.
- Very specific: line 102
Create or update PM2 process.
- Distinctive: line 125
Run health checks to confirm the deploy succeeded.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deploy VPS — Hostinger Node.js Apps
Overview
Deploy Node.js applications to a Hostinger VPS (Ubuntu 24.04) running at 76.13.175.161. Handles the full lifecycle: local build, file upload via SCP, Nginx reverse proxy configuration, PM2 process management, and SSL certificate provisioning via Certbot.
Infrastructure Reference
| Component | Detail |
| VPS IP | 76.13.175.161 |
| SSH | ssh root@76.13.175.161 (key auth) |
| Domain | iacomtata.com.br |
| Apps dir | /var/www/apps/ |
| Node | 22 (via nvm) |
| Package mgr | pnpm |
| Process mgr | PM2 |
| Reverse proxy | Nginx |
| SSL | Certbot (Let's Encrypt) |
| Databases | SQLite (WAL mode) in app dirs |
Active Deployments
| App | Port | Subdomain | PM2 Name |
| WhatsApp Analyzer | 3003 | whatsapp.iacomtata.com.br | whatsapp-analyzer |
| LuxStudio Bot | 3005 | luxstudio.iacomtata.com.br | luxstudio-whatsapp |
| Podcast Infinito | 3006 | — | podcast-infinito |
| Imperatriz Carroseis | 3010 | iacomtata.com.br/imperatrizdoscarroseis | imperatriz-carroseis |
| Imperio | 18790 | imperio.iacomtata.com.br | imperio |
Port Allocation
Ports 3003-3006, 3010, 18790 are taken. Use the next available port (3007, 3008, 3009, 3011+).
Deploy Workflow
Execute these steps sequentially. Each step has a corresponding script in scripts/.
Step 1 — Build Locally
Build the project on the local machine before uploading.
# For pnpm/turbo monorepo
cd ~/PROJECT_NAME
PATH="$HOME/.npm-global/bin:/usr/bin:/usr/local/bin:$PATH" pnpm run build
# For simple npm project
cd ~/PROJECT_NAME
npm run buildVerify the build output exists (dist/, build/, or .next/).
Step 2 — Upload to VPS
Use SCP to transfer build artifacts. NEVER transfer node_modules.
# Create app directory on VPS
ssh root@76.13.175.161 "mkdir -p /var/www/apps/PROJECT_NAME"
# Upload backend dist
scp -r dist/ root@76.13.175.161:/var/www/apps/PROJECT_NAME/dist/
# Upload package.json and lock file
scp package.json root@76.13.175.161:/var/www/apps/PROJECT_NAME/
# Upload .env (if needed)
scp .env root@76.13.175.161:/var/www/apps/PROJECT_NAME/
# Install production dependencies on VPS
ssh root@76.13.175.161 "cd /var/www/apps/PROJECT_NAME && npm install --production"For apps with a static dashboard (React/Vite):
# Upload dashboard build to app dir or ~/.imperio/dashboard/
scp -r dashboard/dist/* root@76.13.175.161:/var/www/apps/PROJECT_NAME/dashboard/Step 3 — Configure Nginx
Generate and install Nginx config for the subdomain. See references/nginx-templates.md for all template variants.
# Run the nginx config generator
bash scripts/nginx-config.sh SUBDOMAIN PORT PROJECT_NAMEStandard pattern: Nginx listens on port 80/443, proxies to 127.0.0.1:PORT.
Step 4 — Start with PM2
Create or update PM2 process. See references/pm2-templates.md for ecosystem config templates.
# Start new app
ssh root@76.13.175.161 "cd /var/www/apps/PROJECT_NAME && pm2 start dist/index.js --name PROJECT_NAME"
# Or use ecosystem file
ssh root@76.13.175.161 "cd /var/www/apps/PROJECT_NAME && pm2 start ecosystem.config.js"
# Save PM2 process list
ssh root@76.13.175.161 "pm2 save"Step 5 — SSL Certificate
Provision SSL certificate via Certbot.
bash scripts/ssl-setup.sh SUBDOMAIN.iacomtata.com.brStep 6 — Verify
Run health checks to confirm the deploy succeeded.
bash scripts/health-check.sh PROJECT_NAME PORT SUBDOMAIN.iacomtata.com.brFull Deploy Script
For a complete automated deploy, use the main deploy script:
bash scripts/deploy.sh PROJECT_NAME PORT SUBDOMAINArguments:
PROJECT_NAME— Name of the project (used for directory, PM2 name)PORT— Port the app listens on (e.g., 3007)SUBDOMAIN— Subdomain prefix (e.g., "myapp" for myapp.iacomtata.com.br)
The script executes all 6 steps in sequence with error handling and rollback on failure.
Rollback
Revert to the previous version if a deploy fails:
bash scripts/rollback.sh PROJECT_NAMEThe deploy script automatically creates a backup at /var/www/apps/PROJECT_NAME.backup/ before uploading new files.
Troubleshooting
See references/troubleshooting.md for common issues:
- Port already in use
- Nginx config syntax errors
- PM2 process crashes
- SSL certificate renewal failures
- Permission issues
- SQLite lock errors
Quick Reference Commands
# Check all PM2 processes
ssh root@76.13.175.161 "pm2 list"
# View app logs
ssh root@76.13.175.161 "pm2 logs PROJECT_NAME --lines 50"
# Restart app
ssh root@76.13.175.161 "pm2 restart PROJECT_NAME"
# Test Nginx config
ssh root@76.13.175.161 "nginx -t"
# Reload Nginx
ssh root@76.13.175.161 "systemctl reload nginx"
# Check SSL cert expiry
ssh root@76.13.175.161 "certbot certificates"
# Disk usage
ssh root@76.13.175.161 "df -h && du -sh /var/www/apps/*"Resources
scripts/
deploy.sh— Complete deploy workflow (build, upload, configure, start, verify)nginx-config.sh— Generate and install Nginx reverse proxy configssl-setup.sh— Provision SSL certificate via Certbothealth-check.sh— Verify app is running (PM2 + HTTP)rollback.sh— Revert to previous deploy version
references/
nginx-templates.md— Nginx config templates for different app typespm2-templates.md— PM2 ecosystem config templatestroubleshooting.md— Common issues and solutions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

